OSDN Git Service

perf annotate: Introduce annotation__scnprintf_samples_period() method
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 3 Apr 2018 18:19:47 +0000 (15:19 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 3 Apr 2018 18:22:55 +0000 (15:22 -0300)
commitb213eac245aa2d29a3b9dd90f3b96ab182337ee8
treeb448fa46d69a64d6ff809a58eb95fdf000f3f48e
parentef9ff6017e3c4593f3efa5776784cb417c58ad6c
perf annotate: Introduce annotation__scnprintf_samples_period() method

To print a string using the total period (nr_events) and the number of
samples for a given annotation, i.e. for a given symbol, the counterpart
to hists__scnprintf_samples_period(), that is for all the samples in a
session (be it a live session, think 'perf top' or a perf.data file,
think 'perf report').

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Martin Liška <mliska@suse.cz>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196935
Link: https://lkml.kernel.org/n/tip-goj2wu4fxutc8vd46mw3yg14@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/annotate.c
tools/perf/util/annotate.h