From: Leo Yan <leo.yan@arm.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ian Rogers <irogers@google.com>,
Kan Liang <kan.liang@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org,
Ravi Bangoria <ravi.bangoria@amd.com>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 1/3] perf mem: Describe overhead calculation in brief
Date: Tue, 27 May 2025 11:12:46 +0100 [thread overview]
Message-ID: <20250527101246.GG2566836@e132581.arm.com> (raw)
In-Reply-To: <20250523222157.1259998-1-namhyung@kernel.org>
On Fri, May 23, 2025 at 03:21:55PM -0700, Namhyung Kim wrote:
> From: Ravi Bangoria <ravi.bangoria@amd.com>
>
> 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.
>
> Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
For whole series:
Reviewed-by: Leo Yan <leo.yan@arm.com>
> ---
> tools/perf/Documentation/perf-mem.txt | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/tools/perf/Documentation/perf-mem.txt b/tools/perf/Documentation/perf-mem.txt
> index a9e3c71a220557d4..965e73d377724607 100644
> --- a/tools/perf/Documentation/perf-mem.txt
> +++ b/tools/perf/Documentation/perf-mem.txt
> @@ -137,6 +137,25 @@ REPORT OPTIONS
> In addition, for report all perf report options are valid, and for record
> all perf record options.
>
> +OVERHEAD CALCULATION
> +--------------------
> +Unlike linkperf:perf-report[1], which calculates overhead from the actual
> +sample period, perf-mem overhead is calculated using sample weight. E.g.
> +there are two samples in perf.data file, both with the same sample period,
> +but one sample with weight 180 and the other with weight 20:
> +
> + $ perf script -F period,data_src,weight,ip,sym
> + 100000 629080842 |OP LOAD|LVL L3 hit|... 20 7e69b93ca524 strcmp
> + 100000 1a29081042 |OP LOAD|LVL RAM hit|... 180 ffffffff82429168 memcpy
> +
> + $ perf report -F overhead,symbol
> + 50% [.] strcmp
> + 50% [k] memcpy
> +
> + $ perf mem report -F overhead,symbol
> + 90% [k] memcpy
> + 10% [.] strcmp
> +
> SEE ALSO
> --------
> linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-arm-spe[1]
> --
> 2.49.0.1151.ga128411c76-goog
>
next prev parent reply other threads:[~2025-05-27 10:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 22:21 [PATCH 1/3] perf mem: Describe overhead calculation in brief Namhyung Kim
2025-05-23 22:21 ` [PATCH 2/3] perf mem: Display sort order only if it's available Namhyung Kim
2025-05-23 22:21 ` [PATCH 3/3] perf mem: Show absolute percent in mem_stat output Namhyung Kim
2025-05-27 10:12 ` Leo Yan [this message]
2025-05-28 17:43 ` [PATCH 1/3] perf mem: Describe overhead calculation in brief Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250527101246.GG2566836@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).