kernel-shark-qt: Move declarations to top in datafilter.c example
PATCH 1/3 kernel-shark-qt: Move declarations to top in datafilter.c example
From: "Steven Rostedt (VMware)" <[email protected]>
The C style for trace-cmd and KernelShark is to follow the Linux kernel where all declarations are done at a top of a C block and not intermingled in the code.
Signed-off-by Steven Rostedt (VMware) <[email protected]>
--- kernel-shark-qt/examples/datafilter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
kernel-shark-qt/examples/datafilter.c +3 -2
@@ -18,6 +18,8 @@ int main(int argc, char **argv)size_t i, n_rows, n_tasks, n_evts, count;struct kshark_context *kshark_ctx;struct kshark_entry **data =NULL ; +struct event_filter *adv_filter; +struct event_format *event;char *entry_str;bool status;int *pids;
@@ -81,7 +83,6 @@ int main(int argc, char **argv)puts ("\n\n" );/* Show only "sched" events. */ -struct event_format *event; n_evts = kshark_ctx->pevent->nr_events;for (i =0 ; i < n_evts; ++i) { event = kshark_ctx->pevent->events[i];
@@ -115,7 +116,7 @@ int main(int argc, char **argv)kshark_filter_clear (kshark_ctx,KS_SHOW_EVENT_FILTER );/* Use the Advanced filter to do event content based filtering. */ -struct event_filter *adv_filter = kshark_ctx->advanced_event_filter; + adv_filter = kshark_ctx->advanced_event_filter;pevent_filter_add_filter_str (adv_filter,"sched/sched_wakeup:target_cpu==1" );
Signature · 1 line
2.17.1