linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] tracing/hist: Add percentage histogram suffixes
@ 2022-08-05  1:35 Masami Hiramatsu (Google)
  2022-08-05  1:35 ` [PATCH v2 1/2] tracing: Add .percent suffix option to histogram values Masami Hiramatsu (Google)
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Masami Hiramatsu (Google) @ 2022-08-05  1:35 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Tom Zanussi, Ingo Molnar, linux-kernel

Hi,

Here is the 2nd version of .percent and .graph suffixes for histogram
trigger to show the value in percentage and in bar-graph respectively.

This version uses div64_*() for calculating percentages and show an
error if it fails to calculate it.

This will help us to check the trend of the histogram instantly
without the post processing tool.

Here shows the example of the percentage and the bar graph of
the runtime of the running tasks.

/sys/kernel/tracing # echo hist:keys=pid:vals=runtime.percent,runtime.graph:sort
=pid >> events/sched/sched_stat_runtime/trigger
/sys/kernel/tracing # sleep 10
/sys/kernel/tracing # cat events/sched/sched_stat_runtime/hist
# event histogram
#
# trigger info: hist:keys=pid:vals=hitcount,runtime.percent,runtime.graph:sort=pid:size=2048 [active]
#

{ pid:          8 } hitcount:         11  runtime:       4.11  runtime: #                   
{ pid:          9 } hitcount:          4  runtime:       1.28  runtime:                     
{ pid:         14 } hitcount:         10  runtime:       2.22  runtime:                     
{ pid:         15 } hitcount:          1  runtime:       0.07  runtime:                     
{ pid:         16 } hitcount:         21  runtime:       3.35  runtime: #                   
{ pid:         57 } hitcount:          6  runtime:       2.41  runtime: #                   
{ pid:         61 } hitcount:         42  runtime:       9.79  runtime: ####                
{ pid:         66 } hitcount:          5  runtime:       0.69  runtime:                     
{ pid:        147 } hitcount:         36  runtime:      45.33  runtime: ####################
{ pid:       8548 } hitcount:          9  runtime:      17.25  runtime: #######             
{ pid:       8549 } hitcount:          8  runtime:      13.43  runtime: #####               

Totals:
    Hits: 153
    Entries: 11
    Dropped: 0


Thank you,

---

Masami Hiramatsu (Google) (2):
      tracing: Add .percent suffix option to histogram values
      tracing: Add .graph suffix option to histogram value


 kernel/trace/trace.c             |    3 +
 kernel/trace/trace_events_hist.c |  129 ++++++++++++++++++++++++++++++++++++--
 2 files changed, 124 insertions(+), 8 deletions(-)

--
Masami Hiramatsu (Google) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-23  2:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05  1:35 [PATCH v2 0/2] tracing/hist: Add percentage histogram suffixes Masami Hiramatsu (Google)
2022-08-05  1:35 ` [PATCH v2 1/2] tracing: Add .percent suffix option to histogram values Masami Hiramatsu (Google)
2022-08-05  1:35 ` [PATCH v2 2/2] tracing: Add .graph suffix option to histogram value Masami Hiramatsu (Google)
2022-08-18 20:41 ` [PATCH v2 0/2] tracing/hist: Add percentage histogram suffixes Tom Zanussi
2022-08-20  2:31   ` Masami Hiramatsu
2022-08-21 19:35     ` Tom Zanussi
2022-08-23  2:58       ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).