* [GIT PULL 0/1] perf/urgent symbols fix
@ 2010-09-09 23:56 Arnaldo Carvalho de Melo
2010-09-09 23:56 ` [PATCH 1/1] perf symbols: Fix multiple initialization of symbol system Arnaldo Carvalho de Melo
2010-09-10 5:33 ` [GIT PULL 0/1] perf/urgent symbols fix Ingo Molnar
0 siblings, 2 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-09-09 23:56 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Davidlohr Bueso, Jovi Zhang
Hi Ingo,
Please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/urgent
Regards,
- Arnaldo
Jovi Zhang (1):
perf symbols: Fix multiple initialization of symbol system
tools/perf/util/symbol.c | 7 +++++++
tools/perf/util/symbol.h | 3 ++-
2 files changed, 9 insertions(+), 1 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] perf symbols: Fix multiple initialization of symbol system
2010-09-09 23:56 [GIT PULL 0/1] perf/urgent symbols fix Arnaldo Carvalho de Melo
@ 2010-09-09 23:56 ` Arnaldo Carvalho de Melo
2010-09-10 5:33 ` [GIT PULL 0/1] perf/urgent symbols fix Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-09-09 23:56 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Jovi Zhang, Davidlohr Bueso, Arnaldo Carvalho de Melo
From: Jovi Zhang <bookjovi@gmail.com>
By returning immediately if it was already initialized, do it as well at
symbol__exit, refusing multiple deinitializations.
This fixes problems in the kmem, sched and timechart commands.
Reported-by: Davidlohr Bueso <dave@gnu.org>
Cc: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Jovi Zhang <bookjovi@gmail.com>
LKML-Reference: AANLkTi=9Cn=R8SPMCRp5z+gEjXbaBHeb-AaOtRbuwwcn@mail.gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol.c | 7 +++++++
tools/perf/util/symbol.h | 3 ++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 1a36773..b2f5ae9 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -2268,6 +2268,9 @@ static int setup_list(struct strlist **list, const char *list_str,
int symbol__init(void)
{
+ if (symbol_conf.initialized)
+ return 0;
+
elf_version(EV_CURRENT);
if (symbol_conf.sort_by_name)
symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) -
@@ -2293,6 +2296,7 @@ int symbol__init(void)
symbol_conf.sym_list_str, "symbol") < 0)
goto out_free_comm_list;
+ symbol_conf.initialized = true;
return 0;
out_free_dso_list:
@@ -2304,11 +2308,14 @@ out_free_comm_list:
void symbol__exit(void)
{
+ if (!symbol_conf.initialized)
+ return;
strlist__delete(symbol_conf.sym_list);
strlist__delete(symbol_conf.dso_list);
strlist__delete(symbol_conf.comm_list);
vmlinux_path__exit();
symbol_conf.sym_list = symbol_conf.dso_list = symbol_conf.comm_list = NULL;
+ symbol_conf.initialized = false;
}
int machines__create_kernel_maps(struct rb_root *self, pid_t pid)
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index b7a8da4..ea95c27 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -69,7 +69,8 @@ struct symbol_conf {
show_nr_samples,
use_callchain,
exclude_other,
- show_cpu_utilization;
+ show_cpu_utilization,
+ initialized;
const char *vmlinux_name,
*source_prefix,
*field_sep;
--
1.6.2.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [GIT PULL 0/1] perf/urgent symbols fix
2010-09-09 23:56 [GIT PULL 0/1] perf/urgent symbols fix Arnaldo Carvalho de Melo
2010-09-09 23:56 ` [PATCH 1/1] perf symbols: Fix multiple initialization of symbol system Arnaldo Carvalho de Melo
@ 2010-09-10 5:33 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2010-09-10 5:33 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, Davidlohr Bueso, Jovi Zhang
* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> Hi Ingo,
>
> Please pull from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/urgent
>
> Regards,
>
> - Arnaldo
>
> Jovi Zhang (1):
> perf symbols: Fix multiple initialization of symbol system
>
> tools/perf/util/symbol.c | 7 +++++++
> tools/perf/util/symbol.h | 3 ++-
> 2 files changed, 9 insertions(+), 1 deletions(-)
Pulled, thanks Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-10 5:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-09 23:56 [GIT PULL 0/1] perf/urgent symbols fix Arnaldo Carvalho de Melo
2010-09-09 23:56 ` [PATCH 1/1] perf symbols: Fix multiple initialization of symbol system Arnaldo Carvalho de Melo
2010-09-10 5:33 ` [GIT PULL 0/1] perf/urgent symbols fix Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®