Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58432e1f authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
LKML-Reference: <4C577AD8.50808@hitachi.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e66b688c
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -705,7 +705,11 @@ static int find_variable(Dwarf_Die *sp_die, struct probe_finder *pf)
		pf->tvar->value = strdup(pf->pvar->var);
		pf->tvar->value = strdup(pf->pvar->var);
		if (pf->tvar->value == NULL)
		if (pf->tvar->value == NULL)
			return -ENOMEM;
			return -ENOMEM;
		else
		if (pf->pvar->type) {
			pf->tvar->type = strdup(pf->pvar->type);
			if (pf->tvar->type == NULL)
				return -ENOMEM;
		}
		return 0;
		return 0;
	}
	}