perf misc cleanup
cover perf misc cleanup
Hi, Arnaldo
Could you take below 2 one-line patches?
[RESEND PATCH 1/2] perf probe: Fix the missed parameter initialization
[PATCH 2/2] perf annotate: Remove duplicate header file
Thanks,
Lin Ming
PATCH RESEND 1/2 perf probe: Fix the missed parameter initialization
pubname_callback_param::found should be initialized to 0 in fastpath lookup.
--- tools/perf/util/probe-finder.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
tools/perf/util/probe-finder.c +1 -0
@@ -1538,6 +1538,7 @@ static int find_probes(int fd, struct probe_finder *pf) .file = pp->file, .cu_die = &pf->cu_die, .sp_die = &pf->sp_die, + .found = 0, };struct dwarf_callback_param probe_param = { .data = pf,
Signature · 1 line
1.7.4.4
Re: [RESEND PATCH 1/2] perf probe: Fix the missed parameter initialization
Quoted 12 lines · Lin Ming
pubname_callback_param::foundshould be initialized to 0 in fastpath lookup.Signed-off-by Lin Ming <[email protected]>--- tools/perf/util/probe-finder.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)tools/perf/util/probe-finder.c +0
-0
tools/perf/util/probe-finder.c static int find_probes(int fd, struct probe_finder *pf) · line 1541
Quoted 4 lines
tools/perf/util/probe-finder.c +1
-0@@ -1538,6 +1538,7 @@ static int find_probes(int fd, struct probe_finder *pf) .file = pp->file, .cu_die = &pf->cu_die, .sp_die = &pf->sp_die, + .found = 0,
Hm, why is this a 'misc cleanup'? If this field is uninitialized (it does appear so) and we rely on the field then right now this is a bug and the fix should be pushed to perf/urgent.
Thanks,
Ingo
Re: [RESEND PATCH 1/2] perf probe: Fix the missed parameter initialization
Quoted 9 lines · Ingo Molnar
Quoted 7 lines · Lin Ming
pubname_callback_param::foundshould be initialized to 0 in fastpath lookup.Signed-off-by Lin Ming <[email protected]>--- tools/perf/util/probe-finder.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 11 lines
tools/perf/util/probe-finder.c static int find_probes(int fd, struct probe_finder *pf) · line 1541
Quoted 9 lines
tools/perf/util/probe-finder.c +1
-0@@ -1538,6 +1538,7 @@ static int find_probes(int fd, struct probe_finder *pf) .file = pp->file, .cu_die = &pf->cu_die, .sp_die = &pf->sp_die, + .found = 0,Hm, why is this a 'misc cleanup'? If this field is uninitialized (it does
I should call it 'misc cleanup and fix'.
Quoted 2 lines
appear so) and we rely on the field then right now this is a bug and the fix should be pushed to perf/urgent.
Indeed.
Quoted 4 lines
Thanks,
Ingo
Re: [RESEND PATCH 1/2] perf probe: Fix the missed parameter initialization
In reply to Lin MingEm Fri, Apr 29, 2011 at 08:41:57AM +0000, Lin Ming escreveu:
Quoted 1 line
pubname_callback_param::foundshould be initialized to 0 in fastpath lookup.
Is this really needed? Or is this just to stress it, for documentational purposes?
Quoted 19 lines
Signed-off-by Lin Ming <[email protected]>--- tools/perf/util/probe-finder.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)tools/perf/util/probe-finder.c +1
-0@@ -1538,6 +1538,7 @@ static int find_probes(int fd, struct probe_finder *pf) .file = pp->file, .cu_die = &pf->cu_die, .sp_die = &pf->sp_die, + .found = 0, };struct dwarf_callback_param probe_param = { .data = pf,Signature · 1 line
1.7.4.4
Re: [RESEND PATCH 1/2] perf probe: Fix the missed parameter initialization
Quoted 6 lines · Arnaldo Carvalho de Melo
Em Fri, Apr 29, 2011 at 08:41:57AM +0000, Lin Ming escreveu:
Quoted 1 line
pubname_callback_param::foundshould be initialized to 0 in fastpath lookup.Is this really needed? Or is this just to stress it, for documentational purposes?
Yes, this is really needed.
It should be initialized to 0, and pubname_search_cb will set it to 1 if the function is found.
Quoted 20 lines
Quoted 20 lines
Signed-off-by Lin Ming <[email protected]>--- tools/perf/util/probe-finder.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)tools/perf/util/probe-finder.c +1
-0@@ -1538,6 +1538,7 @@ static int find_probes(int fd, struct probe_finder *pf) .file = pp->file, .cu_die = &pf->cu_die, .sp_die = &pf->sp_die, + .found = 0, };struct dwarf_callback_param probe_param = { .data = pf,Signature · 1 line
1.7.4.4
Re: [RESEND PATCH 1/2] perf probe: Fix the missed parameter initialization
Quoted 5 lines · Lin Ming
Quoted 4 lines · Arnaldo Carvalho de Melo
Em Fri, Apr 29, 2011 at 08:41:57AM +0000, Lin Ming escreveu:
Quoted 1 line
pubname_callback_param::foundshould be initialized to 0 in fastpath lookup.
Quoted 7 lines
Quoted 2 lines
Is this really needed? Or is this just to stress it, for documentational purposes?
Yes, this is really needed.
It should be initialized to 0, and
pubname_search_cbwill set it to 1 if the function is found.
ping ...
Signature · 1 line
Lin Ming -- Intel Open Source Technology Center
[tip:perf/core] perf probe: Fix the missed parameter initialization
In reply to Lin MingCommit-ID: 2b348a77981227c6b64fb9cf19f7c711a6806bc9 Gitweb: http://git.kernel.org/tip/2b348a77981227c6b64fb9cf19f7c711a6806bc9 Author: Lin Ming <[email protected]> AuthorDate: Fri, 29 Apr 2011 08:41:57 +0000 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 10 May 2011 17:06:23 +0200
perf probe: Fix the missed parameter initialization
pubname_callback_param::found should be initialized to 0 in fastpath lookup, the structure is on the stack and uninitialized otherwise.
--- tools/perf/util/probe-finder.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
tools/perf/util/probe-finder.c +1 -0
@@ -1538,6 +1538,7 @@ static int find_probes(int fd, struct probe_finder *pf) .file = pp->file, .cu_die = &pf->cu_die, .sp_die = &pf->sp_die, + .found = 0, };struct dwarf_callback_param probe_param = { .data = pf,
PATCH 2/2 perf annotate: Remove duplicate header file
In reply to Lin Mingannotate.h was included twice, remove one.
--- tools/perf/util/ui/browsers/annotate.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
tools/perf/util/ui/browsers/annotate.c +0 -1
@@ -1,7 +1,6 @@#include "../browser.h" #include "../helpline.h" #include "../libslang.h" -#include "../../annotate.h" #include "../../hist.h" #include "../../sort.h" #include "../../symbol.h"
Signature · 1 line
1.7.4.4