Re: [PATCH] LTT for 2.5.38 1/9: Core infrastructure

Ingo Molnar
2002-09-22T22:11:17Z

On Sun, 22 Sep 2002, Karim Yaghmour wrote:

> > (this is in essence a moving spinlock at the tail of the trace buffer -
> > same problem.)
>
> Hmm. No offense, but I think you ought to take a better look at the
> code.

i have, and i see stuff like this:

+ TRACE_PROCESS(TRACE_EV_PROCESS_WAKEUP, p->pid, p->state);

+static inline void TRACE_PROCESS(u8 ev_id, u32 data1, u32 data2)
+{
+ trace_process proc_event;
+
+ proc_event.event_sub_id = ev_id;
+ proc_event.event_data1 = data1;
+ proc_event.event_data2 = data2;
+
+ trace_event(TRACE_EV_PROCESS, &proc_event);
+}

where trace_event() is defined as:

+int trace_event(u8 pm_event_id,
+ void *pm_event_struct)
[...]
+ read_lock(&tracer_register_lock);

ie. it's using a global spinlock. (sure, it can be made lockless, as other
tracers have done it.)

Ingo