Bug 204703 - Add option to trace-cmd report to display raw flags
Summary: Add option to trace-cmd report to display raw flags
Status: RESOLVED CODE_FIX
Alias: None
Product: Tools
Classification: Unclassified
Component: Trace-cmd/Kernelshark (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: Default virtual assignee for Trace-cmd and kernelshark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-26 19:43 UTC by Steven Rostedt
Modified: 2020-12-22 21:37 UTC (History)
0 users

See Also:
Kernel Version: all
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Proof of concept patch for raw format of latency printing (1.17 KB, patch)
2019-08-26 19:43 UTC, Steven Rostedt
Details | Diff

Description Steven Rostedt 2019-08-26 19:43:02 UTC
Created attachment 284613 [details]
Proof of concept patch for raw format of latency printing

We should let the user see the raw flags (the "6dN.20" part) in hex. And then be able to see what the flags are. For example doing:

  trace-cmd report -l -R

Produces:

  <idle>-0       0-0x25-30 333536.173363: sched_wakeup:          comm=ksoftirqd/0 pid=9 prio=120 success=1 target_cpu=0
  rcuc/7-64      7-0x1-20 333536.173365: sched_switch:          prev_comm=rcuc/7 prev_pid=64 prev_prio=98 prev_state=1 next_comm=ksoftirqd/7 next_pid=65 next_prio=120
  <idle>-0       6-0x1-20 333536.173366: sched_switch:          prev_comm=swapper/6 prev_pid=0 prev_prio=120 prev_state=0 next_comm=rcuc/6 next_pid=57 next_prio=98
  <idle>-0       4-0x1-20 333536.173366: sched_switch:          prev_comm=swapper/4 prev_pid=0 prev_prio=120 prev_state=0 next_comm=ksoftirqd/4 next_pid=44 next_prio=120
ksoftirq-65      7-0x0-.2 333536.173366: softirq_entry:         vec=1


Instead of:

  <idle>-0       0dN.30 333536.173363: sched_wakeup:         ksoftirqd/0:9 [120] success=1 CPU:000
  rcuc/7-64      7d..20 333536.173365: sched_switch:         rcuc/7:64 [98] S ==> ksoftirqd/7:65 [120]
  <idle>-0       6d..20 333536.173366: sched_switch:         swapper/6:0 [120] R ==> rcuc/6:57 [98]
  <idle>-0       4d..20 333536.173366: sched_switch:         swapper/4:0 [120] R ==> ksoftirqd/4:44 [120]
ksoftirq-65      7....2 333536.173366: softirq_entry:        vec=1 [action=TIMER]

Attached is a prototype patch.
Comment 1 Steven Rostedt 2020-12-22 21:37:36 UTC
Fixed by commit 991dc8e40445 ("trace-cmd: Print raw hex for flags when trace-cmd report -R")

Note You need to log in before you can comment on or make changes to this bug.