[CTRACER]: Fully qualify the probe by using the CU name
I.e. now we use this systemtap syntax: probe mtrr_write = kernel.function("mtrr_write@arch/i386/kernel/cpu/mtrr/if.c") mtrr_write is the function, followed by @ and then the CU, i.e. the source for the object file (CU) where the function is. This way we can support global namespace clashes. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
06b3a1073e
commit
4e406446d0
|
@ -745,13 +745,14 @@ static int function__emit_probes(struct function *self, const struct cu *cu,
|
|||
struct parameter *pos;
|
||||
const char *name = function__name(self, cu);
|
||||
|
||||
fprintf(fp_methods, "probe %s%s = kernel.function(\"%s\")%s\n"
|
||||
fprintf(fp_methods, "probe %s%s = kernel.function(\"%s@%s\")%s\n"
|
||||
"{\n"
|
||||
"}\n\n"
|
||||
"probe %s%s\n"
|
||||
"{\n", name,
|
||||
probe_type == 0 ? "" : "__return",
|
||||
name,
|
||||
cu->name,
|
||||
probe_type == 0 ? "" : ".return",
|
||||
name,
|
||||
probe_type == 0 ? "" : "__return");
|
||||
|
|
Loading…
Reference in New Issue