Skip to content

Commit 00a23c0

Browse files
Ravi Bangoriaacmel
authored andcommitted
perf mem: Describe overhead calculation in brief
Unlike perf-report which uses sample period for overhead calculation, perf-mem overhead is calculated using sample weight. Describe perf-mem overhead calculation method in it's man page. Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: https://lore.kernel.org/r/20250523222157.1259998-1-namhyung@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent a4a859e commit 00a23c0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tools/perf/Documentation/perf-mem.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,25 @@ REPORT OPTIONS
137137
In addition, for report all perf report options are valid, and for record
138138
all perf record options.
139139

140+
OVERHEAD CALCULATION
141+
--------------------
142+
Unlike linkperf:perf-report[1], which calculates overhead from the actual
143+
sample period, perf-mem overhead is calculated using sample weight. E.g.
144+
there are two samples in perf.data file, both with the same sample period,
145+
but one sample with weight 180 and the other with weight 20:
146+
147+
$ perf script -F period,data_src,weight,ip,sym
148+
100000 629080842 |OP LOAD|LVL L3 hit|... 20 7e69b93ca524 strcmp
149+
100000 1a29081042 |OP LOAD|LVL RAM hit|... 180 ffffffff82429168 memcpy
150+
151+
$ perf report -F overhead,symbol
152+
50% [.] strcmp
153+
50% [k] memcpy
154+
155+
$ perf mem report -F overhead,symbol
156+
90% [k] memcpy
157+
10% [.] strcmp
158+
140159
SEE ALSO
141160
--------
142161
linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-arm-spe[1]

0 commit comments

Comments
 (0)