Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp381673pxb; Fri, 29 Oct 2021 11:36:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwB7Bz/0LDuorzv5k8EVqlb5SzE1VkCk/IY1TckR/eTSbUm/8D/+WEFRbNME/QMWIUiYT77 X-Received: by 2002:a05:6402:51c8:: with SMTP id r8mr17091718edd.28.1635532614844; Fri, 29 Oct 2021 11:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635532614; cv=none; d=google.com; s=arc-20160816; b=DNdAeS6NZhhMxj4g1fYvQ97813tpPfbWeixs/MXwbT2eXzAIFGiLPjtrB7tZ11RR4R 67GqxR8WkkERd/Vd1ljNOsl6viOoRzCsT59vIAkAoxFaaVv7ed77VaAHI2nGIIfs84+M D0rU2xwyevk3SgZ375xPUu6+dLVRJtTY5EP1Ysm8ptPxJeKIn/3Bq1pihMu1aSlUplJU RLrj7jKeSJh1a2FSQ4gBh+NouIpC+Bo8Dy3n/L4svqERe5OAyjMCD9juGisoPrKJeeP+ HcBxV1K4WHRotOP8lZheBx9guG64pZBFfBiNbM7JJ0SILTxV/ElEF1cOphFI8y1jZ+yW qNQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:cc:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=93iwUDOobBuls+/E5vDDQ4gbsROtaRql+3ZjfJ57cYg=; b=BCumwIhx2FlqBbrRH6Xvo/q+k5pYamj6EO47duxdS/kaaizwBaoYmHvRiBVeEhAwwq Oalki+v/AZi/MuOFxzoHjsZSBdhQ5mqH37PnW/qqkHao4J8KtpCdgWZwyPFMXes27SIz IbqcqX1EDcRRcAESqTck+MciWe5Vkw5pJX0xjCGvdN1MPjtmqUaDJk1Xob2aL7+vhM8c W1bEQqn0ZRKD48v4JnDLv/prFRMtcC422CHeYM1mWppOyhsIcEhVq0Thq5OgDobctt2K uU3wOXYQCfCx6wxNcQ0KWTLZF0xtTFb/+wBSKBCoiwwVyDXOFbjF53jGANoFQHYMU/3p XGFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=QoWnKrdq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n14si8181482ejb.461.2021.10.29.11.36.29; Fri, 29 Oct 2021 11:36:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=QoWnKrdq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230199AbhJ2Sgj (ORCPT + 99 others); Fri, 29 Oct 2021 14:36:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230319AbhJ2Sgi (ORCPT ); Fri, 29 Oct 2021 14:36:38 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C16A6C061766 for ; Fri, 29 Oct 2021 11:34:09 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id g36-20020a25ae64000000b005c1f46f7ee6so7844934ybe.8 for ; Fri, 29 Oct 2021 11:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:cc; bh=93iwUDOobBuls+/E5vDDQ4gbsROtaRql+3ZjfJ57cYg=; b=QoWnKrdqlxAbjyByCl565yFgv7LbAxVEc9fWHpV7QHaZFLrCfCW0jqXuk1TP6EyGVC cYAFFnejyfTMEmIs2d3ZqUbS1lJVfB3UI0Qrg6hCPDLOLWTXr1bD+cefwT8dMsIiTEqU UIOOTbDRosaY9j42FqnnygRFjwNTsC1OkJiqjnjmIlH7pJd7oRBBPAZ1upYbctfWZBQj eRZ4bzqvdE/T0FHzvkKJg1HQUrOOAO820ygOZqL8zZHIew8BjPFuAdPjp5m67cgN0lMB 1F+yvzVPmR68OngynN9I3P+R7lal48E3sLDPV8F/+yml38UYWQkSzAS3uiXMHi2bxjvi X8gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:cc; bh=93iwUDOobBuls+/E5vDDQ4gbsROtaRql+3ZjfJ57cYg=; b=ke8WtFlUib9aW/k1u8RSprPzx+x6bnWAwZDhsR2wn7JLEWBZmdmXtSbEq7Qlh1ev1Q TnpFhD62PJ8WUaIQwFY3fChnAwkPc04DdwEytW7xxsc2Dw/A7Hms5pATdBWh1CUDyPKL 9GRbfStmUb3ajU1l+i3jp+q8Szf4Oyx1ISsj75OVDnhR3fpZ4gH8z0EtlujSBr888IVR iABrhbV58pzhYbIIc3lZ/tVl38ScOhyTNPIaJFMiJTre1RMizceL5CgjGfjVC3Upgfin DaQP3bWlmUQj3xXTx5786flIiFFVRcE52X6SCW0CFGatbUyV7VCHJWzxIrbuiwq3L5kO RVHg== X-Gm-Message-State: AOAM533DhQxh8l7tBw8GT9oyPmYba1BXmfAPIeXmx7CdPPS2QtjxlyXm VSZkpWPBV8bSgq5VEv2IIlz/OgVpYOuwHISX0g== X-Received: from kaleshsingh.mtv.corp.google.com ([2620:15c:211:200:b03:1d88:1cf2:4973]) (user=kaleshsingh job=sendgmr) by 2002:a25:d393:: with SMTP id e141mr327060ybf.244.1635532449020; Fri, 29 Oct 2021 11:34:09 -0700 (PDT) Date: Fri, 29 Oct 2021 11:33:28 -0700 In-Reply-To: <20211029183339.3216491-1-kaleshsingh@google.com> Message-Id: <20211029183339.3216491-3-kaleshsingh@google.com> Mime-Version: 1.0 References: <20211029183339.3216491-1-kaleshsingh@google.com> X-Mailer: git-send-email 2.33.1.1089.g2158813163f-goog Subject: [PATCH 2/4] tracing/histogram: Update division by 0 documentation From: Kalesh Singh Cc: surenb@google.com, hridya@google.com, namhyung@kernel.org, kernel-team@android.com, rostedt@goodmis.org, mhiramat@kernel.org, Kalesh Singh , Jonathan Corbet , Ingo Molnar , Shuah Khan , Tom Zanussi , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the divisor is a constant and zero, the undeifned case can be detected and an error returned instead of -1. Signed-off-by: Kalesh Singh --- Documentation/trace/histogram.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/trace/histogram.rst b/Documentation/trace/histogram.rst index 66ec972dfb78..859fd1b76c63 100644 --- a/Documentation/trace/histogram.rst +++ b/Documentation/trace/histogram.rst @@ -1766,7 +1766,8 @@ using the same key and variable from yet another event:: Expressions support the use of addition, subtraction, multiplication and division operators (+-\*/). -Note that division by zero always returns -1. +Note if division by zero cannot be detected at parse time (i.e. the +divisor is not a constant), the result will be -1. Numeric constants can also be used directly in an expression:: -- 2.33.1.1089.g2158813163f-goog