* [PATCH 1/2] [BUGFIX] perf probe: Fix to copy the type for raw parameters
@ 2010-08-03 2:11 Masami Hiramatsu
2010-08-06 7:17 ` Masami Hiramatsu
2010-08-07 7:00 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
0 siblings, 2 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2010-08-03 2:11 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Masami Hiramatsu, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Arnaldo Carvalho de Melo, Frederic Weisbecker, linux-kernel,
2nddept-manager
Copy type field if it is for raw parameters.
Without this fix, perf probe drops the type if user passes it
for raw parameters (e.g. %ax:u32 will be converted to %ax).
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: linux-kernel@vger.kernel.org
---
tools/perf/util/probe-finder.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 840f1aa..b69d194 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -706,8 +706,12 @@ static int find_variable(Dwarf_Die *sp_die, struct probe_finder *pf)
pf->tvar->value = strdup(pf->pvar->var);
if (pf->tvar->value == NULL)
return -ENOMEM;
- else
- return 0;
+ if (pf->pvar->type) {
+ pf->tvar->type = strdup(pf->pvar->type);
+ if (pf->tvar->type == NULL)
+ return -ENOMEM;
+ }
+ return 0;
}
pr_debug("Searching '%s' variable in context.\n",
--
Masami HIRAMATSU
2nd Research Dept.
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] [BUGFIX] perf probe: Fix to copy the type for raw parameters
2010-08-03 2:11 [PATCH 1/2] [BUGFIX] perf probe: Fix to copy the type for raw parameters Masami Hiramatsu
@ 2010-08-06 7:17 ` Masami Hiramatsu
2010-08-06 14:10 ` Arnaldo Carvalho de Melo
2010-08-07 7:00 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
1 sibling, 1 reply; 4+ messages in thread
From: Masami Hiramatsu @ 2010-08-06 7:17 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Frederic Weisbecker,
linux-kernel, 2nddept-manager
Masami Hiramatsu wrote:
> Copy type field if it is for raw parameters.
> Without this fix, perf probe drops the type if user passes it
> for raw parameters (e.g. %ax:u32 will be converted to %ax).
Hi Arnaldo,
Could you pick these patches?
Thank you,
>
> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: linux-kernel@vger.kernel.org
> ---
>
> tools/perf/util/probe-finder.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> index 840f1aa..b69d194 100644
> --- a/tools/perf/util/probe-finder.c
> +++ b/tools/perf/util/probe-finder.c
> @@ -706,8 +706,12 @@ static int find_variable(Dwarf_Die *sp_die, struct probe_finder *pf)
> pf->tvar->value = strdup(pf->pvar->var);
> if (pf->tvar->value == NULL)
> return -ENOMEM;
> - else
> - return 0;
> + if (pf->pvar->type) {
> + pf->tvar->type = strdup(pf->pvar->type);
> + if (pf->tvar->type == NULL)
> + return -ENOMEM;
> + }
> + return 0;
> }
>
> pr_debug("Searching '%s' variable in context.\n",
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] [BUGFIX] perf probe: Fix to copy the type for raw parameters
2010-08-06 7:17 ` Masami Hiramatsu
@ 2010-08-06 14:10 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-08-06 14:10 UTC (permalink / raw)
To: Masami Hiramatsu
Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Frederic Weisbecker,
linux-kernel, 2nddept-manager
Em Fri, Aug 06, 2010 at 04:17:59PM +0900, Masami Hiramatsu escreveu:
> Masami Hiramatsu wrote:
> > Copy type field if it is for raw parameters.
> > Without this fix, perf probe drops the type if user passes it
> > for raw parameters (e.g. %ax:u32 will be converted to %ax).
> Hi Arnaldo,
>
> Could you pick these patches?
Sure.
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/core] perf probe: Fix to copy the type for raw parameters
2010-08-03 2:11 [PATCH 1/2] [BUGFIX] perf probe: Fix to copy the type for raw parameters Masami Hiramatsu
2010-08-06 7:17 ` Masami Hiramatsu
@ 2010-08-07 7:00 ` tip-bot for Masami Hiramatsu
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Masami Hiramatsu @ 2010-08-07 7:00 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, hpa, mingo, a.p.zijlstra,
masami.hiramatsu.pt, fweisbec, tglx, mingo
Commit-ID: 58432e1f3625ef22b347ec8f9487e1852aa9ad67
Gitweb: http://git.kernel.org/tip/58432e1f3625ef22b347ec8f9487e1852aa9ad67
Author: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
AuthorDate: Tue, 3 Aug 2010 11:11:36 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 6 Aug 2010 16:25:56 -0300
perf probe: Fix to copy the type for raw parameters
Copy type field if it is for raw parameters.
Without this fix, perf probe drops the type if user passes it
for raw parameters (e.g. %ax:u32 will be converted to %ax).
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
LKML-Reference: <4C577AD8.50808@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-finder.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 6c7750d..5251366 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -705,8 +705,12 @@ static int find_variable(Dwarf_Die *sp_die, struct probe_finder *pf)
pf->tvar->value = strdup(pf->pvar->var);
if (pf->tvar->value == NULL)
return -ENOMEM;
- else
- return 0;
+ if (pf->pvar->type) {
+ pf->tvar->type = strdup(pf->pvar->type);
+ if (pf->tvar->type == NULL)
+ return -ENOMEM;
+ }
+ return 0;
}
pr_debug("Searching '%s' variable in context.\n",
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-07 7:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03 2:11 [PATCH 1/2] [BUGFIX] perf probe: Fix to copy the type for raw parameters Masami Hiramatsu
2010-08-06 7:17 ` Masami Hiramatsu
2010-08-06 14:10 ` Arnaldo Carvalho de Melo
2010-08-07 7:00 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).