Message ID | 20190305143924.11056-4-ykaradzhov@vmware.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 2c82741856a71cc42155014b2148ab70fd63650e |
Headers | show |
Series | Improvements and fixes for sched_switch plugin | expand |
On Tue, Mar 05, 2019 at 04:39:24PM +0200, Yordan Karadzhov wrote: > The sched_events plugin should not be totally disabled when the > wakeup events are missing. The initialization of the plugin must > fail only if the trace.dat file contains no sched_switch events. > > Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com> > --- > kernel-shark/src/plugins/sched_events.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/kernel-shark/src/plugins/sched_events.c b/kernel-shark/src/plugins/sched_events.c > index fe13e6a..c52fb29 100644 > --- a/kernel-shark/src/plugins/sched_events.c > +++ b/kernel-shark/src/plugins/sched_events.c > @@ -104,9 +104,6 @@ static bool plugin_sched_init_context(struct kshark_context *kshark_ctx) > &plugin_ctx->sched_waking_event, > &plugin_ctx->sched_waking_pid_field); > > - if (!wakeup_found) > - return false; > - > plugin_ctx->second_pass_hash = tracecmd_filter_id_hash_alloc(); > > return true; Looks good to me. Reviewed-by: Slavomir Kaslev <kaslevs@vmware.com> Thank you, -- Slavi
On Tue, 5 Mar 2019 16:39:24 +0200 Yordan Karadzhov <ykaradzhov@vmware.com> wrote: > The sched_events plugin should not be totally disabled when the > wakeup events are missing. The initialization of the plugin must > fail only if the trace.dat file contains no sched_switch events. > I added: Reported-by: Phil Auld <pauld@redhat.com> -- Steve > Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com> > --- > kernel-shark/src/plugins/sched_events.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/kernel-shark/src/plugins/sched_events.c b/kernel-shark/src/plugins/sched_events.c > index fe13e6a..c52fb29 100644 > --- a/kernel-shark/src/plugins/sched_events.c > +++ b/kernel-shark/src/plugins/sched_events.c > @@ -104,9 +104,6 @@ static bool plugin_sched_init_context(struct kshark_context *kshark_ctx) > &plugin_ctx->sched_waking_event, > &plugin_ctx->sched_waking_pid_field); > > - if (!wakeup_found) > - return false; > - > plugin_ctx->second_pass_hash = tracecmd_filter_id_hash_alloc(); > > return true;
On Tue, 5 Mar 2019 17:57:55 +0200 Slavomir Kaslev <kaslevs@vmware.com> wrote: > Looks good to me. > > Reviewed-by: Slavomir Kaslev <kaslevs@vmware.com> Thanks Yordan and Slavomir, I applied the patches. -- Steve
diff --git a/kernel-shark/src/plugins/sched_events.c b/kernel-shark/src/plugins/sched_events.c index fe13e6a..c52fb29 100644 --- a/kernel-shark/src/plugins/sched_events.c +++ b/kernel-shark/src/plugins/sched_events.c @@ -104,9 +104,6 @@ static bool plugin_sched_init_context(struct kshark_context *kshark_ctx) &plugin_ctx->sched_waking_event, &plugin_ctx->sched_waking_pid_field); - if (!wakeup_found) - return false; - plugin_ctx->second_pass_hash = tracecmd_filter_id_hash_alloc(); return true;
The sched_events plugin should not be totally disabled when the wakeup events are missing. The initialization of the plugin must fail only if the trace.dat file contains no sched_switch events. Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com> --- kernel-shark/src/plugins/sched_events.c | 3 --- 1 file changed, 3 deletions(-)