Re: [PATCH v4 3.0-rc2-tip 20/22] 20: perf: perf interface for uprobes

From: Masami Hiramatsu
Date: Fri Jun 10 2011 - 07:50:52 EST


(2011/06/07 22:02), Srikar Dronamraju wrote:
> Enhances perf probe to user space executables and libraries.
> Provides very basic support for uprobes.
>
> [ Probing a function in the executable using function name ]
> -------------------------------------------------------------
> [root@localhost ~]# perf probe -u zfree@/bin/zsh

Hmm, here, I have concern about the interface inconsistency
of the probe point syntax.

Since perf probe already supports debuginfo analysis,
it accepts following syntax;

[EVENT=]FUNC[@SRC][:RLN|+OFFS|%return|;PTN] [ARG ...]

Thus, The "@" should take a source file path, not binary path.

I think -u option should have a path of the target binary, as below

# perf probe -u /bin/zsh -a zfree

This will allow perf-probe to support user-space debuginfo
analysis. With it, we can do as below;

# perf probe -u /bin/zsh -a zfree@foo/bar.c:10

Please try to update tools/perf/Documentation/perf-probe.txt too,
then you'll see how the new syntax is different from current one :)

Thanks,



--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@xxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/