Skip to content

Commit 6c17c1c

Browse files
Neil Leederwildea01
authored andcommitted
perf: qcom_l2: fix column exclusion check
The check for column exclusion did not verify that the event being checked was an L2 event, and not a software event. Software events should not be checked for column exclusion. This resulted in a group with both software and L2 events sometimes incorrectly rejecting the L2 event for column exclusion and not counting it. Add a check for PMU type before applying column exclusion logic. Fixes: 21bdbb7 ("perf: add qcom l2 cache perf events driver") Acked-by: Mark Rutland <[email protected]> Signed-off-by: Neil Leeder <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 288be97 commit 6c17c1c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/perf/qcom_l2_pmu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ static int l2_cache_event_init(struct perf_event *event)
546546
}
547547

548548
if ((event != event->group_leader) &&
549+
!is_software_event(event->group_leader) &&
549550
(L2_EVT_GROUP(event->group_leader->attr.config) ==
550551
L2_EVT_GROUP(event->attr.config))) {
551552
dev_dbg_ratelimited(&l2cache_pmu->pdev->dev,
@@ -558,6 +559,7 @@ static int l2_cache_event_init(struct perf_event *event)
558559
list_for_each_entry(sibling, &event->group_leader->sibling_list,
559560
group_entry) {
560561
if ((sibling != event) &&
562+
!is_software_event(sibling) &&
561563
(L2_EVT_GROUP(sibling->attr.config) ==
562564
L2_EVT_GROUP(event->attr.config))) {
563565
dev_dbg_ratelimited(&l2cache_pmu->pdev->dev,

0 commit comments

Comments
 (0)