Skip to content

tracing/hist: Add percentage histogram suffixes

Masami Hiramatsu (Google) linux-trace-kernel lkml 6 versions – New

Get series with b4
b4 am 166610811353.56030.10023036046735082272.stgit@devnote2

Versions newest first · linked by author and title

  1. v6 Latest5 patches 0 repliesNew
  2. v56 patches 4 repliesSuperseded
  3. v45 patches 3 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v33 patches0 repliesSuperseded
v22 patches4 repliesSuperseded
v12 patches4 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5tracing: Allow multiple hitcount values in histogramskernel/trace/trace_events_hist.c+9 -30 replies
2/5tracing: Add .percent suffix option to histogram valueskernel/trace/trace.c kernel/trace/trace_events_hist.c+78 -150 replies
3/5tracing: Add .graph suffix option to histogram valuekernel/trace/trace.c kernel/trace/trace_events_hist.c+63 -170 replies
4/5tracing: Add nohitcount option for suppressing display of raw hitcountkernel/trace/trace.c kernel/trace/trace_events_hist.c+29 -80 replies
5/5tracing: docs: Update histogram doc for .percent/.graph and 'nohitcount'Documentation/trace/histogram.rst+9 -10 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchTom Zanussi
1/5T-b
2/5R-b T-b
3/5R-b T-b
4/5R-b T-b
5/5R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/5] tracing/hist: Add percentage histogram suffixes

Hi,

Sorry, I forgot to update this series.
Here is the 6th version of .percent and .graph suffixes for histogram trigger to show the value in percentage and in bar-graph respectively. The previous version is here;

https://lore.kernel.org/all/166226473132.223837.9011128463174539022.stgit@devnote2

This is just fixing to add my signed-off-by and Tom's reviewed/tested-by. No functional changes.

Here shows an example of the percentage and the bar graph of the runtime of the running tasks without raw hitcount field.

  # cd /sys/kernel/debug/tracing/
  # echo hist:keys=pid:vals=hitcount.percent,hitcount.graph:sort=pid:NOHC > \
        events/sched/sched_stat_runtime/trigger
  # sleep 10
  # cat events/sched/sched_stat_runtime/hist
 # event histogram
 #
 # trigger info: hist:keys=pid:vals=hitcount.percent,hitcount.graph:sort=pid:size=2048:nohitcount [active]
 #
 { pid:         14 }  hitcount (%):   6.91  hitcount: ##                  
 { pid:         16 }  hitcount (%):   1.13  hitcount:                     
 { pid:         57 }  hitcount (%):   6.99  hitcount: ##                  
 { pid:         61 }  hitcount (%):  55.28  hitcount: ####################
 { pid:         67 }  hitcount (%):   5.52  hitcount: ##                  
 { pid:         69 }  hitcount (%):  20.08  hitcount: #######             
 { pid:         71 }  hitcount (%):   0.40  hitcount:                     
 { pid:         77 }  hitcount (%):   0.97  hitcount:                     
 { pid:         78 }  hitcount (%):   0.56  hitcount:                     
 { pid:        145 }  hitcount (%):   1.13  hitcount:                     
 { pid:        153 }  hitcount (%):   0.48  hitcount:                     
 { pid:        154 }  hitcount (%):   0.48  hitcount:                     

Totals:

     Hits: 1230
     Entries: 12
     Dropped: 0

With the NOHC (or nohitcount) option, the histogram will skip display of raw hitcount, but it will allow to display percent and graph of hitcount.

Trigger Result

val=runtime               -> Show hitcount and runtime
val=runtime:NOHC          -> Show runtime
val=hitcount:NOHC         -> Error
(noval)                   -> show hitcount
(noval):NOHC              -> Error
val=hitcount.parcent      -> show hitcount and hitcount%

val=hitcount.parcent:NOHC -> show hitcount%

Thank you,

---

Masami Hiramatsu (Google) (4):
tracing: Add .percent suffix option to histogram values
tracing: Add .graph suffix option to histogram value
tracing: Add nohitcount option for suppressing display of raw hitcount
tracing: docs: Update histogram doc for .percent/.graph and 'nohitcount'

Tom Zanussi (1):
tracing: Allow multiple hitcount values in histograms

 Documentation/trace/histogram.rst |   10 ++
 kernel/trace/trace.c              |    7 +
 kernel/trace/trace_events_hist.c  |  177 ++++++++++++++++++++++++++++++++-----
 3 files changed, 169 insertions(+), 25 deletions(-)

--
Masami Hiramatsu (Google) <[email protected]>