Re: system gets stuck in a lock during boot

From: Peter Zijlstra
Date: Mon Aug 24 2009 - 01:59:38 EST

On Mon, 2009-08-24 at 10:41 +0800, Li Zefan wrote:

> > @@ -940,7 +940,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentr
> > entry = trace_create_file("enable", 0644, call->dir, call,
> > enable);
> >
> > - if (call->id)
> > + if (call->id && call->profile_enable)
> We do an extra check on ->profile_enable, shouldn't cause bug..
> > entry = trace_create_file("id", 0444, call->dir, call,
> > id);
> Any way, I don't think this commit does the right thing:
> - If CONFIG_EVENT_PROFILE=y, we'll create events/<dir>/<event>/id,
> except events/ftrace/<event>/id.
> - if CONFIG_EVENT_PROFILE=n, there's no 'id' file at all!
> I think it's better to skip ftrace/ dir in perf tool code, instead of
> skipping creating id files in ftrace code.

No, it does do the right thing. Your patch breaks things because not all
tracepoints are created through TRACE_EVENT() and will thus not have
their profile_enable/disable hooks set.

By giving them an ID file, there is no way to distinguish good from bad

Expempting ftrace is no solid solution, suppose someone else does a
TRACE_EVENT_FORMAT() tracepoint, how would you know you could use it as
a profile event source?

The id files really must stay conditional.

Aside from that, you only add #ifdef fuzz back which with his config is
moot, and shouldn't result in anything but a slightly bigger structure
to begin with.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at