summaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorGabriele Monaco <gmonaco@redhat.com>2025-02-07 09:04:44 +0100
committerNamhyung Kim <namhyung@kernel.org>2025-02-26 13:48:02 -0800
commit4a75e8c3b225e668d8e122ec66fd2c0fe9b53b76 (patch)
tree4b119170934e861418ebdb5ea28fc30b372db27f /tools/perf/util/trace-event-scripting.c
parentf4dc5a3355a84f53ff3287d496728c7b77160069 (diff)
perf ftrace latency: variable histogram buckets
The max-latency value can make the histogram smaller, but not larger, we have a maximum of 22 buckets and specifying a max-latency that would require more buckets has no effect. Dynamically allocate the buckets and compute the bucket number from the max latency as (max-min) / range + 2 If the maximum is not specified, we still set the bucket number to 22 and compute the maximum accordingly. Fail if the maximum is smaller than min+range, this way we make sure we always have 3 buckets: those below min, those above max and one in the middle. Since max-latency is not available in log2 mode, always use 22 buckets. Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Link: https://lore.kernel.org/r/20250207080446.77630-1-gmonaco@redhat.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions