[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-kx76xfqpnrpho5hdaapbqm09@git.kernel.org>
Date: Tue, 24 Mar 2015 09:30:02 -0700
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: paulus@...ba.org, jolsa@...nel.org, tglx@...utronix.de,
a.p.zijlstra@...llo.nl, adrian.hunter@...el.com,
eranian@...gle.com, cjashfor@...ux.vnet.ibm.com, hpa@...or.com,
linux-kernel@...r.kernel.org, mingo@...nel.org, dsahern@...il.com,
acme@...hat.com, fweisbec@...il.com, namhyung@...nel.org
Subject: [tip:perf/core] perf tools:
Try to lookup kernel module map before creating one
Commit-ID: bc84f464862489e687c98dea1a8ff20dc4413f93
Gitweb: http://git.kernel.org/tip/bc84f464862489e687c98dea1a8ff20dc4413f93
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Tue, 17 Feb 2015 17:31:18 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 23 Mar 2015 12:46:51 -0300
perf tools: Try to lookup kernel module map before creating one
Currently we assume machine__new_module is called only once for each
module so we create its map&dso unconditionally.
However it's possible that it's called multiple times for same module.
Like for perf record:
1) via machine__create_module during machine init
2) via kernel MMAP event processing
Trying to lookup kernel module map before creating one.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Acked-by: Namhyung Kim <namhyung@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/n/tip-kx76xfqpnrpho5hdaapbqm09@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/machine.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 1de5438..e335330 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -498,6 +498,11 @@ struct map *machine__new_module(struct machine *machine, u64 start,
if (kmod_path__parse_name(&m, filename))
return NULL;
+ map = map_groups__find_by_name(&machine->kmaps, MAP__FUNCTION,
+ m.name);
+ if (map)
+ goto out;
+
dso = machine__module_dso(machine, &m, filename);
if (dso == NULL)
goto out;
--
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