Skip to content

Commit 00df909

Browse files
rmurphy-armwilldeacon
authored andcommitted
perf/arm-cmn: Remove spurious event aliases
As the name suggests, the "partial DAT flit" event is only counted for the DAT channel, and furthermore is only applicable to device ports, not mesh links (strictly it's only device ports with CHI-A requesters connected, but detecting that degree of detail is more bother than it's worth). Stop generating spurious event aliases for other combinations which aren't meaningful. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/b01a58e3ff05c322547fbfd015f6dbfedf555ed3.1688746690.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 918dc87 commit 00df909

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

drivers/perf/arm-cmn.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,16 +791,22 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
791791
_CMN_EVENT_HNF(_model, _name##_read, _event, 5, SEL_CBUSY_SNTHROTTLE_SEL), \
792792
_CMN_EVENT_HNF(_model, _name##_write, _event, 6, SEL_CBUSY_SNTHROTTLE_SEL)
793793

794-
#define _CMN_EVENT_XP(_name, _event) \
794+
#define _CMN_EVENT_XP_MESH(_name, _event) \
795795
__CMN_EVENT_XP(e_##_name, (_event) | (0 << 2)), \
796796
__CMN_EVENT_XP(w_##_name, (_event) | (1 << 2)), \
797797
__CMN_EVENT_XP(n_##_name, (_event) | (2 << 2)), \
798-
__CMN_EVENT_XP(s_##_name, (_event) | (3 << 2)), \
798+
__CMN_EVENT_XP(s_##_name, (_event) | (3 << 2))
799+
800+
#define _CMN_EVENT_XP_PORT(_name, _event) \
799801
__CMN_EVENT_XP(p0_##_name, (_event) | (4 << 2)), \
800802
__CMN_EVENT_XP(p1_##_name, (_event) | (5 << 2)), \
801803
__CMN_EVENT_XP(p2_##_name, (_event) | (6 << 2)), \
802804
__CMN_EVENT_XP(p3_##_name, (_event) | (7 << 2))
803805

806+
#define _CMN_EVENT_XP(_name, _event) \
807+
_CMN_EVENT_XP_MESH(_name, _event), \
808+
_CMN_EVENT_XP_PORT(_name, _event)
809+
804810
/* Good thing there are only 3 fundamental XP events... */
805811
#define CMN_EVENT_XP(_name, _event) \
806812
_CMN_EVENT_XP(req_##_name, (_event) | (0 << 5)), \
@@ -813,6 +819,10 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
813819
_CMN_EVENT_XP(snp2_##_name, (_event) | (7 << 5)), \
814820
_CMN_EVENT_XP(req2_##_name, (_event) | (8 << 5))
815821

822+
#define CMN_EVENT_XP_DAT(_name, _event) \
823+
_CMN_EVENT_XP_PORT(dat_##_name, (_event) | (3 << 5)), \
824+
_CMN_EVENT_XP_PORT(dat2_##_name, (_event) | (6 << 5))
825+
816826

817827
static struct attribute *arm_cmn_event_attrs[] = {
818828
CMN_EVENT_DTC(cycles),
@@ -943,7 +953,7 @@ static struct attribute *arm_cmn_event_attrs[] = {
943953

944954
CMN_EVENT_XP(txflit_valid, 0x01),
945955
CMN_EVENT_XP(txflit_stall, 0x02),
946-
CMN_EVENT_XP(partial_dat_flit, 0x03),
956+
CMN_EVENT_XP_DAT(partial_dat_flit, 0x03),
947957
/* We treat watchpoints as a special made-up class of XP events */
948958
CMN_EVENT_ATTR(CMN_ANY, watchpoint_up, CMN_TYPE_WP, CMN_WP_UP),
949959
CMN_EVENT_ATTR(CMN_ANY, watchpoint_down, CMN_TYPE_WP, CMN_WP_DOWN),

0 commit comments

Comments
 (0)