diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-02-10 20:18:11 -0500 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-02-13 09:09:12 -0500 |
commit | e50d3bbfc9a44e3e79147b41f6cd4d6258db1ee5 (patch) | |
tree | 0a100c698aa46b17d251975f8cae90d1795b1967 | |
parent | 4272d6165bb9f7257babfd450d5b9eea59e6e706 (diff) | |
download | trace-cmd-e50d3bbfc9a44e3e79147b41f6cd4d6258db1ee5.tar.gz |
kernel-shark: Add sched_waking event processing to sched_waking
It is now more common to enable the sched_waking event than to use the
sched_wakeup or sched_wakeup_new, as it encompasses both. But the sched
plugin does not handle that. Fix that by including the sched_waking event as
an event to use for processing schedule wakeup events.
Link: http://lore.kernel.org/linux-trace-devel/20190211012154.262506802@goodmis.org
Reviewed-by: Yordan Karadzhov <ykaradzhov@vmware.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r-- | kernel-shark/src/plugins/sched_events.c | 6 | ||||
-rw-r--r-- | kernel-shark/src/plugins/sched_events.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/kernel-shark/src/plugins/sched_events.c b/kernel-shark/src/plugins/sched_events.c index 0cfe5b53..14f8edb2 100644 --- a/kernel-shark/src/plugins/sched_events.c +++ b/kernel-shark/src/plugins/sched_events.c @@ -85,6 +85,10 @@ static bool plugin_sched_init_context(struct kshark_context *kshark_ctx) &plugin_ctx->sched_wakeup_new_event, &plugin_ctx->sched_wakeup_new_pid_field); + wakeup_found |= define_wakeup_event(kshark_ctx->pevent, "sched_waking", + &plugin_ctx->sched_waking_event, + &plugin_ctx->sched_waking_pid_field); + if (!wakeup_found) return false; @@ -158,10 +162,12 @@ static bool wakeup_match_rec_pid(struct plugin_sched_context *plugin_ctx, int pid) { struct tep_event *wakeup_events[] = { + plugin_ctx->sched_waking_event, plugin_ctx->sched_wakeup_event, plugin_ctx->sched_wakeup_new_event, }; struct tep_format_field *wakeup_fields[] = { + plugin_ctx->sched_waking_pid_field, plugin_ctx->sched_wakeup_pid_field, plugin_ctx->sched_wakeup_new_pid_field, }; diff --git a/kernel-shark/src/plugins/sched_events.h b/kernel-shark/src/plugins/sched_events.h index 0beb63fe..dbc9963c 100644 --- a/kernel-shark/src/plugins/sched_events.h +++ b/kernel-shark/src/plugins/sched_events.h @@ -51,6 +51,12 @@ struct plugin_sched_context { /** Pointer to the sched_wakeup_new_pid_field format descriptor. */ struct tep_format_field *sched_wakeup_new_pid_field; + /** Pointer to the sched_waking_event object. */ + struct tep_event *sched_waking_event; + + /** Pointer to the sched_waking_pid_field format descriptor. */ + struct tep_format_field *sched_waking_pid_field; + /** List of Data collections used by this plugin. */ struct kshark_entry_collection *collections; |