* Access to backtraces from user-space tracepoint callback in perf-script?
@ 2014-04-29 15:44 Milian Wolff
2014-05-07 12:46 ` Milian Wolff
0 siblings, 1 reply; 7+ messages in thread
From: Milian Wolff @ 2014-04-29 15:44 UTC (permalink / raw)
To: linux-perf-users
Hello,
today I played around with perf-script(-python) and custom tracepoints. What I
could not figure out so far is how to print a backtrace from the python
callback. Can someone explain me how this is done, or point me to the
documentation for this?
Bye
--
Milian Wolff
mail@milianw.de
http://milianw.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Access to backtraces from user-space tracepoint callback in perf-script?
2014-04-29 15:44 Access to backtraces from user-space tracepoint callback in perf-script? Milian Wolff
@ 2014-05-07 12:46 ` Milian Wolff
2014-05-14 0:33 ` Namhyung Kim
0 siblings, 1 reply; 7+ messages in thread
From: Milian Wolff @ 2014-05-07 12:46 UTC (permalink / raw)
To: linux-perf-users
On Tuesday 29 April 2014 17:44:54 Milian Wolff wrote:
> Hello,
>
> today I played around with perf-script(-python) and custom tracepoints. What
> I could not figure out so far is how to print a backtrace from the python
> callback. Can someone explain me how this is done, or point me to the
> documentation for this?
Ping? Could someone help me here please?
--
Milian Wolff
mail@milianw.de
http://milianw.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Access to backtraces from user-space tracepoint callback in perf-script?
2014-05-07 12:46 ` Milian Wolff
@ 2014-05-14 0:33 ` Namhyung Kim
2014-05-14 8:47 ` Milian Wolff
0 siblings, 1 reply; 7+ messages in thread
From: Namhyung Kim @ 2014-05-14 0:33 UTC (permalink / raw)
To: Milian Wolff; +Cc: linux-perf-users
Hi Milian,
On Wed, 07 May 2014 14:46:31 +0200, Milian Wolff wrote:
> On Tuesday 29 April 2014 17:44:54 Milian Wolff wrote:
>> Hello,
>>
>> today I played around with perf-script(-python) and custom tracepoints. What
>> I could not figure out so far is how to print a backtrace from the python
>> callback. Can someone explain me how this is done, or point me to the
>> documentation for this?
>
> Ping? Could someone help me here please?
As far as I know it's not possible currently.. I vaguely recall that
there's a patch to support the feature but unfortunately it didn't get
reviews..
Thanks,
Namhyung
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Access to backtraces from user-space tracepoint callback in perf-script?
2014-05-14 0:33 ` Namhyung Kim
@ 2014-05-14 8:47 ` Milian Wolff
2014-05-16 15:57 ` Frank Ch. Eigler
0 siblings, 1 reply; 7+ messages in thread
From: Milian Wolff @ 2014-05-14 8:47 UTC (permalink / raw)
To: linux-perf-users
On Wednesday 14 May 2014 09:33:35 Namhyung Kim wrote:
> Hi Milian,
>
> On Wed, 07 May 2014 14:46:31 +0200, Milian Wolff wrote:
> > On Tuesday 29 April 2014 17:44:54 Milian Wolff wrote:
> >> Hello,
> >>
> >> today I played around with perf-script(-python) and custom tracepoints.
> >> What I could not figure out so far is how to print a backtrace from the
> >> python callback. Can someone explain me how this is done, or point me to
> >> the documentation for this?
> >
> > Ping? Could someone help me here please?
>
> As far as I know it's not possible currently.. I vaguely recall that
> there's a patch to support the feature but unfortunately it didn't get
> reviews..
Is it this one: https://lkml.org/lkml/2014/4/3/217 ?
If so, could I kindly ask the perf developers to take a look at that? It would
be an immensely useful feature for third-party tool developers to have.
Cheers
--
Milian Wolff
mail@milianw.de
http://milianw.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Access to backtraces from user-space tracepoint callback in perf-script?
2014-05-14 8:47 ` Milian Wolff
@ 2014-05-16 15:57 ` Frank Ch. Eigler
2014-05-17 11:24 ` Milian Wolff
0 siblings, 1 reply; 7+ messages in thread
From: Frank Ch. Eigler @ 2014-05-16 15:57 UTC (permalink / raw)
To: Milian Wolff; +Cc: linux-perf-users
Milian Wolff <mail@milianw.de> writes:
> [...]
>> >> today I played around with perf-script(-python) and custom tracepoints.
>> >> What I could not figure out so far is how to print a backtrace from the
>> >> python callback. [...]
While you wait, you might try systemtap, wherein there exists support
not just for plain C-level backtracing (print_ubacktrace() as for any
other program), but also python source-level backtracing (via a tapset
function).
https://sourceware.org/systemtap/examples/#general/py2example.stp
- FChE
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Access to backtraces from user-space tracepoint callback in perf-script?
2014-05-16 15:57 ` Frank Ch. Eigler
@ 2014-05-17 11:24 ` Milian Wolff
2014-05-17 14:31 ` David Ahern
0 siblings, 1 reply; 7+ messages in thread
From: Milian Wolff @ 2014-05-17 11:24 UTC (permalink / raw)
To: Frank Ch. Eigler; +Cc: linux-perf-users
On Friday 16 May 2014 11:57:02 Frank Ch. Eigler wrote:
> Milian Wolff <mail@milianw.de> writes:
> > [...]
> >
> >> >> today I played around with perf-script(-python) and custom
> >> >> tracepoints.
> >> >> What I could not figure out so far is how to print a backtrace from
> >> >> the
> >> >> python callback. [...]
>
> While you wait, you might try systemtap, wherein there exists support
> not just for plain C-level backtracing (print_ubacktrace() as for any
> other program), but also python source-level backtracing (via a tapset
> function).
>
> https://sourceware.org/systemtap/examples/#general/py2example.stp
Hey,
thanks for the hint. But I never got SystemTap to work on any of my machines
:-/
For now I'll stick to manual libunwind + libbacktrace + LD_PRELOAD tracing.
But I'd love to see this available in perf eventually.
Bye
--
Milian Wolff
mail@milianw.de
http://milianw.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Access to backtraces from user-space tracepoint callback in perf-script?
2014-05-17 11:24 ` Milian Wolff
@ 2014-05-17 14:31 ` David Ahern
0 siblings, 0 replies; 7+ messages in thread
From: David Ahern @ 2014-05-17 14:31 UTC (permalink / raw)
To: Milian Wolff, Frank Ch. Eigler; +Cc: linux-perf-users
On 5/17/14, 5:24 AM, Milian Wolff wrote:
> On Friday 16 May 2014 11:57:02 Frank Ch. Eigler wrote:
>> Milian Wolff <mail@milianw.de> writes:
>>> [...]
>>>
>>>>>> today I played around with perf-script(-python) and custom
>>>>>> tracepoints.
>>>>>> What I could not figure out so far is how to print a backtrace from
>>>>>> the
>>>>>> python callback. [...]
>>
>> While you wait, you might try systemtap, wherein there exists support
>> not just for plain C-level backtracing (print_ubacktrace() as for any
>> other program), but also python source-level backtracing (via a tapset
>> function).
>>
>> https://sourceware.org/systemtap/examples/#general/py2example.stp
>
> Hey,
>
> thanks for the hint. But I never got SystemTap to work on any of my machines
> :-/
>
> For now I'll stick to manual libunwind + libbacktrace + LD_PRELOAD tracing.
> But I'd love to see this available in perf eventually.
>
Did you try the patch to perf? Does it give you access to the callchain
in python scripts like you want?
David
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-05-17 14:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-29 15:44 Access to backtraces from user-space tracepoint callback in perf-script? Milian Wolff
2014-05-07 12:46 ` Milian Wolff
2014-05-14 0:33 ` Namhyung Kim
2014-05-14 8:47 ` Milian Wolff
2014-05-16 15:57 ` Frank Ch. Eigler
2014-05-17 11:24 ` Milian Wolff
2014-05-17 14:31 ` David Ahern
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.