Skip to content

Commit 4f336dc

Browse files
valschneiderNeeraj Upadhyay
authored andcommitted
context_tracking, rcu: Rename rcu_dyntick trace event into rcu_watching
The "rcu_dyntick" naming convention has been turned into "rcu_watching" for all helpers now, align the trace event to that. To add to the confusion, the strings passed to the trace event are now reversed: when RCU "starts" the dyntick / EQS state, it "stops" watching. Signed-off-by: Valentin Schneider <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]> Signed-off-by: Neeraj Upadhyay <[email protected]>
1 parent c3dcd90 commit 4f336dc

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

include/trace/events/rcu.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -466,40 +466,40 @@ TRACE_EVENT(rcu_stall_warning,
466466
/*
467467
* Tracepoint for dyntick-idle entry/exit events. These take 2 strings
468468
* as argument:
469-
* polarity: "Start", "End", "StillNonIdle" for entering, exiting or still not
470-
* being in dyntick-idle mode.
469+
* polarity: "Start", "End", "StillWatching" for entering, exiting or still not
470+
* being in EQS mode.
471471
* context: "USER" or "IDLE" or "IRQ".
472472
* NMIs nested in IRQs are inferred with nesting > 1 in IRQ context.
473473
*
474474
* These events also take a pair of numbers, which indicate the nesting
475475
* depth before and after the event of interest, and a third number that is
476-
* the ->dynticks counter. Note that task-related and interrupt-related
476+
* the RCU_WATCHING counter. Note that task-related and interrupt-related
477477
* events use two separate counters, and that the "++=" and "--=" events
478478
* for irq/NMI will change the counter by two, otherwise by one.
479479
*/
480-
TRACE_EVENT_RCU(rcu_dyntick,
480+
TRACE_EVENT_RCU(rcu_watching,
481481

482-
TP_PROTO(const char *polarity, long oldnesting, long newnesting, int dynticks),
482+
TP_PROTO(const char *polarity, long oldnesting, long newnesting, int counter),
483483

484-
TP_ARGS(polarity, oldnesting, newnesting, dynticks),
484+
TP_ARGS(polarity, oldnesting, newnesting, counter),
485485

486486
TP_STRUCT__entry(
487487
__field(const char *, polarity)
488488
__field(long, oldnesting)
489489
__field(long, newnesting)
490-
__field(int, dynticks)
490+
__field(int, counter)
491491
),
492492

493493
TP_fast_assign(
494494
__entry->polarity = polarity;
495495
__entry->oldnesting = oldnesting;
496496
__entry->newnesting = newnesting;
497-
__entry->dynticks = dynticks;
497+
__entry->counter = counter;
498498
),
499499

500500
TP_printk("%s %lx %lx %#3x", __entry->polarity,
501501
__entry->oldnesting, __entry->newnesting,
502-
__entry->dynticks & 0xfff)
502+
__entry->counter & 0xfff)
503503
);
504504

505505
/*

kernel/context_tracking.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static void noinstr ct_kernel_exit(bool user, int offset)
137137

138138
instrumentation_begin();
139139
lockdep_assert_irqs_disabled();
140-
trace_rcu_dyntick(TPS("Start"), ct_nesting(), 0, ct_rcu_watching());
140+
trace_rcu_watching(TPS("End"), ct_nesting(), 0, ct_rcu_watching());
141141
WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && !user && !is_idle_task(current));
142142
rcu_preempt_deferred_qs(current);
143143

@@ -182,7 +182,7 @@ static void noinstr ct_kernel_enter(bool user, int offset)
182182
// instrumentation for the noinstr ct_kernel_enter_state()
183183
instrument_atomic_write(&ct->state, sizeof(ct->state));
184184

185-
trace_rcu_dyntick(TPS("End"), ct_nesting(), 1, ct_rcu_watching());
185+
trace_rcu_watching(TPS("Start"), ct_nesting(), 1, ct_rcu_watching());
186186
WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && !user && !is_idle_task(current));
187187
WRITE_ONCE(ct->nesting, 1);
188188
WARN_ON_ONCE(ct_nmi_nesting());
@@ -219,7 +219,7 @@ void noinstr ct_nmi_exit(void)
219219
* leave it in non-RCU-idle state.
220220
*/
221221
if (ct_nmi_nesting() != 1) {
222-
trace_rcu_dyntick(TPS("--="), ct_nmi_nesting(), ct_nmi_nesting() - 2,
222+
trace_rcu_watching(TPS("--="), ct_nmi_nesting(), ct_nmi_nesting() - 2,
223223
ct_rcu_watching());
224224
WRITE_ONCE(ct->nmi_nesting, /* No store tearing. */
225225
ct_nmi_nesting() - 2);
@@ -228,7 +228,7 @@ void noinstr ct_nmi_exit(void)
228228
}
229229

230230
/* This NMI interrupted an RCU-idle CPU, restore RCU-idleness. */
231-
trace_rcu_dyntick(TPS("Startirq"), ct_nmi_nesting(), 0, ct_rcu_watching());
231+
trace_rcu_watching(TPS("Endirq"), ct_nmi_nesting(), 0, ct_rcu_watching());
232232
WRITE_ONCE(ct->nmi_nesting, 0); /* Avoid store tearing. */
233233

234234
// instrumentation for the noinstr ct_kernel_exit_state()
@@ -294,7 +294,7 @@ void noinstr ct_nmi_enter(void)
294294
instrumentation_begin();
295295
}
296296

297-
trace_rcu_dyntick(incby == 1 ? TPS("Endirq") : TPS("++="),
297+
trace_rcu_watching(incby == 1 ? TPS("Startirq") : TPS("++="),
298298
ct_nmi_nesting(),
299299
ct_nmi_nesting() + incby, ct_rcu_watching());
300300
instrumentation_end();

0 commit comments

Comments
 (0)