aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalesh Singh <[email protected]>2021-10-29 11:33:28 -0700
committerSteven Rostedt (VMware) <[email protected]>2021-11-01 20:46:29 -0400
commit0ca6d12c9768ee15e6c7d65ddb5cb35c05946e1e (patch)
treefabdf5a8687aa930965db05fd35e4ce4c259fb14
parent8b5d46fd7a3892a2e71c9ba6330f1b46d533d0a0 (diff)
tracing/histogram: Update division by 0 documentation
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/[email protected] Cc: Jonathan Corbet <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Tom Zanussi <[email protected]> Signed-off-by: Kalesh Singh <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
-rw-r--r--Documentation/trace/histogram.rst3
1 files changed, 2 insertions, 1 deletions
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::