2012-05-23 09:33:15

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] trace-cmd: setting plugin to 'nop' clears data before it's recorded

On Sun, 2012-04-08 at 11:38 -0400, Mark Asselstine wrote:
> commit e09a5db1a929ab668c273b87c4f0a32b81e1c21a
> [trace-cmd: Add trace-cmd record --date option]
>
> moved the call to disable_all() in trace_record() from after record_data()
> to before it. Unfortunately disable_all() sets 'nop' in 'current_tracer'
> which has the side affect of clearing 'trace', thus all the latency tracer
> reports are empty/useless. Here we make disable_all() optionally call
> set_plugin() thus, where we need to, we can delay the disabling of the tracer
> until we have had a chance to capture 'trace'. We have added this delayed
> behavior to trace_record() to fix the latency reports, for all other calls to
> disable_all() we continue to have set_plugin() called.
>

Just letting you know that I just pushed your changes to my repo. Sorry
for being late, I got side-tracked, and forgot about your changes.

-- Steve


2012-05-23 13:26:04

by Mark Asselstine

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] trace-cmd: setting plugin to 'nop' clears data before it's recorded

On May 23, 2012 05:33:12 Steven Rostedt wrote:
> On Sun, 2012-04-08 at 11:38 -0400, Mark Asselstine wrote:
> > commit e09a5db1a929ab668c273b87c4f0a32b81e1c21a
> > [trace-cmd: Add trace-cmd record --date option]
> >
> > moved the call to disable_all() in trace_record() from after record_data()
> > to before it. Unfortunately disable_all() sets 'nop' in 'current_tracer'
> > which has the side affect of clearing 'trace', thus all the latency tracer
> > reports are empty/useless. Here we make disable_all() optionally call
> > set_plugin() thus, where we need to, we can delay the disabling of the
> > tracer until we have had a chance to capture 'trace'. We have added this
> > delayed behavior to trace_record() to fix the latency reports, for all
> > other calls to disable_all() we continue to have set_plugin() called.
>
> Just letting you know that I just pushed your changes to my repo. Sorry
> for being late, I got side-tracked, and forgot about your changes.
>
> -- Steve

No problem, happy to help.

Mark