From: David Ahern <dsahern@gmail.com>
To: Luigi Semenzato <semenzato@chromium.org>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Vasiliy Kulikov <segoon@openwall.com>,
Stephen Wilson <wilsons@start.ca>,
Oleg Nesterov <oleg@redhat.com>, Tejun Heo <tj@kernel.org>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Andi Kleen <ak@linux.intel.com>,
Lucas De Marchi <lucas.demarchi@profusion.mobi>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Frederic Weisbecker <fweisbec@gmail.com>,
Namhyung Kim <namhyung@gmail.com>,
Robert Richter <robert.richter@amd.com>,
linux-kernel@vger.kernel.org, sonnyrao@chromium.org,
olofj@chromium.org, eranian@google.com
Subject: Re: [PATCH] perf: do not flush maps on COMM for perf report
Date: Wed, 22 Aug 2012 13:22:17 -0600 [thread overview]
Message-ID: <50353169.1080606@gmail.com> (raw)
In-Reply-To: <1345585940-6497-1-git-send-email-semenzato@chromium.org>
On 8/21/12 3:52 PM, Luigi Semenzato wrote:
> This fixes a long-standing bug caused by the lack of separate
> COMM and EXEC record types, which makes "perf report" lose
> track of symbols when a process renames itself.
>
> With this fix (suggested by Stephane Eranian), a COMM (rename)
> no longer flushes the maps, which is the correct behavior.
> An EXEC also no longer flushes the maps, but this doesn't
> matter because as new mappings are created (for the executable
> and the libraries) the old mappings are automatically removed.
> This is not by accident: the functionality is necessary because
> DLLs can be explicitly loaded at any time with dlopen(),
> possibly on top of existing text, so "perf report" handles
> correctly the clobbering of new mappings on top of old ones.
>
> An alternative patch (which I proposed earlier) would be to
> introduce a separate PERF_RECORD_EXEC type, but it is a much
> larger change (about 300 lines) and is not necessary.
>
> Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
> ---
> tools/perf/util/thread.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
> index fb4b7ea..8b3e593 100644
> --- a/tools/perf/util/thread.c
> +++ b/tools/perf/util/thread.c
> @@ -39,7 +39,6 @@ int thread__set_comm(struct thread *self, const char *comm)
> err = self->comm == NULL ? -ENOMEM : 0;
> if (!err) {
> self->comm_set = true;
> - map_groups__flush(&self->mg);
> }
> return err;
> }
>
Acked-by: David Ahern <dsahern@gmail.com>
next prev parent reply other threads:[~2012-08-22 19:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 21:52 [PATCH] perf: do not flush maps on COMM for perf report Luigi Semenzato
2012-08-22 7:28 ` Ingo Molnar
2012-08-22 16:09 ` Luigi Semenzato
2012-08-22 16:29 ` Arnaldo Carvalho de Melo
2012-08-22 16:56 ` David Ahern
2012-08-22 18:16 ` Arnaldo Carvalho de Melo
2012-08-22 18:26 ` Luigi Semenzato
2012-08-22 18:42 ` David Ahern
2012-08-22 19:22 ` David Ahern [this message]
2012-10-24 6:04 ` [tip:perf/urgent] perf tools: " tip-bot for Luigi Semenzato
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=50353169.1080606@gmail.com \
--to=dsahern@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@profusion.mobi \
--cc=mingo@elte.hu \
--cc=namhyung@gmail.com \
--cc=oleg@redhat.com \
--cc=olofj@chromium.org \
--cc=paul.gortmaker@windriver.com \
--cc=paulus@samba.org \
--cc=rjw@sisk.pl \
--cc=robert.richter@amd.com \
--cc=segoon@openwall.com \
--cc=semenzato@chromium.org \
--cc=sonnyrao@chromium.org \
--cc=tj@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=wilsons@start.ca \
/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