[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-9fdbf671ba7e8adb2cbb93d716232ebcab55f6bd@git.kernel.org>
Date: Tue, 23 Oct 2012 23:04:29 -0700
From: tip-bot for Luigi Semenzato <semenzato@...omium.org>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, eranian@...gle.com, mingo@...nel.org,
a.p.zijlstra@...llo.nl, wilsons@...rt.ca, semenzato@...omium.org,
viro@...iv.linux.org.uk, gregkh@...uxfoundation.org,
robert.richter@....com, fweisbec@...il.com, olofj@...omium.org,
akpm@...ux-foundation.org, dsahern@...il.com, ak@...ux.intel.com,
oleg@...hat.com, tglx@...utronix.de, rjw@...k.pl,
linux-kernel@...r.kernel.org, paulus@...ba.org, hpa@...or.com,
segoon@...nwall.com, lucas.demarchi@...fusion.mobi,
namhyung@...il.com, ebiederm@...ssion.com, tj@...nel.org,
sonnyrao@...omium.org, paul.gortmaker@...driver.com, mingo@...e.hu
Subject: [tip:perf/urgent] perf tools:
do not flush maps on COMM for perf report
Commit-ID: 9fdbf671ba7e8adb2cbb93d716232ebcab55f6bd
Gitweb: http://git.kernel.org/tip/9fdbf671ba7e8adb2cbb93d716232ebcab55f6bd
Author: Luigi Semenzato <semenzato@...omium.org>
AuthorDate: Tue, 21 Aug 2012 14:52:20 -0700
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 22 Oct 2012 13:55:53 -0200
perf tools: do not flush maps on COMM for perf report
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@...omium.org>
Tested-by: Stephane Eranian <eranian@...gle.com>
Acked-by: Stephane Eranian <eranian@...gle.com>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Alexander Viro <viro@...iv.linux.org.uk>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Lucas De Marchi <lucas.demarchi@...fusion.mobi>
Cc: Namhyung Kim <namhyung@...il.com>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Olof Johansson <olofj@...omium.org>
Cc: Paul Gortmaker <paul.gortmaker@...driver.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Robert Richter <robert.richter@....com>
Cc: Sonny Rao <sonnyrao@...omium.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Stephen Wilson <wilsons@...rt.ca>
Cc: Tejun Heo <tj@...nel.org>
Cc: Vasiliy Kulikov <segoon@...nwall.com>
Link: http://lkml.kernel.org/r/1345585940-6497-1-git-send-email-semenzato@chromium.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists