Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4361893yba; Tue, 7 May 2019 17:14:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFAQt4pPkP/+ISl1GDPT30Qhs2VFJS1o2IpaLJovq3c+skpiXU9Tmkyty3kD4KmCTzJf7H X-Received: by 2002:a17:902:6948:: with SMTP id k8mr2818602plt.81.1557274461864; Tue, 07 May 2019 17:14:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557274461; cv=none; d=google.com; s=arc-20160816; b=yVZGj1Os8qHe+SawGP8+vXNNqXN4dfwMFyfq8ChuXq7G1pZcG1BpT5TgKHf2Fl0Mc4 OnyxoZHWgFx424RLiV32Q9L3Ood1dVYg5wkd0MAk6H/syFzIIYDJxshw/lWyah7x+ya8 Qlf4jwZAeZ59H6hfOt8o8kd1jgr4ncNZlHhSjjC7aDei9z8sKvT3fhAMtrKThGiEMv0M jc4Y2mLOCeuOl5YwHar18M8bRZFNPDodzQsIfbzUq6ASvrtEs+Uf47xta114l94bjRDe dLz9YsuPDqffz5Z/DPED42WyRsXp/3jKzoSS1NJ4378Di18KCV3B3x6QArY9185ZB/4J 6sUQ== 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=TQkyKoBZ8oXRlR/IM0REM5RmZBSooIgmEH74Y+x9ZZU=; b=Th0RQzu4Dq3sgIw3C3SIvp5rzmuC5Dayy+laF4Dk5Qsh/ZWg5kzSn/x+fbUnNNzicz IIKxzh1bKhpDd5F225tQiFmrE508Wlo7iDrcDmyF8KLW8iNSAuKmFQlRMXLGi+suVM4T Ty7hoj/tFy1Pl74B3uCN3q82NSJ/Xl3D6QjJMjK6jRNj6Xwp8EjGTS0kXUFK7T5LGQIX VRo9Gl6n2o0dUqyI41O8B9jsIx2wJeYdkIu8xVwGsvt2wZZRiocibAUvNBGSviGwQrr4 0eBV3+9WRtxMI0tbrK0FVP/rhu61KoJ8NLEjPKhfL3F5K6X4LybG2zgyvRhit3K63G4d uzYg== 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 d11si20506783pfn.171.2019.05.07.17.14.05; Tue, 07 May 2019 17:14:21 -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 S1726452AbfEHAMB (ORCPT + 99 others); Tue, 7 May 2019 20:12:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:44584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726276AbfEHAMA (ORCPT ); Tue, 7 May 2019 20:12:00 -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 8F4F720C01; Wed, 8 May 2019 00:11:59 +0000 (UTC) Date: Tue, 7 May 2019 20:11:57 -0400 From: Steven Rostedt To: Tzvetomir Stoyanov Cc: linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Zanussi , Jonathan Corbet Subject: Re: [PATCH v2] Documentation/trace: Add clarification how histogram onmatch works Message-ID: <20190507201157.2673f2de@gandalf.local.home> In-Reply-To: <20190507144946.7998-1-tstoyanov@vmware.com> References: <20190507144946.7998-1-tstoyanov@vmware.com> 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 Tom, Can you review this patch. Jon, After Tom gives his review, can you take this in your tree? Thanks! Reviewed-by: Steven Rostedt (VMware) -- 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/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,\