[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201009180010.17380.trenn@suse.de>
Date: Sat, 18 Sep 2010 00:10:16 +0200
From: Thomas Renninger <trenn@...e.de>
To: Jean Pihet <jean.pihet@...oldbits.com>
Cc: Ingo Molnar <mingo@...e.hu>,
Arjan van de Ven <arjan@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Len Brown <len.brown@...el.com>, arjan@...radead.org,
Kevin Hilman <khilman@...prootsystems.com>,
linux-kernel@...r.kernel.org, discuss@...swatts.org,
linux-pm@...ts.linux-foundation.org, linux-omap@...r.kernel.org,
linux-perf-users@...r.kernel.org, linux-trace-users@...r.kernel.org
Subject: Re: [PATCH] tracing, perf: add more power related events
power-trace: Add x86 ACPI S- (machine sleep) state events.
Signed-off-by: Thomas Renninger <trenn@...e.de>
---
drivers/acpi/sleep.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
Index: linux-2.6.35-master/drivers/acpi/sleep.c
===================================================================
--- linux-2.6.35-master.orig/drivers/acpi/sleep.c
+++ linux-2.6.35-master/drivers/acpi/sleep.c
@@ -17,6 +17,8 @@
#include <linux/suspend.h>
#include <linux/reboot.h>
+#include <trace/events/power.h>
+
#include <asm/io.h>
#include <acpi/acpi_bus.h>
@@ -249,14 +251,19 @@ static int acpi_suspend_enter(suspend_st
unsigned long flags = 0;
u32 acpi_state = acpi_target_sleep_state;
+ trace_power_switch_state(POWER_SSTATE, acpi_state, 0);
+
ACPI_FLUSH_CPU_CACHE();
/* Do arch specific saving of state. */
if (acpi_state == ACPI_STATE_S3) {
int error = acpi_save_state_mem();
- if (error)
+ if (error) {
+ trace_power_switch_state(POWER_SSTATE,
+ ACPI_STATE_S0, 0);
return error;
+ }
}
local_irq_save(flags);
@@ -309,6 +316,8 @@ static int acpi_suspend_enter(suspend_st
suspend_nvs_restore();
+ trace_power_switch_state(POWER_SSTATE, ACPI_STATE_S0, 0);
+
return ACPI_SUCCESS(status) ? 0 : -EFAULT;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists