Commit 62ba18ba authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf stat report: Process stat config event

Adding processing of stat config event and initialize stat_config
object.
Reported-by: default avatarKan Liang <kan.liang@intel.com>
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1446734469-11352-14-git-send-email-jolsa@kernel.org
[ Renamed 'stat' parameter to 'st' to fix 'already defined' build error with older distros (e.g. RHEL6.7) ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 1975d36e
...@@ -1533,6 +1533,15 @@ static int __cmd_record(int argc, const char **argv) ...@@ -1533,6 +1533,15 @@ static int __cmd_record(int argc, const char **argv)
return argc; return argc;
} }
static
int process_stat_config_event(struct perf_tool *tool __maybe_unused,
union perf_event *event,
struct perf_session *session __maybe_unused)
{
perf_event__read_stat_config(&stat_config, &event->stat_config);
return 0;
}
static int set_maps(struct perf_stat *st) static int set_maps(struct perf_stat *st)
{ {
if (!st->cpus || !st->threads) if (!st->cpus || !st->threads)
...@@ -1600,6 +1609,7 @@ static struct perf_stat perf_stat = { ...@@ -1600,6 +1609,7 @@ static struct perf_stat perf_stat = {
.attr = perf_event__process_attr, .attr = perf_event__process_attr,
.thread_map = process_thread_map_event, .thread_map = process_thread_map_event,
.cpu_map = process_cpu_map_event, .cpu_map = process_cpu_map_event,
.stat_config = process_stat_config_event,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment