public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Patch for tracing c states (power_end) on x86
@ 2010-02-24  8:19 Robert Schöne
  2010-02-24  8:36 ` Li Zefan
  2010-02-25 12:52 ` Peter Zijlstra
  0 siblings, 2 replies; 9+ messages in thread
From: Robert Schöne @ 2010-02-24  8:19 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: Ingo Molnar, Thomas Gleixner, kernel list

Hello,

Since noone replied to my last mail (Febr. 15th, 11:42), describing the
way to fix the missing c-state tracing, here's a patch.
Maybe its easier that way.

(I used the perf-fixes-for-linus git tree to obtain a
more-then-up-to-date version)

Bye Robert


diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 02d6780..b1cfb88 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -384,6 +384,7 @@ void default_idle(void)
                else
                        local_irq_enable();
                current_thread_info()->status |= TS_POLLING;
+               trace_power_end(1);
        } else {
                local_irq_enable();
                /* loop is done by the caller */
@@ -451,6 +452,7 @@ void mwait_idle_with_hints(unsigned long ax,
unsigned long cx)
                if (!need_resched())
                        __mwait(ax, cx);
        }
+       trace_power_end((ax>>4)+1);
 }
 
 /* Default MONITOR/MWAIT with no hints, used for default C1 state */
@@ -467,6 +469,7 @@ static void mwait_idle(void)
                        __sti_mwait(0, 0);
                else
                        local_irq_enable();
+               trace_power_end(1);
        } else
                local_irq_enable();
 }



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-03-11 10:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-24  8:19 Patch for tracing c states (power_end) on x86 Robert Schöne
2010-02-24  8:36 ` Li Zefan
2010-02-24  8:44   ` Robert Schöne
2010-02-24  9:00     ` Li Zefan
2010-02-24  9:05       ` Robert Schöne
2010-02-25 12:52 ` Peter Zijlstra
2010-03-11  6:36   ` Robert Schöne
2010-03-11  8:12     ` Peter Zijlstra
2010-03-11 10:56       ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox