summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorWander Lairson Costa <wander@redhat.com>2026-03-09 16:46:27 -0300
committerTomas Glozar <tglozar@redhat.com>2026-03-11 15:29:50 +0100
commit48fbcd4db34b5ea9135801ffe4585a22681c0815 (patch)
treed2bcdecea030dc4dd65fb9f6b18848f9b09ab71e /tools/perf/scripts/python/stackcollapse.py
parentea5ea8359cd68037d8a093df67d55b750818ab8f (diff)
rtla/timerlat: Simplify RTLA_NO_BPF environment variable check
The code that checks the RTLA_NO_BPF environment variable calls getenv() twice and uses strncmp() with a length of 2 to compare against the single-character string "1". This is inefficient and the comparison length is unnecessarily long. Store the result of getenv() in a local variable to avoid the redundant call, and replace strncmp() with strncmp_static() for the exact match comparison. This follows the same pattern established in recent commits that improved string comparison consistency throughout the rtla codebase. Signed-off-by: Wander Lairson Costa <wander@redhat.com> Link: https://lore.kernel.org/r/20260309195040.1019085-15-wander@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions