Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5293454yba; Wed, 8 May 2019 10:49:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCUSrIyzqNdRXmNGrpb9xVM85frBvJmgKZjyyzAx7mNjq3Mz+EB/bPf7QzTGn8sGJG6IWc X-Received: by 2002:a62:1ec5:: with SMTP id e188mr51225465pfe.242.1557337747425; Wed, 08 May 2019 10:49:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557337747; cv=none; d=google.com; s=arc-20160816; b=Do1y88fLu6tMo/ZWC6lcad2xSPgBNVkXGYqRUHTxv+Acms8ZYxzdQyg56extrNfnEv LcXOFvW5sbuSOWMLLLhdsxy1a+anHl44G1bUdkMha2anQZ+epL95NiexG9IffiPc3Vus rfnHuwbCcAMWjevleD9YSTC7/Oxr1Y526xYHJw0/T86aAvJiqzNjopFRs//OjpDeRC4S QSt9O/PklEWvdmp8E771oQESPLPZFie2Jjvy2Dc41ZVCjlZYExgZ92Qhj0T1SO6i/ZAQ v4EMlm8IHSbdjyG+XVj9Aean2g/FxKT1xRcZhMeiR/lxVPzqoPn6oeL4g2WkM0Dbw389 UYDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=LYINGiWRCIlNnLAlzUuVn4ivb43itG+QVf2fac4KWI0=; b=BQVGQCp+c8LG8aVaXV/Rw+Vq+8tCnPJJkvmbyz5y9G3pOWZUJCa2zh3TCgRqkYOijr ve5AA7c+5KjliP+pYiaDwsPgk5kueK9ctXobEv8hXKCnG9u8xRdg4bcHJDx42nP5qV11 hiquPIkLmcEV539XD5+RcFUZKyDyC+DMkYmNPEYkktg7BjQA3srmj+zGlD7EYfzpeSzz EEgYE4T9WAqdYyyADgGka5Ruz6oyxl7rO61DHSCjoJt5pFc3HFdGnltK4N8lFqcpk/UF Q5725ZJukqQiNq/qnih91pM/RJxpj3S98qfsFOY15LC6JDNbsF9SaFF9zzgrgY35q+/Y 8LNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a73si23256931pfj.174.2019.05.08.10.48.50; Wed, 08 May 2019 10:49:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727861AbfEHQS5 (ORCPT + 99 others); Wed, 8 May 2019 12:18:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:45638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725889AbfEHQS5 (ORCPT ); Wed, 8 May 2019 12:18:57 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0657620644; Wed, 8 May 2019 16:18:55 +0000 (UTC) Date: Wed, 8 May 2019 12:18:54 -0400 From: Steven Rostedt To: Tom Zanussi Cc: Tzvetomir Stoyanov , linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet Subject: Re: [PATCH v2] Documentation/trace: Add clarification how histogram onmatch works Message-ID: <20190508121854.2bf6340b@gandalf.local.home> In-Reply-To: <1557321326.2167.5.camel@kernel.org> References: <20190507144946.7998-1-tstoyanov@vmware.com> <20190507201157.2673f2de@gandalf.local.home> <1557321326.2167.5.camel@kernel.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jon, Can you take this patch in your tree? Tom, Thanks for the review! -- Steve On Wed, 08 May 2019 08:15:26 -0500 Tom Zanussi wrote: > Hi Steve, > > On Tue, 2019-05-07 at 20:11 -0400, Steven Rostedt wrote: > > Tom, > > > > Can you review this patch. > > > > Sure. > > > Jon, > > > > After Tom gives his review, can you take this in your tree? > > > > Thanks! > > > > Reviewed-by: Steven Rostedt (VMware) > > > > Reviewed-by: Tom Zanussi > > Thanks, > > Tom > > > -- Steve > > > > > > On Tue, 7 May 2019 17:49:46 +0300 > > Tzvetomir Stoyanov wrote: > > > > > 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 > > > --- > > > 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/tr > > > igger > > > > > > 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 > > > ,\ > > > >