diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2012-02-07 09:40:30 -0500 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2012-02-13 09:14:43 -0500 |
| commit | 484546509ce5d49d43ec0a6eb2141c6bf3362bfc (patch) | |
| tree | 22145ca23b08aee51d17f335897e035a20a96dcc | |
| parent | 2fbb90db1b8fcc78f43830f1a009f3af243c5f42 (diff) | |
x86/tracing: Denote the power and cpuidle tracepoints as _rcuidle()
The power and cpuidle tracepoints are called within a rcu_idle_exit()
section, and must be denoted with the _rcuidle() version of the tracepoint.
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rw-r--r-- | arch/x86/kernel/process.c | 24 | ||||
| -rw-r--r-- | include/trace/events/power.h | 2 |
2 files changed, 14 insertions, 12 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 15763af7bfe3..44eefde92109 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
| @@ -377,8 +377,8 @@ static inline int hlt_use_halt(void) | |||
| 377 | void default_idle(void) | 377 | void default_idle(void) |
| 378 | { | 378 | { |
| 379 | if (hlt_use_halt()) { | 379 | if (hlt_use_halt()) { |
| 380 | trace_power_start(POWER_CSTATE, 1, smp_processor_id()); | 380 | trace_power_start_rcuidle(POWER_CSTATE, 1, smp_processor_id()); |
| 381 | trace_cpu_idle(1, smp_processor_id()); | 381 | trace_cpu_idle_rcuidle(1, smp_processor_id()); |
| 382 | current_thread_info()->status &= ~TS_POLLING; | 382 | current_thread_info()->status &= ~TS_POLLING; |
| 383 | /* | 383 | /* |
| 384 | * TS_POLLING-cleared state must be visible before we | 384 | * TS_POLLING-cleared state must be visible before we |
| @@ -391,8 +391,8 @@ void default_idle(void) | |||
| 391 | else | 391 | else |
| 392 | local_irq_enable(); | 392 | local_irq_enable(); |
| 393 | current_thread_info()->status |= TS_POLLING; | 393 | current_thread_info()->status |= TS_POLLING; |
| 394 | trace_power_end(smp_processor_id()); | 394 | trace_power_end_rcuidle(smp_processor_id()); |
| 395 | trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); | 395 | trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); |
| 396 | } else { | 396 | } else { |
| 397 | local_irq_enable(); | 397 | local_irq_enable(); |
| 398 | /* loop is done by the caller */ | 398 | /* loop is done by the caller */ |
| @@ -450,8 +450,8 @@ EXPORT_SYMBOL_GPL(cpu_idle_wait); | |||
| 450 | static void mwait_idle(void) | 450 | static void mwait_idle(void) |
| 451 | { | 451 | { |
| 452 | if (!need_resched()) { | 452 | if (!need_resched()) { |
| 453 | trace_power_start(POWER_CSTATE, 1, smp_processor_id()); | 453 | trace_power_start_rcuidle(POWER_CSTATE, 1, smp_processor_id()); |
| 454 | trace_cpu_idle(1, smp_processor_id()); | 454 | trace_cpu_idle_rcuidle(1, smp_processor_id()); |
| 455 | if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR)) | 455 | if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR)) |
| 456 | clflush((void *)¤t_thread_info()->flags); | 456 | clflush((void *)¤t_thread_info()->flags); |
| 457 | 457 | ||
| @@ -461,8 +461,8 @@ static void mwait_idle(void) | |||
| 461 | __sti_mwait(0, 0); | 461 | __sti_mwait(0, 0); |
| 462 | else | 462 | else |
| 463 | local_irq_enable(); | 463 | local_irq_enable(); |
| 464 | trace_power_end(smp_processor_id()); | 464 | trace_power_end_rcuidle(smp_processor_id()); |
| 465 | trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); | 465 | trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); |
| 466 | } else | 466 | } else |
| 467 | local_irq_enable(); | 467 | local_irq_enable(); |
| 468 | } | 468 | } |
| @@ -474,13 +474,13 @@ static void mwait_idle(void) | |||
| 474 | */ | 474 | */ |
| 475 | static void poll_idle(void) | 475 | static void poll_idle(void) |
| 476 | { | 476 | { |
| 477 | trace_power_start(POWER_CSTATE, 0, smp_processor_id()); | 477 | trace_power_start_rcuidle(POWER_CSTATE, 0, smp_processor_id()); |
| 478 | trace_cpu_idle(0, smp_processor_id()); | 478 | trace_cpu_idle_rcuidle(0, smp_processor_id()); |
| 479 | local_irq_enable(); | 479 | local_irq_enable(); |
| 480 | while (!need_resched()) | 480 | while (!need_resched()) |
| 481 | cpu_relax(); | 481 | cpu_relax(); |
| 482 | trace_power_end(smp_processor_id()); | 482 | trace_power_end_rcuidle(smp_processor_id()); |
| 483 | trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); | 483 | trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); |
| 484 | } | 484 | } |
| 485 | 485 | ||
| 486 | /* | 486 | /* |
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index 1bcc2a8c00e2..14b38940062b 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h | |||
| @@ -151,6 +151,8 @@ enum { | |||
| 151 | events get removed */ | 151 | events get removed */ |
| 152 | static inline void trace_power_start(u64 type, u64 state, u64 cpuid) {}; | 152 | static inline void trace_power_start(u64 type, u64 state, u64 cpuid) {}; |
| 153 | static inline void trace_power_end(u64 cpuid) {}; | 153 | static inline void trace_power_end(u64 cpuid) {}; |
| 154 | static inline void trace_power_start_rcuidle(u64 type, u64 state, u64 cpuid) {}; | ||
| 155 | static inline void trace_power_end_rcuidle(u64 cpuid) {}; | ||
| 154 | static inline void trace_power_frequency(u64 type, u64 state, u64 cpuid) {}; | 156 | static inline void trace_power_frequency(u64 type, u64 state, u64 cpuid) {}; |
| 155 | #endif /* _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED */ | 157 | #endif /* _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED */ |
| 156 | 158 | ||
