Re: [PATCH 3/4] perf: add calls to suspend trace point

Rafael J. Wysocki
2010-10-04T22:52:36Z

On Monday, October 04, 2010, Jean Pihet wrote:
> Uses the machine_suspend trace point, from the
> generic kernel suspend_enter function.
>
> Signed-off-by: Jean Pihet <j-pihet@ti.com>
> CC: Thomas Renninger <trenn@suse.de>

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

> ---
> kernel/power/suspend.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
> index 7335952..10cad5c 100644
> --- a/kernel/power/suspend.c
> +++ b/kernel/power/suspend.c
> @@ -22,6 +22,7 @@
> #include <linux/mm.h>
> #include <linux/slab.h>
> #include <linux/suspend.h>
> +#include <trace/events/power.h>
>
> #include "power.h"
>
> @@ -164,7 +165,9 @@ static int suspend_enter(suspend_state_t state)
> error = sysdev_suspend(PMSG_SUSPEND);
> if (!error) {
> if (!suspend_test(TEST_CORE) && pm_check_wakeup_events()) {
> + trace_machine_suspend(state);
> error = suspend_ops->enter(state);
> + trace_machine_suspend(0);
> events_check_enabled = false;
> }
> sysdev_resume();
>