Re: [ftrace] possible to implement user-space tracers?
From: Kun Huang
Date: Tue Aug 11 2015 - 22:25:27 EST
Thank you for your help Scotty :) I'm reading it.
On Wed, Aug 12, 2015 at 2:34 AM, Scotty Bauer <sbauer@xxxxxxxxxxxx> wrote:
> It is possible to trace from userland, Android does it.
> Essentially you need to write your data into
> then read it out of /sys/kernel/debug/tracing/trace
> If you care how the implementation works you can read it in
> (http://lxr.free-electrons.com/source/kernel/trace/trace.c) search for
> tracing_mark_fops and tracing_fops.
> In Android here are the relevant files you will need to see how it's used in
> Atrace (for reading data out + setting things up):
> (host side setup of the device)
> trace-dev (for writing data in):
> Once we have all the data we usually run it through trace-viewer,
>> On 2015-08-11 06:53, Kun Huang wrote:
>>> Hi ftrace developers
>>> I'm developing a huge python based programs and facing performance
>>> issue everyday. I like the ftrace system and hope there could be a
>>> tracer to trace&report my python codes. Is it possible or is it
>>> to do this?
>>> 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/ 
>>  http://lxr.free-electrons.com/source/kernel/trace/trace.c
>>  https://github.com/catapult-project/catapult
>>  http://vger.kernel.org/majordomo-info.html
>>  http://www.tux.org/lkml/
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/