/* * This is the default event number for cycle count, if supported, since the * ARM Coresight PMU specification does not define a standard event code * for cycle count.
*/ #define ARM_CSPMU_EVT_CYCLES_DEFAULT (0x1ULL << 32)
/* * The ARM Coresight PMU supports up to 256 event counters. * If the counters are larger-than 32-bits, then the PMU includes at * most 128 counters.
*/ #define ARM_CSPMU_MAX_HW_CNTRS 256
/* The cycle counter, if implemented, is located at counter[31]. */ #define ARM_CSPMU_CYCLE_CNTR_IDX 31
/* This tracks the events assigned to each counter in the PMU. */ struct arm_cspmu_hw_events { /* The events that are active on the PMU for a given logical index. */ struct perf_event **events;
/* * Each bit indicates a logical counter is being used (or not) for an * event. If cycle counter is supported and there is a gap between * regular and cycle counter, the last logical counter is mapped to * cycle counter. Otherwise, logical and physical have 1-to-1 mapping.
*/
DECLARE_BITMAP(used_ctrs, ARM_CSPMU_MAX_HW_CNTRS);
};
/* Contains ops to query vendor/implementer specific attribute. */ struct arm_cspmu_impl_ops { /* Get event attributes */ struct attribute **(*get_event_attrs)(conststruct arm_cspmu *cspmu); /* Get format attributes */ struct attribute **(*get_format_attrs)(conststruct arm_cspmu *cspmu); /* Get string identifier */ constchar *(*get_identifier)(conststruct arm_cspmu *cspmu); /* Get PMU name to register to core perf */ constchar *(*get_name)(conststruct arm_cspmu *cspmu); /* Check if the event corresponds to cycle count event */ bool (*is_cycle_counter_event)(conststruct perf_event *event); /* Decode event type/id from configs */
u32 (*event_type)(conststruct perf_event *event); /* Set event filters */ void (*set_cc_filter)(struct arm_cspmu *cspmu, conststruct perf_event *event); void (*set_ev_filter)(struct arm_cspmu *cspmu, conststruct perf_event *event); /* Implementation specific event validation */ int (*validate_event)(struct arm_cspmu *cspmu, struct perf_event *event); /* Hide/show unsupported events */
umode_t (*event_attr_is_visible)(struct kobject *kobj, struct attribute *attr, int unused);
};
/* Default function to show event attribute in sysfs. */
ssize_t arm_cspmu_sysfs_event_show(struct device *dev, struct device_attribute *attr, char *buf);
/* Register vendor backend. */ int arm_cspmu_impl_register(conststruct arm_cspmu_impl_match *impl_match);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.