PM / Runtime: Introduce trace points for tracing rpm_* functions

This patch introduces 3 trace points to prepare for tracing
rpm_idle/rpm_suspend/rpm_resume functions, so we can use these
trace points to replace the current dev_dbg().

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
Ming Lei
2011-09-27 22:53:27 +02:00
committed by Rafael J. Wysocki
parent ad3c36a534
commit 53b615ccca
3 changed files with 120 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ endif
obj-$(CONFIG_EVENT_TRACING) += trace_events_filter.o
obj-$(CONFIG_KPROBE_EVENT) += trace_kprobe.o
obj-$(CONFIG_TRACEPOINTS) += power-traces.o
obj-$(CONFIG_TRACEPOINTS) += rpm-traces.o
ifeq ($(CONFIG_TRACING),y)
obj-$(CONFIG_KGDB_KDB) += trace_kdb.o
endif

20
kernel/trace/rpm-traces.c Normal file
View File

@@ -0,0 +1,20 @@
/*
* Power trace points
*
* Copyright (C) 2009 Ming Lei <ming.lei@canonical.com>
*/
#include <linux/string.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/usb.h>
#define CREATE_TRACE_POINTS
#include <trace/events/rpm.h>
EXPORT_TRACEPOINT_SYMBOL_GPL(rpm_return_int);
EXPORT_TRACEPOINT_SYMBOL_GPL(rpm_idle);
EXPORT_TRACEPOINT_SYMBOL_GPL(rpm_suspend);
EXPORT_TRACEPOINT_SYMBOL_GPL(rpm_resume);