lkml.org 
[lkml]   [2017]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 2/2] tracing: Add support for preempt and irq enable/disable events
On Fri, 6 Oct 2017 00:28:21 -0700
Joel Fernandes <joelaf@google.com> wrote:


> Oh ok. So I traced this down to the original patch that added
> time_hardirqs_off to lockdep. I *think* it was added just to keep the
> irqsoff tracer working while lockdep is enabled, so that both lockdep
> and the tracer would work at the same time. So I guess nobody noticed
> any issues because nobody noticed or cared to check if irqsoff tracer
> showed the same results with lockdep enabled vs disabled.

As one of the main users of preemptirqsoff tracer, I can tell you that
we didn't care ;-)

Yes, it was added to keep them both working. It's dangerous to use
CALLER_ADDR1, as lockdep can be called by the top frame, and ADDR1
would go off the stack frame and cause a fault. I just put in ADDR0
as filler as it required something to be added.

We added a stack dump on new max latencies to figure out where the
problem occurred.

-- Steve


>
> I think the correct way this should be rewritten is lockdep should use
> register_trace_* to register callbacks onto the new tracepoints I'm
> adding. I am working on a patch that does something like this and gets
> rid of the time_* functions. I will try to have an RFC out by the
> weekend if I hopefully don't hit any roadblocks.
>
> thanks!
>
> - Joel

\
 
 \ /
  Last update: 2017-10-06 15:39    [W:0.049 / U:38.596 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site