PM / Sleep: Add wakeup_source_activate and wakeup_source_deactivate tracepoints
Add tracepoints to wakeup_source_activate and wakeup_source_deactivate. Useful for checking that specific wakeup sources overlap as expected. Signed-off-by: Arve Hjønnevåg <arve@android.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
30e3ce6dcb
commit
6791e36c4a
@@ -65,6 +65,40 @@ TRACE_EVENT(machine_suspend,
|
||||
TP_printk("state=%lu", (unsigned long)__entry->state)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(wakeup_source,
|
||||
|
||||
TP_PROTO(const char *name, unsigned int state),
|
||||
|
||||
TP_ARGS(name, state),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string( name, name )
|
||||
__field( u64, state )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(name, name);
|
||||
__entry->state = state;
|
||||
),
|
||||
|
||||
TP_printk("%s state=0x%lx", __get_str(name),
|
||||
(unsigned long)__entry->state)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(wakeup_source, wakeup_source_activate,
|
||||
|
||||
TP_PROTO(const char *name, unsigned int state),
|
||||
|
||||
TP_ARGS(name, state)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(wakeup_source, wakeup_source_deactivate,
|
||||
|
||||
TP_PROTO(const char *name, unsigned int state),
|
||||
|
||||
TP_ARGS(name, state)
|
||||
);
|
||||
|
||||
#ifdef CONFIG_EVENT_POWER_TRACING_DEPRECATED
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user