tools/include/uapi/linux/perf_event.h

Source file repositories/reference/linux-study-clean/tools/include/uapi/linux/perf_event.h

File Facts

System
Linux kernel
Corpus path
tools/include/uapi/linux/perf_event.h
Extension
.h
Size
46434 bytes
Lines
1529
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

context_switch :  1, /* context switch data */
				write_backward :  1, /* write ring buffer from end to beginning */
				namespaces     :  1, /* include namespaces data */
				ksymbol        :  1, /* include ksymbol events */
				bpf_event      :  1, /* include BPF events */
				aux_output     :  1, /* generate AUX records instead of events */
				cgroup         :  1, /* include cgroup events */
				text_poke      :  1, /* include text poke events */
				build_id       :  1, /* use build ID in mmap2 events */
				inherit_thread :  1, /* children only inherit if cloned with CLONE_THREAD */
				remove_on_exec :  1, /* event is removed from task on exec */
				sigtrap        :  1, /* send synchronous SIGTRAP on event */
				defer_callchain:  1, /* request PERF_RECORD_CALLCHAIN_DEFERRED records */
				defer_output   :  1, /* output PERF_RECORD_CALLCHAIN_DEFERRED records */
				__reserved_1   : 24;

	union {
		__u32		wakeup_events;	  /* wake up every n events */
		__u32		wakeup_watermark; /* bytes before wakeup   */
	};

	__u32			bp_type;
	union {
		__u64		bp_addr;
		__u64		kprobe_func; /* for perf_kprobe */
		__u64		uprobe_path; /* for perf_uprobe */
		__u64		config1;     /* extension of config */
	};
	union {
		__u64		bp_len;
		__u64		kprobe_addr;  /* when kprobe_func == NULL */
		__u64		probe_offset; /* for perf_[k,u]probe */
		__u64		config2;      /* extension of config1 */
	};
	__u64	branch_sample_type; /* enum perf_branch_sample_type */

	/*
	 * Defines set of user regs to dump on samples.
	 * See asm/perf_regs.h for details.
	 */
	__u64	sample_regs_user;

	/*
	 * Defines size of the user stack to dump on samples.
	 */
	__u32	sample_stack_user;

	__s32	clockid;
	/*
	 * Defines set of regs to dump for each sample
	 * state captured on:
	 *  - precise = 0: PMU interrupt
	 *  - precise > 0: sampled instruction
	 *
	 * See asm/perf_regs.h for details.
	 */
	__u64	sample_regs_intr;

	/*
	 * Wakeup watermark for AUX area
	 */
	__u32	aux_watermark;

	/*
	 * Max number of frame pointers in a callchain, should be
	 * lower than /proc/sys/kernel/perf_event_max_stack.
	 *
	 * Max number of entries of branch stack should be lower
	 * than the hardware limit.
	 */
	__u16	sample_max_stack;

	__u16	__reserved_2;
	__u32	aux_sample_size;

	union {
		__u32	aux_action;
		struct {
			__u32	aux_start_paused :  1, /* start AUX area tracing paused */
				aux_pause        :  1, /* on overflow, pause AUX area tracing */
				aux_resume       :  1, /* on overflow, resume AUX area tracing */
				__reserved_3     : 29;
		};
	};

	/*
	 * User provided data if sigtrap=1, passed back to user via
	 * siginfo_t::si_perf_data, e.g. to permit user to identify the event.
	 * Note, siginfo_t::si_perf_data is long-sized, and sig_data will be
	 * truncated accordingly on 32 bit architectures.

Annotation

Implementation Notes