Re: [PATCH] ftrace: add tracing_thresh support to function_graph tracer (v3)

Frederic Weisbecker
2010-02-27T10:26:07Z

On Fri, Feb 26, 2010 at 10:27:29AM -0800, Tim Bird wrote:
> On 02/25/2010 06:46 PM, Frederic Weisbecker wrote:
> >> +static int __init set_tracing_thresh(char *str)
> >> +{
> >> + unsigned long threshhold;
> >> + int ret;
> >> +
> >> + if (!str)
> >> + return 0;
> >> + ret = strict_strtoul(str, 0, &threshhold);
> >> + if (ret < 0)
> >> + return 0;
> >> + tracing_thresh = threshhold * 1000;
> >> + return 1;
> >> +}
> >> +__setup("tracing_thresh=", set_tracing_thresh);
> >
> > Looks like setting this, while the function graph tracer (normal
> > mode) is running, will have no effect. That said it's perfectly
> > fine as it would be pointless to change this value in the middle
> > of the tracing.
> >
> The command line is parsed before the tracer is activated, so
> tracing_thresh is set when trace_graph_init() is called, which
> results in the desired behaviour (that is, if you specify the
> tracing_thresh on the command line, you get the duration
> filtering on bootup).

Oh right, I made a confusion with the tracing_thresh file
write callback.