perf stat: Introduce struct runtime_stat_data
authorNamhyung Kim <namhyung@kernel.org>
Fri, 15 Jan 2021 07:11:38 +0000 (16:11 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 15 Jan 2021 20:28:27 +0000 (17:28 -0300)
commit3ff1e7180abc7f6db413933c110df69157216715
tree84c2fe57303eb65a35f292efc4dde61f548d86ed
parent66dd86b2a2bee129c70f7ff054d3a6a2e5f8eb20
perf stat: Introduce struct runtime_stat_data

To pass more info to the saved_value in the runtime_stat, add a new
struct runtime_stat_data.  Currently it only has 'ctx' field but later
patch will add more.

Note that we intentionally pass 0 as ctx to clock-related events for
compatibility.  It was already there in a few places.  So move the code
into the saved_value_lookup() explicitly and add a comment.

Suggested-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20210115071139.257042-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/stat-shadow.c