/** * struct perf_pmu
*/ struct perf_pmu { /** @name: The name of the PMU such as "cpu". */ constchar *name; /** * @alias_name: Optional alternate name for the PMU determined in * architecture specific code.
*/ char *alias_name; /** * @id: Optional PMU identifier read from * <sysfs>/bus/event_source/devices/<name>/identifier.
*/ constchar *id; /** * @type: Perf event attributed type value, read from * <sysfs>/bus/event_source/devices/<name>/type.
*/
__u32 type; /** * @selectable: Can the PMU name be selected as if it were an event?
*/ bool selectable; /** * @is_core: Is the PMU the core CPU PMU? Determined by the name being * "cpu" or by the presence of * <sysfs>/bus/event_source/devices/<name>/cpus. There may be >1 core * PMU on systems like Intel hybrid.
*/ bool is_core; /** * @is_uncore: Is the PMU not within the CPU core? Determined by the * presence of <sysfs>/bus/event_source/devices/<name>/cpumask.
*/ bool is_uncore; /** * @auxtrace: Are events auxiliary events? Determined in architecture * specific code.
*/ bool auxtrace; /** * @formats_checked: Only check PMU's formats are valid for * perf_event_attr once.
*/ bool formats_checked; /** @config_masks_present: Are there config format values? */ bool config_masks_present; /** @config_masks_computed: Set when masks are lazily computed. */ bool config_masks_computed; /** * @max_precise: Number of levels of :ppp precision supported by the * PMU, read from * <sysfs>/bus/event_source/devices/<name>/caps/max_precise.
*/ int max_precise; /** * @perf_event_attr_init_default: Optional function to default * initialize PMU specific parts of the perf_event_attr.
*/ void (*perf_event_attr_init_default)(conststruct perf_pmu *pmu, struct perf_event_attr *attr); /** * @cpus: Empty or the contents of either of: * <sysfs>/bus/event_source/devices/<name>/cpumask. * <sysfs>/bus/event_source/devices/<cpu>/cpus.
*/ struct perf_cpu_map *cpus; /** * @format: Holds the contents of files read from * <sysfs>/bus/event_source/devices/<name>/format/. The contents specify * which event parameter changes what config, config1 or config2 bits.
*/ struct list_head format; /** * @aliases: List of struct perf_pmu_alias. Each alias corresponds to an * event read from <sysfs>/bus/event_source/devices/<name>/events/ or * from json events in pmu-events.c.
*/ struct hashmap *aliases; /** * @events_table: The events table for json events in pmu-events.c.
*/ conststruct pmu_events_table *events_table; /** @sysfs_aliases: Number of sysfs aliases loaded. */
uint32_t sysfs_aliases; /** @cpu_json_aliases: Number of json event aliases loaded specific to the CPUID. */
uint32_t cpu_json_aliases; /** @sys_json_aliases: Number of json event aliases loaded matching the PMU's identifier. */
uint32_t sys_json_aliases; /** * @cpu_common_json_aliases: Number of json events that overlapped with sysfs when * loading all sysfs events.
*/
uint32_t cpu_common_json_aliases; /** @sysfs_aliases_loaded: Are sysfs aliases loaded from disk? */ bool sysfs_aliases_loaded; /** * @cpu_aliases_added: Have all json events table entries for the PMU * been added?
*/ bool cpu_aliases_added; /** @caps_initialized: Has the list caps been initialized? */ bool caps_initialized; /** @nr_caps: The length of the list caps. */
u32 nr_caps; /** * @caps: Holds the contents of files read from * <sysfs>/bus/event_source/devices/<name>/caps/. * * The contents are pairs of the filename with the value of its * contents, for example, max_precise (see above) may have a value of 3.
*/ struct list_head caps; /** @list: Element on pmus list in pmu.c. */ struct list_head list;
/** * @config_masks: Derived from the PMU's format data, bits that are * valid within the config value.
*/
__u64 config_masks[PERF_PMU_FORMAT_VALUE_CONFIG_END];
/** * @missing_features: Features to inhibit when events on this PMU are * opened.
*/ struct { /** * @exclude_guest: Disables perf_event_attr exclude_guest and * exclude_host.
*/ bool exclude_guest; /** * @checked: Are the missing features checked?
*/ bool checked;
} missing_features;
/** * @mem_events: List of the supported mem events
*/ struct perf_mem_event *mem_events;
};
/** * perf_pmu_is_software - is the PMU a software PMU as in it uses the * perf_sw_context in the kernel?
*/ bool perf_pmu__is_software(conststruct perf_pmu *pmu);
int perf_pmu__event_source_devices_scnprintf(char *pathname, size_t size); int perf_pmu__pathname_scnprintf(char *buf, size_t size, constchar *pmu_name, constchar *filename); int perf_pmu__event_source_devices_fd(void); int perf_pmu__pathname_fd(int dirfd, constchar *pmu_name, constchar *filename, int flags);
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.