diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2010-08-02 22:11:36 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-06 15:25:56 -0400 |
commit | 58432e1f3625ef22b347ec8f9487e1852aa9ad67 (patch) | |
tree | 198f99b3f7260e30029146618fc80b019100766b /tools/perf | |
parent | e66b688c6456e6a607a1636e228fe0395d6c7214 (diff) |
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>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | 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 6c7750da43d7..525136684d4e 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) | |||
705 | pf->tvar->value = strdup(pf->pvar->var); | 705 | pf->tvar->value = strdup(pf->pvar->var); |
706 | if (pf->tvar->value == NULL) | 706 | if (pf->tvar->value == NULL) |
707 | return -ENOMEM; | 707 | return -ENOMEM; |
708 | else | 708 | if (pf->pvar->type) { |
709 | return 0; | 709 | pf->tvar->type = strdup(pf->pvar->type); |
710 | if (pf->tvar->type == NULL) | ||
711 | return -ENOMEM; | ||
712 | } | ||
713 | return 0; | ||
710 | } | 714 | } |
711 | 715 | ||
712 | pr_debug("Searching '%s' variable in context.\n", | 716 | pr_debug("Searching '%s' variable in context.\n", |