Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5011525yba; Wed, 8 May 2019 06:36:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwK6YUqwok157Z3F5l8z/Cs7JUBKGskQDcseAIohWK/WDrJBhX7ZA930Lmi1AKbkqQ+eSmL X-Received: by 2002:a63:d816:: with SMTP id b22mr26091917pgh.16.1557322618031; Wed, 08 May 2019 06:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557322618; cv=none; d=google.com; s=arc-20160816; b=hXnxjOshNcqMWRqYxR0A3RoLdLWksyydVmiAZ1TR2VNmhpiLh8KxGgNgf9aD8UhPFO mep+awz4ncMkCusx1f4DOCuSHF5aQurwdFufodcjR2wG31POg3YffxLBq0Ux/HARoqPi R9LLRB/6xQNq1bbcFs6sMl5tQrU81zCwCz9Qx7aOfB+GkAj0vMIsIoQB/w/O1r+PCj/i 7LRjW9imYmv0RR0v9cLgnryEA3cDvomPFT7EdzHwgLzoLvzyGbqzS9GvgggLLU8Qh0ue wEXUCy9pcbOBGHj0LU8TjgeJfxV95njUxz3r8s0O7KNSnlLT8xFDcK0LIpBSGRbe3+Wa wQXg== 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:date:cc:to:from:subject:message-id :dkim-signature; bh=7Om1iGeooDhzroO7O+41lov6iH+LzUQ1lBZVrmUynNM=; b=wfAabIigR5Mu8PsTyuJojWtzEednVmKtQZHTF87LBLq4SP8/dMh+jUWIzl/3v58Z8H 9tuYY73pZ+/87wA3BlS4grFfgL5KVFMsVhV45NubRzjZDy0k2c47ZA+jTmx9DQgmvoSz GFsyE/r9X87VM66LSepgjVt+yaML751pENiuwHxG4oirtU8R1zaYm9Nb+XITLANgvOXU xtVYVAA7pNxSIUptoRRBS9fipJleenrG2WiEsz3pvxNWm+mfkzSlErThjJGq9aCSwJbK sBewol8i4qDz43p26eVumm2WlcyblPoFMxwBexo7VNmOOAqI6xWBwijHXkwQglBdfJWA GgMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Co24EdjT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ce12si24927384plb.46.2019.05.08.06.36.31; Wed, 08 May 2019 06:36:58 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Co24EdjT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727730AbfEHNP3 (ORCPT + 99 others); Wed, 8 May 2019 09:15:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:40282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727453AbfEHNP3 (ORCPT ); Wed, 8 May 2019 09:15:29 -0400 Received: from tzanussi-mobl (c-98-220-238-81.hsd1.il.comcast.net [98.220.238.81]) (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 5685520850; Wed, 8 May 2019 13:15:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557321328; bh=FcJSM/y2BlME+YwJKXMk2xvlnDqC5u1EXDgBURrRrFQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Co24EdjTGma2lIPhu3U3ZulvyXwvV1sWJYNfPsrhv5STyAuxcjDRYveSac66hi0IN kIGk+y2Xs2qAZ5KZtn8Md1tUAGmo9OJ0d9/z4X8LxP5S3ib2KDyq7LB2QDBd1/QySn xsyIa8GbUlFGiwi7SvYCY0h8B6p1qENU/fejecGk= Message-ID: <1557321326.2167.5.camel@kernel.org> Subject: Re: [PATCH v2] Documentation/trace: Add clarification how histogram onmatch works From: Tom Zanussi To: Steven Rostedt , Tzvetomir Stoyanov Cc: linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet Date: Wed, 08 May 2019 08:15:26 -0500 In-Reply-To: <20190507201157.2673f2de@gandalf.local.home> References: <20190507144946.7998-1-tstoyanov@vmware.com> <20190507201157.2673f2de@gandalf.local.home> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > ,\ > >