Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp609414yba; Fri, 3 May 2019 07:39:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyP+Lj7TRW36LdodPgtBs2eZC1vG8fxS6odzT1amzELM4/1CHsL52rdAFQliAbrpz2UvBN X-Received: by 2002:a63:f712:: with SMTP id x18mr10940048pgh.293.1556894355332; Fri, 03 May 2019 07:39:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556894355; cv=none; d=google.com; s=arc-20160816; b=fXAl0xXpisSmNLoWlnJeMtBjSgmMPZLhp5Rg6hEHoMwnBYGkJ3DsaHpzoQLSLtPepN 1nGZD6xFcF43D6fSEHr3lAuaErMog2UOIuLO2vMVAqwymDFc9dGEOFOztQPwCyU0OP9l 1ExQovxQT1ARGKaTScFjHT6KMVg8ine2s7ywTkqrTC7NNtWssi8yrA5BmGoLUq2+KABn 8Pq2eqSAnGB/EYkt0uys0XfDd2kh6DWNxo9rFk2qr+o1hHFVdYXzIA8kdU7FTcD3/K3K 030UPh8oGBVD3iTikLnD++yk3EquCR13khyVNh6b+qncOeNpE21NeO+VIlxEUhW+P5fo 0cgQ== 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 :message-id:date:subject:cc:to:from; bh=ag5YD56R8iiokalY4V0lLd6QHIYD8KrtwfvDQho44QQ=; b=hTyZ3FXxV/fYDrdWVngZo6CpZqxGRL12wQZ9L58ySTwWGMs/oiMpiwsIVve08y2eiV 8Em57Jp2AfzEoDel+AnRPSznZhhOVCfjNXHMK2lxhOxbf1LVo5yIxWfTaOs6fe3MLsPO tTOUTqZrzB4cypglb76tERe8FfvjDm6REkihOP8mANyKMSZndpfA+O4A4inMq9y5U9Pu q6f6ckHE+HVk/9bSBj478/BLiBbtqmegjYdfexUzDfxKoBGmGQIXP7w0XS9r3nEoV0dZ M2aEqSHeWsQSg6RPJBvXiinVnLvBRRn4kfQ43t10AUsTm9te65pkDuH+m1ON8Aju2M09 743Q== 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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9si2372531pfr.189.2019.05.03.07.38.58; Fri, 03 May 2019 07:39:15 -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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728279AbfECOfn (ORCPT + 99 others); Fri, 3 May 2019 10:35:43 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39601 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728110AbfECOfm (ORCPT ); Fri, 3 May 2019 10:35:42 -0400 Received: by mail-wm1-f66.google.com with SMTP id n25so6997481wmk.4; Fri, 03 May 2019 07:35:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ag5YD56R8iiokalY4V0lLd6QHIYD8KrtwfvDQho44QQ=; b=PyUYuZOfgS++DS4stzme8YOpP5O5YBApfAjUu78jJJuaIbfc2xwUbrDSP++8qcUY3V LEw5vGL7ukjhfXc5NAjYOAl12E+0iZ7gMSSHbS5OIbHJeNiGvje/qzi1I03x/GdstKc1 8Ubrt4SLAkQZAM7H3aqE2s/qucpPA3Vx+/V+PN4oUdcGoGy08khvEpcp0Kcdh9ucjozw CuKnX7k1UwDXmQKc8bIb6h+Yb+Avy2onbbH3MMGFK9DWZ/HgSOFIzblcG/nHciKsfiGv xlNp4fMGoofrlbVVBwMkIWUd+gFTGgQeyE01PcUdN3bemy42zrtZ1h18P2pOLnJQmLnh LvyA== X-Gm-Message-State: APjAAAXvF2i4CBGu3Li9DKleQlKjpsY/ESsnWJnrbCSNQiTarjM3aVDZ PF407n5mRwFrj3zYU0D06Gg= X-Received: by 2002:a05:600c:24f:: with SMTP id 15mr6232702wmj.48.1556894139828; Fri, 03 May 2019 07:35:39 -0700 (PDT) Received: from oberon.eng.vmware.com ([146.247.46.5]) by smtp.gmail.com with ESMTPSA id h131sm3990676wmh.44.2019.05.03.07.35.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2019 07:35:38 -0700 (PDT) From: Tzvetomir Stoyanov To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org, tom.zanussi@linux.intel.com Subject: [PATCH] Documentation/trace: Add clarification how histogram onmatch works Date: Fri, 3 May 2019 17:35:37 +0300 Message-Id: <20190503143537.19752-1-tstoyanov@vmware.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Documentation/trace/histogram.txt b/Documentation/trace/histogram.txt index 7ffea6aa22e3..b75a75cfab8c 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 case + multiple histogram keys are used, they all must match in the specified + 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,9 @@ 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 (saved_pid matches 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.20.1