From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: a.p.zijlstra@chello.nl, mingo@elte.hu, paulus@samba.org,
cjashfor@linux.vnet.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf, tool: Fix prefix matching for kernel maps
Date: Mon, 6 Feb 2012 18:08:19 -0200 [thread overview]
Message-ID: <20120206200819.GJ6367@infradead.org> (raw)
In-Reply-To: <1328461865-6127-1-git-send-email-jolsa@redhat.com>
Em Sun, Feb 05, 2012 at 06:11:05PM +0100, Jiri Olsa escreveu:
> In some perf ancient versions we used '[kernel.kallsyms._text]' as
> the name for the kernel map.
>
> This got changed with commit:
> perf: 'perf kvm' tool for monitoring guest performance from host
> commit a1645ce12adb6c9cc9e19d7695466204e3f017fe
> Author: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
>
> and we started to use following name '[kernel.kallsyms]_text'.
>
> This name change is important for the report code dealing with ancient
> perf data. When processing the kernel map event, we need to recognize
> the old naming (dont match the last ']') and initialize the kernel map
> correctly.
>
> The subsequent call to maps__set_kallsyms_ref_reloc_sym deals with the
> superfluous ']' to get correct symbol name.
Good catch & fix, thanks.
People curious about that -1 can look at 'git blame' to read the above
historical explanation ;-)
- Arnaldo
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
> ---
> tools/perf/util/event.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
> index 73ddaf0..2044324 100644
> --- a/tools/perf/util/event.c
> +++ b/tools/perf/util/event.c
> @@ -554,7 +554,7 @@ static int perf_event__process_kernel_mmap(struct perf_tool *tool __used,
>
> is_kernel_mmap = memcmp(event->mmap.filename,
> kmmap_prefix,
> - strlen(kmmap_prefix)) == 0;
> + strlen(kmmap_prefix) - 1) == 0;
> if (event->mmap.filename[0] == '/' ||
> (!is_kernel_mmap && event->mmap.filename[0] == '[')) {
>
> --
> 1.7.4.4
next prev parent reply other threads:[~2012-02-06 20:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-05 17:11 [PATCH] perf, tool: Fix prefix matching for kernel maps Jiri Olsa
2012-02-06 20:08 ` Arnaldo Carvalho de Melo [this message]
2012-02-07 19:35 ` [tip:perf/core] perf tools: " tip-bot for Jiri Olsa
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=20120206200819.GJ6367@infradead.org \
--to=acme@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.