Skip to content

Commit

Permalink
perf script: Fix typo in branch event mask
Browse files Browse the repository at this point in the history
BRACH -> BRANCH

Fixes: 88b1473 ("perf script: Separate events from branch types")
Signed-off-by: Yujie Liu <yujie.liu@intel.com>
Reviewed-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20250312075636.429127-1-yujie.liu@intel.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
  • Loading branch information
Yujie Liu authored and Namhyung Kim committed Mar 13, 2025
1 parent 2333cfa commit 2f39ede
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/perf/util/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ enum {
PERF_IP_FLAG_VMENTRY |\
PERF_IP_FLAG_VMEXIT)

#define PERF_IP_FLAG_BRACH_EVENT_MASK \
#define PERF_IP_FLAG_BRANCH_EVENT_MASK \
(PERF_IP_FLAG_BRANCH_MISS | \
PERF_IP_FLAG_NOT_TAKEN)

Expand Down
4 changes: 2 additions & 2 deletions tools/perf/util/trace-event-scripting.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ static int sample_flags_to_name(u32 flags, char *str, size_t size)

flags &= ~(PERF_IP_FLAG_TRACE_BEGIN | PERF_IP_FLAG_TRACE_END);

types = flags & ~PERF_IP_FLAG_BRACH_EVENT_MASK;
types = flags & ~PERF_IP_FLAG_BRANCH_EVENT_MASK;
for (i = 0; sample_flags[i].name; i++) {
if (sample_flags[i].flags != types)
continue;
Expand All @@ -359,7 +359,7 @@ static int sample_flags_to_name(u32 flags, char *str, size_t size)
break;
}

events = flags & PERF_IP_FLAG_BRACH_EVENT_MASK;
events = flags & PERF_IP_FLAG_BRANCH_EVENT_MASK;
for (i = 0; branch_events[i].name; i++) {
if (!(branch_events[i].flags & events))
continue;
Expand Down

0 comments on commit 2f39ede

Please sign in to comment.