[Sheepdog] [PATCH v3] Add a ftrace-like trace utility
Liu Yuan
namei.unix at gmail.com
Thu Mar 1 03:38:44 CET 2012
On 03/01/2012 10:20 AM, Liu Yuan wrote:
> v3:
> - fix trace_lookup_ip()
> - fix main thread ring buffer init
> - fix pop_return_trace()
>
> v2:
> - use ring buffer for trace output
> - add a cat operation for collie
>
> This patch set aims to provide a ftrace-like trace utility for performance tuning
> of online system in production environment. This means virtually no overhead when
> disabled, rather low even enabled.
>
> Currently 'graph' tracer is implemented, accounting CPU usage at funciton granularity.
>
> The patch set achieves this by dynamically patching the binary code at runtime, making
> use of GCC -pg instrumentation features, which instrument a 5-bytes opcode in every function.
>
> When the trace is
> turned off, the opcode is patched as NOP opcode.
> turned on, the opcode is a call opcode to our trace functions and we can hook callbacks both for
> function entry and exit. This is how the patch atually calculate the time spent by function.
>
> The underlying infrastructure is quite modular, I hope we can implement other tracers that considered useful
> later.
>
Hi Kazum,
How is my patch that remove the coroutine usage? Is there any problem?
Currently, trace can't work with coroutine.
Thanks,
Yuan
More information about the sheepdog
mailing list