tools/perf/util/evsel.h

Source file repositories/reference/linux-study-clean/tools/perf/util/evsel.h

File Facts

System
Linux kernel
Corpus path
tools/perf/util/evsel.h
Extension
.h
Size
19039 bytes
Lines
591
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

struct evsel {
	struct perf_evsel	core;
	struct evlist		*evlist;
	off_t			id_offset;
	int			id_pos;
	int			is_pos;
	unsigned int		sample_size;

	/*
	 * These fields can be set in the parse-events code or similar.
	 * Please check evsel__clone() to copy them properly so that
	 * they can be released properly.
	 */
	struct {
		char			*name;
		char			*group_name;
		const char		*group_pmu_name;
#ifdef HAVE_LIBTRACEEVENT
		char			*tp_sys;
		char			*tp_name;
		struct tep_event	*tp_format;
#endif
		char			*filter;
		unsigned long		max_events;
		double			scale;
		const char		*unit;
		struct cgroup		*cgrp;
		const char		*metric_id;
		/*
		 * This point to the first evsel with the same name, intended to store the
		 * aggregated counts in aggregation mode.
		 */
		struct evsel		*first_wildcard_match;
		/* parse modifier helper */
		int			exclude_GH;
		int			sample_read;
		bool			snapshot;
		bool			per_pkg;
		bool			percore;
		bool			precise_max;
		bool			is_libpfm_event;
		bool			collect_stat;
		bool			weak_group;
		bool			bpf_counter;
		bool			use_config_name;
		bool			skippable;
		bool			retire_lat;
		bool			dont_regroup;
		int			bpf_fd;
		struct bpf_object	*bpf_obj;
		struct list_head	config_terms;
		u64			alternate_hw_config;
	};

	/*
	 * metric fields are similar, but needs more care as they can have
	 * references to other metric (evsel).
	 */
	struct evsel		*metric_leader;

	void			*handler;
	struct perf_counts	*counts;
	struct perf_counts	*prev_raw_counts;
	unsigned long		nr_events_printed;
	struct perf_stat_evsel  *stats;
	void			*priv;
	u64			db_id;
	bool			uniquified_name;
	bool 			supported;
	bool 			needs_swap;
	bool 			disabled;
	bool			no_aux_samples;
	bool			immediate;
	bool			tracking;
	bool			ignore_missing_thread;
	bool			forced_leader;
	bool			cmdline_group_boundary;
	bool			reset_group;
	bool			needs_auxtrace_mmap;
	bool			default_metricgroup; /* A member of the Default metricgroup */
	bool			default_show_events; /* If a default group member, show the event */
	bool			needs_uniquify;
	bool			fallenback_eacces;
	bool			fallenback_eopnotsupp;
	struct hashmap		*per_pkg_mask;
	int			err;
	int			script_output_type;
	struct {
		evsel__sb_cb_t	*cb;
		void		*data;

Annotation

Implementation Notes