LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Tzvetomir Stoyanov <tstoyanov@vmware.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
	tom.zanussi@linux.intel.com
Subject: [PATCH v2] Documentation/trace: Add clarification how histogram onmatch works
Date: Tue,  7 May 2019 17:49:46 +0300	[thread overview]
Message-ID: <20190507144946.7998-1-tstoyanov@vmware.com> (raw)

The current trace documentation, the section describing histogram's "onmatch"
is not straightforward enough about how this action is applied. It is not
clear what criteria are used to "match" both events. A short note is added,
describing what exactly is compared in order to match the events.

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
---
 Documentation/trace/histogram.txt | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Documentation/trace/histogram.txt b/Documentation/trace/histogram.txt
index 7ffea6aa22e3..d97f0530a731 100644
--- a/Documentation/trace/histogram.txt
+++ b/Documentation/trace/histogram.txt
@@ -1863,7 +1863,10 @@ hist trigger specification.
 
     The 'matching.event' specification is simply the fully qualified
     event name of the event that matches the target event for the
-    onmatch() functionality, in the form 'system.event_name'.
+    onmatch() functionality, in the form 'system.event_name'. Histogram
+    keys of both events are compared to find if events match. In the case
+    multiple histogram keys are used, both events must have the same
+    number of keys, and the keys must match in the same order.
 
     Finally, the number and type of variables/fields in the 'param
     list' must match the number and types of the fields in the
@@ -1920,9 +1923,10 @@ hist trigger specification.
 	    /sys/kernel/debug/tracing/events/sched/sched_waking/trigger
 
     Then, when the corresponding thread is actually scheduled onto the
-    CPU by a sched_switch event, calculate the latency and use that
-    along with another variable and an event field to generate a
-    wakeup_latency synthetic event:
+    CPU by a sched_switch event (where the sched_waking key	"saved_pid"
+    matches the sched_switch key "next_pid"), calculate the latency and
+    use that along with another variable and an event field to generate
+    a wakeup_latency synthetic event:
 
     # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0:\
             onmatch(sched.sched_waking).wakeup_latency($wakeup_lat,\
-- 
2.21.0


             reply	other threads:[~2019-05-07 14:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07 14:49 Tzvetomir Stoyanov [this message]
2019-05-08  0:11 ` Steven Rostedt
2019-05-08 13:15   ` Tom Zanussi
2019-05-08 16:18     ` Steven Rostedt
2019-05-08 16:22       ` Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190507144946.7998-1-tstoyanov@vmware.com \
    --to=tstoyanov@vmware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tom.zanussi@linux.intel.com \
    --subject='Re: [PATCH v2] Documentation/trace: Add clarification how histogram onmatch works' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).