perf test: Add entry to test cpu topology
authorKan Liang <kan.liang@intel.com>
Fri, 4 Sep 2015 08:58:31 +0000 (04:58 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 14 Sep 2015 15:50:17 +0000 (12:50 -0300)
commitc84974ed9fb672930929e0d20ea3c366635a54aa
treead79e300ef18d2b5eeb6741f8f7302175e898e00
parentfbf99625b88fd8808bf2b80efac453d63cae08e8
perf test: Add entry to test cpu topology

This patch test cpu core_id and socket_id which are stored in perf_env.

Commiter note:

  # perf test topo
  40: Test topology in session: Ok

  # perf test -v topo
  40: Test topology in session:
  --- start ---
  test child forked, pid 31767
  templ file: /tmp/perf-test-VTZ1PL
  CPU 0, core 0, socket 0
  CPU 1, core 1, socket 0
  CPU 2, core 0, socket 0
  CPU 3, core 1, socket 0
  test child finished with 0
  ---- end ----
  Test topology in session: Ok
  #

Based-on-a-patch-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Kan Liang <kan.liang@intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1441357111-64522-1-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/Build
tools/perf/tests/builtin-test.c
tools/perf/tests/tests.h
tools/perf/tests/topology.c [new file with mode: 0644]