perf test: Update mmap read functions for backward-ring-buffer test
authorKan Liang <kan.liang@intel.com>
Thu, 18 Jan 2018 21:26:24 +0000 (13:26 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 15 Feb 2018 12:54:08 +0000 (09:54 -0300)
commit600a7cfe88de2c6e44e23d61dd721b996b790eb2
tree1c60a151f5bd6b94400fa6097d3d29556c747d7a
parent7bb45972952db9298fe5cc440160dcad1a66bfbc
perf test: Update mmap read functions for backward-ring-buffer test

Use the new perf_mmap__read_* interfaces for overwrite ringbuffer test.

Commiter notes:

Testing:

  [root@seventh ~]# perf test -v backward
  48: Read backward ring buffer                             :
  --- start ---
  test child forked, pid 8309
  Using CPUID GenuineIntel-6-9E
  mmap size 1052672B
  mmap size 8192B
  Finished reading overwrite ring buffer: rewind
  test child finished with 0
  ---- end ----
  Read backward ring buffer: Ok
  [root@seventh ~]#

Signed-off-by: Kan Liang <kan.liang@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1516310792-208685-10-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/backward-ring-buffer.c