diff for duplicates of <20101123163106.GA25677@debian> diff --git a/a/1.txt b/N1/1.txt index 806c62f..d8d2fc0 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,7 +1,7 @@ On Tue, Nov 23, 2010 at 04:07:39PM +0800, Ming Lei wrote: > 'perf test' is failed on linux 2.6.37-rc2/rc3, follows log info: > -> root at beagleboard:/mnt/omap/linux-2.6-omap/tools/perf# ./perf test -v 3 +> root@beagleboard:/mnt/omap/linux-2.6-omap/tools/perf# ./perf test -v 3 > 1: vmlinux symtab matches kallsyms: > --- start --- > dso__find_symbol_by_name ---- end ---- @@ -34,3 +34,36 @@ of other reasons: Maps only in kallsyms: ---- end ---- vmlinux symtab matches kallsyms: FAILED! + +>From e48b8a0dc149e3b8f249f46dc6e9c25e2cc58601 Mon Sep 17 00:00:00 2001 +From: Rabin Vincent <rabin@rab.in> +Date: Tue, 23 Nov 2010 21:35:56 +0530 +Subject: [PATCH] perf symbols: remove incorrect open-coded container_of() + +At least on ARM, padding is inserted between rb_node and sym in struct +symbol_name_rb_node, causing "((void *)sym) - sizeof(struct rb_node)" to +point inside rb_node rather than to the symbol_name_rb_node. Fix this +by converting the code to use container_of(). + +Signed-off-by: Rabin Vincent <rabin@rab.in> +--- + tools/perf/util/symbol.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c +index b39f499..0500895 100644 +--- a/tools/perf/util/symbol.c ++++ b/tools/perf/util/symbol.c +@@ -295,7 +295,9 @@ static void symbols__insert_by_name(struct rb_root *self, struct symbol *sym) + { + struct rb_node **p = &self->rb_node; + struct rb_node *parent = NULL; +- struct symbol_name_rb_node *symn = ((void *)sym) - sizeof(*parent), *s; ++ struct symbol_name_rb_node *symn, *s; ++ ++ symn = container_of(sym, struct symbol_name_rb_node, sym); + + while (*p != NULL) { + parent = *p; +-- +1.7.2.3 diff --git a/a/content_digest b/N1/content_digest index 6546289..3dcd5c2 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,14 +1,23 @@ "ref\0AANLkTik4QDCD0rAZ=04Ph23ApZ822BBoOWEiPEp7GBNr@mail.gmail.com\0" - "From\0rabin@rab.in (Rabin Vincent)\0" - "Subject\0'perf test' failed on ARM\0" + "From\0Rabin Vincent <rabin@rab.in>\0" + "Subject\0Re: 'perf test' failed on ARM\0" "Date\0Tue, 23 Nov 2010 22:08:18 +0530\0" - "To\0linux-arm-kernel@lists.infradead.org\0" + "To\0Ming Lei <tom.leiming@gmail.com>\0" + "Cc\0Ian Munsie <imunsie@au1.ibm.com>" + Peter Zijlstra <a.p.zijlstra@chello.nl> + Paul Mackerras <paulus@samba.org> + Ingo Molnar <mingo@elte.hu> + Arnaldo Carvalho de Melo <acme@ghostprotocols.net> + Tom Zanussi <tzanussi@gmail.com> + Thomas Gleixner <tglx@linutronix.de> + Linux Kernel Mailing List <linux-kernel@vger.kernel.org> + " linux-arm-kernel <linux-arm-kernel@lists.infradead.org>\0" "\00:1\0" "b\0" "On Tue, Nov 23, 2010 at 04:07:39PM +0800, Ming Lei wrote:\n" "> 'perf test' is failed on linux 2.6.37-rc2/rc3, follows log info:\n" "> \n" - "> root at beagleboard:/mnt/omap/linux-2.6-omap/tools/perf# ./perf test -v 3\n" + "> root@beagleboard:/mnt/omap/linux-2.6-omap/tools/perf# ./perf test -v 3\n" "> 1: vmlinux symtab matches kallsyms:\n" "> --- start ---\n" "> dso__find_symbol_by_name ---- end ----\n" @@ -40,6 +49,39 @@ " Maps in vmlinux with a different name in kallsyms:\n" " Maps only in kallsyms:\n" " ---- end ----\n" - vmlinux symtab matches kallsyms: FAILED! + " vmlinux symtab matches kallsyms: FAILED!\n" + "\n" + ">From e48b8a0dc149e3b8f249f46dc6e9c25e2cc58601 Mon Sep 17 00:00:00 2001\n" + "From: Rabin Vincent <rabin@rab.in>\n" + "Date: Tue, 23 Nov 2010 21:35:56 +0530\n" + "Subject: [PATCH] perf symbols: remove incorrect open-coded container_of()\n" + "\n" + "At least on ARM, padding is inserted between rb_node and sym in struct\n" + "symbol_name_rb_node, causing \"((void *)sym) - sizeof(struct rb_node)\" to\n" + "point inside rb_node rather than to the symbol_name_rb_node. Fix this\n" + "by converting the code to use container_of().\n" + "\n" + "Signed-off-by: Rabin Vincent <rabin@rab.in>\n" + "---\n" + " tools/perf/util/symbol.c | 4 +++-\n" + " 1 files changed, 3 insertions(+), 1 deletions(-)\n" + "\n" + "diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c\n" + "index b39f499..0500895 100644\n" + "--- a/tools/perf/util/symbol.c\n" + "+++ b/tools/perf/util/symbol.c\n" + "@@ -295,7 +295,9 @@ static void symbols__insert_by_name(struct rb_root *self, struct symbol *sym)\n" + " {\n" + " \tstruct rb_node **p = &self->rb_node;\n" + " \tstruct rb_node *parent = NULL;\n" + "-\tstruct symbol_name_rb_node *symn = ((void *)sym) - sizeof(*parent), *s;\n" + "+\tstruct symbol_name_rb_node *symn, *s;\n" + "+\n" + "+\tsymn = container_of(sym, struct symbol_name_rb_node, sym);\n" + " \n" + " \twhile (*p != NULL) {\n" + " \t\tparent = *p;\n" + "-- \n" + 1.7.2.3 -328c35c248256ab234a7d2370f9f9c36a70dcc00b6fae7db9512007e398d1907 +97a183ab48d3c7b4a2c9a8a448f7c4610cad8ae3e2780f685251f2ce12b46caa
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.