Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1549850
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] tools lib traceevent: Fix prev/next_prio for deadline tasks |
| Date | 2017-01-03 16:10 +0100 |
| Message-ID | <sVySR-85Q-35@gated-at.bofh.it> (permalink) |
| References | <sVvLj-5zb-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 3 Jan 2017 12:42:42 +0100 Daniel Bristot de Oliveira <bristot@redhat.com> wrote: > From: Daniel Bristot de Oliveiva <bristot@redhat.com> > > Currently, the sched:sched_switch tracepoint reports deadline tasks > with priority -1. But when reading the trace via perf script I've > got the following output: > > # ./d & # (d is a deadline task, see [1]) > # perf record -e sched:sched_switch -a sleep 1 > # perf script > ... > swapper 0 [000] 2146.962441: sched:sched_switch: swapper/0:0 [120] R ==> d:2593 [4294967295] > d 2593 [000] 2146.972472: sched:sched_switch: d:2593 [4294967295] R ==> g:2590 [4294967295] > > The task d reports the wrong priority [4294967295]. This happens because > the "int prio" is stored in an unsigned long long val. Although it is > set as a %lld, as int is shorter than unsigned long long, > trace_seq_printf prints it as a positive number. > > The fix is just to cast the val as an int, and print it as a %d, > as in the sched:sched_switch tracepoint's "format". > > The output with the fix is: > > # ./d & > # perf record -e sched:sched_switch -a sleep 1 > # perf script > ... > swapper 0 [000] 4306.374037: sched:sched_switch: swapper/0:0 [120] R ==> d:10941 [-1] > d 10941 [000] 4306.383823: sched:sched_switch: d:10941 [-1] R ==> swapper/0:0 [120] > > [1] gcc -o d d.c - from http://bristot.me/lkml/d.c > > Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com> > Cc: Steven Rostedt <rostedt@goodmis.org> > Cc: Ingo Molnar <mingo@redhat.com> > Cc: Peter Zijlstra <peterz@infradead.org> > Cc: Arnaldo Carvalho de Melo <acme@kernel.org> > Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> > Cc: Jiri Olsa <jolsa@redhat.com> > Cc: linux-kernel@vger.kernel.org > Acked-by: Steven Rostedt <rostedt@goodmis.org> --- :-) -- Steve
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] tools lib traceevent: Fix prev/next_prio for deadline tasks Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-01-03 12:50 +0100
Re: [PATCH] tools lib traceevent: Fix prev/next_prio for deadline tasks Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-03 15:50 +0100
Re: [PATCH] tools lib traceevent: Fix prev/next_prio for deadline tasks Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-01-03 16:10 +0100
Re: [PATCH] tools lib traceevent: Fix prev/next_prio for deadline tasks Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-03 16:20 +0100
Re: [PATCH] tools lib traceevent: Fix prev/next_prio for deadline tasks Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-01-03 17:10 +0100
Re: [PATCH] tools lib traceevent: Fix prev/next_prio for deadline tasks Steven Rostedt <rostedt@goodmis.org> - 2017-01-03 16:10 +0100
[tip:perf/urgent] tools lib traceevent: Fix prev/next_prio for deadline tasks tip-bot for Daniel Bristot de Oliveira <tipbot@zytor.com> - 2017-01-05 09:00 +0100
csiph-web