linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jean.pihet@newoldbits.com
To: mingo@elte.hu, trenn@suse.de, Len Brown <len.brown@intel.com>,
	Pavel Machek <pavel@ucw.cz>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-pm@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Cc: linux-omap@vger.kernel.org,
	Arjan van de Ven <arjan@linux.intel.com>,
	linux-perf-users@vger.kernel.org, Jean Pihet <j-pihet@ti.com>
Subject: [PATCH 1/2] perf: add calls to suspend trace point
Date: Wed,  5 Jan 2011 19:49:01 +0100	[thread overview]
Message-ID: <1294253342-29056-2-git-send-email-j-pihet@ti.com> (raw)
In-Reply-To: <1294253342-29056-1-git-send-email-j-pihet@ti.com>

From: Jean Pihet <j-pihet@ti.com>

Uses the machine_suspend trace point, called from the
generic kernel suspend_devices_and_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 ecf7705..031d5e3 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"
 
@@ -201,6 +202,7 @@ int suspend_devices_and_enter(suspend_state_t state)
 	if (!suspend_ops)
 		return -ENOSYS;
 
+	trace_machine_suspend(state);
 	if (suspend_ops->begin) {
 		error = suspend_ops->begin(state);
 		if (error)
@@ -229,6 +231,7 @@ int suspend_devices_and_enter(suspend_state_t state)
  Close:
 	if (suspend_ops->end)
 		suspend_ops->end();
+	trace_machine_suspend(PWR_EVENT_EXIT);
 	return error;
 
  Recover_platform:
-- 
1.7.2.3

  reply	other threads:[~2011-01-05 18:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-05 18:49 [PATCH 0/2] tools, perf: new power trace API jean.pihet
2011-01-05 18:49 ` jean.pihet [this message]
2011-01-05 18:49 ` [PATCH 2/2] tools, perf: Documentation for the power events API jean.pihet
2011-01-07  5:50   ` Eduardo Valentin
2011-01-10 10:10     ` Jean Pihet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1294253342-29056-2-git-send-email-j-pihet@ti.com \
    --to=jean.pihet@newoldbits.com \
    --cc=arjan@linux.intel.com \
    --cc=j-pihet@ti.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=trenn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).