Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf report: Add an indication of what time slices are used

Add a time slices indication to the perf report header.

For example,

# perf report --stdio --time 10%

# Total Lost Samples: 0
#
# Samples: 9K of event 'cycles:ppp' (time slices: 10%)
# Event count (approx.): 8951288803

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Suggested--by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Reviewed-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1515596433-24653-6-git-send-email-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Jin Yao and committed by
Arnaldo Carvalho de Melo
7425664b 3002812e

+3
+3
tools/perf/builtin-report.c
··· 404 404 if (evname != NULL) 405 405 ret += fprintf(fp, " of event '%s'", evname); 406 406 407 + if (rep->time_str) 408 + ret += fprintf(fp, " (time slices: %s)", rep->time_str); 409 + 407 410 if (symbol_conf.show_ref_callgraph && 408 411 strstr(evname, "call-graph=no")) { 409 412 ret += fprintf(fp, ", show reference callgraph");