Commit c882e0fe authored by Robert Schöne's avatar Robert Schöne Committed by Ingo Molnar

x86, perf: Add power_end event to process_*.c cpu_idle routine

Systems using the idle thread from process_32.c and process_64.c
do not generate power_end events which could be traced using
perf. This patch adds the event generation for such systems.
Signed-off-by: default avatarRobert Schoene <robert.schoene@tu-dresden.de>
Acked-by: default avatarArjan van de Ven <arjan@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1276515440.5441.45.camel@localhost>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 646b1db4
...@@ -57,6 +57,8 @@ ...@@ -57,6 +57,8 @@
#include <asm/syscalls.h> #include <asm/syscalls.h>
#include <asm/debugreg.h> #include <asm/debugreg.h>
#include <trace/events/power.h>
asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
/* /*
...@@ -111,6 +113,8 @@ void cpu_idle(void) ...@@ -111,6 +113,8 @@ void cpu_idle(void)
stop_critical_timings(); stop_critical_timings();
pm_idle(); pm_idle();
start_critical_timings(); start_critical_timings();
trace_power_end(smp_processor_id());
} }
tick_nohz_restart_sched_tick(); tick_nohz_restart_sched_tick();
preempt_enable_no_resched(); preempt_enable_no_resched();
......
...@@ -51,6 +51,8 @@ ...@@ -51,6 +51,8 @@
#include <asm/syscalls.h> #include <asm/syscalls.h>
#include <asm/debugreg.h> #include <asm/debugreg.h>
#include <trace/events/power.h>
asmlinkage extern void ret_from_fork(void); asmlinkage extern void ret_from_fork(void);
DEFINE_PER_CPU(unsigned long, old_rsp); DEFINE_PER_CPU(unsigned long, old_rsp);
...@@ -138,6 +140,9 @@ void cpu_idle(void) ...@@ -138,6 +140,9 @@ void cpu_idle(void)
stop_critical_timings(); stop_critical_timings();
pm_idle(); pm_idle();
start_critical_timings(); start_critical_timings();
trace_power_end(smp_processor_id());
/* In many cases the interrupt that ended idle /* In many cases the interrupt that ended idle
has already called exit_idle. But some idle has already called exit_idle. But some idle
loops can be woken up without interrupt. */ loops can be woken up without interrupt. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment