Re: [PATCH v7 2/2] tracing: Add support for preempt and irq enable/disable events
From: Joel Fernandes
Date: Wed Oct 04 2017 - 12:56:40 EST
Hi Steven,
On Wed, Oct 4, 2017 at 9:44 AM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> On Wed, 4 Oct 2017 18:04:34 +0200
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
>> On Fri, Sep 29, 2017 at 02:22:45PM -0700, Joel Fernandes wrote:
>> > +++ b/kernel/trace/trace_irqsoff.c
>>
>> > EXPORT_SYMBOL(trace_hardirqs_on);
>> > EXPORT_SYMBOL(trace_hardirqs_off);
>> > EXPORT_SYMBOL(trace_hardirqs_on_caller);
>> > EXPORT_SYMBOL(trace_hardirqs_off_caller);
>>
>> Steve, how does this compiler with lockdep enabled? Because:
>>
>> kernel/locking/lockdep.c:EXPORT_SYMBOL(trace_hardirqs_on_caller);
>> kernel/locking/lockdep.c:EXPORT_SYMBOL(trace_hardirqs_on);
>> kernel/locking/lockdep.c:EXPORT_SYMBOL(trace_hardirqs_off_caller);
>> kernel/locking/lockdep.c:EXPORT_SYMBOL(trace_hardirqs_off);
>
> I'll have to see if it does, I haven't applied them yet. Looks like
> they were removed from the:
>
> #ifdef CONFIG_PROVE_LOCKING
>
> [..]
>
> #else /* !CONFIG_PROVE_LOCKING */
>
> <here>
>
> #endif
>
>
> I don't see the protection in the patches. I will definitely test that
> before pushing it anywhere.
The protection added by CONFIG_PROVE_LOCKING was already there before
my patches. I just moved the code around in patch 1/2, nothing changed
in that patch. I already tested the combination of PROVE_LOCKING
enabled and disabled and several other combinations on your -next
tree. It all compiled fine. Here is my test script FWIW:
(By the way, do you mean that another tree/branch than your -next or
Linus's master has protection removed? If so, could you let me know
which tree/branch?)
#!/bin/bash -x
set -e
function disable_all() {
make x86_64_defconfig
./scripts/config --disable CONFIG_PREEMPTIRQ_EVENTS
./scripts/config --disable CONFIG_IRQSOFF_TRACER
./scripts/config --disable CONFIG_PREEMPT_TRACER
./scripts/config --disable CONFIG_PREEMPT
./scripts/config --disable CONFIG_PROVE_LOCKING
}
function build_all() {
make olddefconfig
make -j8
}
disable_all
./scripts/config --enable CONFIG_IRQSOFF_TRACER
build_all
disable_all
./scripts/config --enable CONFIG_PREEMPT
./scripts/config --enable CONFIG_PREEMPTIRQ_EVENTS
build_all
disable_all
./scripts/config --enable CONFIG_PROVE_LOCKING
build_all
disable_all
./scripts/config --enable CONFIG_PROVE_LOCKING
./scripts/config --enable CONFIG_PREEMPT
./scripts/config --enable CONFIG_PREEMPT_TRACER
build_all
disable_all
./scripts/config --enable CONFIG_PROVE_LOCKING
./scripts/config --enable CONFIG_IRQSOFF_TRACER
build_all
disable_all
./scripts/config --enable CONFIG_PROVE_LOCKING
./scripts/config --enable CONFIG_PREEMPT
./scripts/config --enable CONFIG_PREEMPTIRQ_EVENTS
build_all
disable_all
./scripts/config --enable CONFIG_PROVE_LOCKING
./scripts/config --enable CONFIG_PREEMPT
./scripts/config --enable CONFIG_PREEMPTIRQ_EVENTS
./scripts/config --enable CONFIG_PREEMPT_TRACER
./scripts/config --enable CONFIG_IRQSOFF_TRACER
build_all