summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <rostedt@goodmis.org>2023-02-16 04:25:38 +0300
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-02-16 04:25:38 +0300
commit8261ef2eb35fce689a82d346b25e945e16bcb9d3 (patch)
treed5a6b3376211cca08c5126332c234d7820b7b7b1 /tools/perf/scripts/python
parentfc1a9dc101292403babe0c5c2f99f4748580ed98 (diff)
downloadlinux-8261ef2eb35fce689a82d346b25e945e16bcb9d3.tar.xz
tracing: Add BUILD_BUG() to make sure stacktrace fits in strings
The max string length for a histogram variable is 256 bytes. The max depth of a stacktrace is 16. With 8byte words, that's 16 * 8 = 128. Which can easily fit in the string variable. The histogram stacktrace is being stored in the string value (with the given max length), with the assumption it will fit. To make sure that this is always the case (in the case that the stack trace depth increases), add a BUILD_BUG_ON() to test this. Link: https://lore.kernel.org/linux-trace-kernel/20230214002418.0103b9e765d3e5c374d2aa7d@kernel.org/ Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions