From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: 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
Subject: Re: [PATCH 1/2] perf annotate: Treat 'call' instruction as stack operation
Date: Tue, 10 Sep 2024 11:49:37 -0300 [thread overview]
Message-ID: <ZuBcgRi8ERab0WNG@x1> (raw)
In-Reply-To: <20240909214251.3033827-1-namhyung@kernel.org>
On Mon, Sep 09, 2024 at 02:42:50PM -0700, Namhyung Kim wrote:
> I found some portion of mem-store events sampled on CALL instruction
> which has no memory access. But it actually saves a return address
> into stack. It should be considered as a stack operation like RET
> instruction.
Thanks, applied to perf-tools-next,
- Arnaldo
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/util/annotate.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
> index 4990c70b1794d7a9..1a347a711dcf5c62 100644
> --- a/tools/perf/util/annotate.c
> +++ b/tools/perf/util/annotate.c
> @@ -2474,6 +2474,7 @@ static bool is_stack_operation(struct arch *arch, struct disasm_line *dl)
> if (arch__is(arch, "x86")) {
> if (!strncmp(dl->ins.name, "push", 4) ||
> !strncmp(dl->ins.name, "pop", 3) ||
> + !strncmp(dl->ins.name, "call", 4) ||
> !strncmp(dl->ins.name, "ret", 3))
> return true;
> }
> --
> 2.46.0.598.g6f2099f65c-goog
prev parent reply other threads:[~2024-09-10 14:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 21:42 [PATCH 1/2] perf annotate: Treat 'call' instruction as stack operation Namhyung Kim
2024-09-09 21:42 ` [PATCH 2/2] perf annotate-data: Add pr_debug_scope() Namhyung Kim
2024-09-10 14:49 ` Arnaldo Carvalho de Melo [this message]
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=ZuBcgRi8ERab0WNG@x1 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.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 \
/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).