perf expr: Add metric literals for topology.
authorIan Rogers <irogers@google.com>
Thu, 11 Nov 2021 00:21:07 +0000 (16:21 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 13 Nov 2021 21:11:50 +0000 (18:11 -0300)
commitfdf1e29b6118c18fbf2003321fcf474d4bb778ec
treed3c5542b3d06ca9b7bc8b9420a0f2d31dd92c4ea
parent3613f6c1180b4af432ee607f8b43da381cd03fae
perf expr: Add metric literals for topology.

Allow the number of cpus, cores, dies and packages to be queried by a
metric expression.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul A . Clarke <pc@us.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Riccardo Mancini <rickyman7@gmail.com>
Cc: Song Liu <song@kernel.org>
Cc: Wan Jiabing <wanjiabing@vivo.com>
Cc: Yury Norov <yury.norov@gmail.com>
Link: https://lore.kernel.org/r/20211111002109.194172-7-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/expr.c
tools/perf/util/expr.c