Re: [PATCH] perf/probe: Provide perf interface for uprobes

From: Arnaldo Carvalho de Melo
Date: Wed Apr 11 2012 - 14:17:50 EST


Em Wed, Apr 11, 2012 at 10:42:25PM +0530, Srikar Dronamraju escreveu:
> * Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxx> [2012-04-11 11:49:18]:
> > Em Wed, Apr 11, 2012 at 07:27:42PM +0530, Srikar Dronamraju escreveu:
> > > From: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx>
> > >
> > > - Enhances perf to probe user space executables and libraries.
> > > - Enhances -F/--funcs option of "perf probe" to list possible probe points in
> > > an executable file or library.
> > > - Documents userspace probing support in perf.
> > >
> > > [ Probing a function in the executable using function name ]
> > > perf probe -x /bin/zsh zfree
> >
> > Can we avoid the need for -x? I.e. we could figure out it is userspace
> > and act accordingly.
>
> To list the functions in the module ipv6, we use "perf probe -F -m ipv6"
> So I used the same logic to use -x for specifying executables.
>
> This is in agreement with probepoint addition where without any
> additional options would mean kernel probepoint; m option would mean
> module and x option would mean user space executable.
>
> However if you still think we should change, do let me know.

Yeah, if one needs to disambiguate, sure, use these keywords, but for
things like:

$ perf probe /lib/libc.so.6 malloc

I think it is easy to figure out it is userspace. I.e. some regex would
figure it out.

Anyway this can be done in a follow up patch.

- Arnaldo
--
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/