From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86AA8C433EF for ; Tue, 2 Nov 2021 20:12:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7000C60D42 for ; Tue, 2 Nov 2021 20:12:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231812AbhKBUPP (ORCPT ); Tue, 2 Nov 2021 16:15:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:49414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231605AbhKBUOf (ORCPT ); Tue, 2 Nov 2021 16:14:35 -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 9B66761105; Tue, 2 Nov 2021 20:11:59 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1mi08U-001jOS-OI; Tue, 02 Nov 2021 16:11:58 -0400 Message-ID: <20211102201158.577975229@goodmis.org> User-Agent: quilt/0.66 Date: Tue, 02 Nov 2021 16:11:37 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Jonathan Corbet , Ingo Molnar , Shuah Khan , Tom Zanussi , Kalesh Singh Subject: [for-next][PATCH 11/14] tracing/histogram: Update division by 0 documentation References: <20211102201126.559641540@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kalesh Singh If the divisor is a constant and zero, the undeifned case can be detected and an error returned instead of -1. Link: https://lkml.kernel.org/r/20211029183339.3216491-3-kaleshsingh@google.com Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Shuah Khan Cc: Tom Zanussi Signed-off-by: Kalesh Singh Signed-off-by: Steven Rostedt (VMware) --- 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.0