diff options
| author | Leo Yan <leo.yan@arm.com> | 2026-07-02 20:51:40 +0100 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2026-07-03 16:51:59 -0700 |
| commit | 3ea91599b7b6e05cd21dfa1214f251dfe7770468 (patch) | |
| tree | 7541943931c6dcb14753cb2727851a6957361505 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 9bb1423295d1f84d3a557bc690fbb791d8a773ac (diff) | |
perf cs-etm: Use thread-stack for last branch entries
CS ETM maintains its own circular array for last branch entries, with
local helpers to update, copy and reset the branch stack. This
duplicates logic already provided by the common code.
Record taken branches with thread_stack__event() and synthesize
PERF_SAMPLE_BRANCH_STACK data with thread_stack__br_sample(). This
removes the private last_branch_rb buffer and its position tracking.
This also makes the branch history state belong to the thread rather
than the trace queue. That is a better fit for CoreSight traces where
a trace queue can effectively be CPU scoped, while call/return history
is per thread.
Keep the buffer number updated via thread_stack__set_trace_nr(), which
is used when exporting samples to Python scripts. Pass callstack=false
for now; synthesized callchains are added by a later patch.
The output should remain same, except that be->flags.predicted is no
longer set. Since CoreSight trace does not provide branch prediction
information, clearing the flag avoids confusion.
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
