arch/x86/events/intel/ds.c

Source file repositories/reference/linux-study-clean/arch/x86/events/intel/ds.c

File Facts

System
Linux kernel
Corpus path
arch/x86/events/intel/ds.c
Extension
.c
Size
100234 bytes
Lines
3462
Domain
Architecture Layer
Bucket
arch/x86
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

struct pebs_record_32 {
	u32 flags, ip;
	u32 ax, bc, cx, dx;
	u32 si, di, bp, sp;
};

 */

union omr_encoding {
	struct {
		u8 omr_source : 4;
		u8 omr_remote : 1;
		u8 omr_hitm : 1;
		u8 omr_snoop : 1;
		u8 omr_promoted : 1;
	};
	u8 omr_full;
};

union intel_x86_pebs_dse {
	u64 val;
	struct {
		unsigned int ld_dse:4;
		unsigned int ld_stlb_miss:1;
		unsigned int ld_locked:1;
		unsigned int ld_data_blk:1;
		unsigned int ld_addr_blk:1;
		unsigned int ld_reserved:24;
	};
	struct {
		unsigned int st_l1d_hit:1;
		unsigned int st_reserved1:3;
		unsigned int st_stlb_miss:1;
		unsigned int st_locked:1;
		unsigned int st_reserved2:26;
	};
	struct {
		unsigned int st_lat_dse:4;
		unsigned int st_lat_stlb_miss:1;
		unsigned int st_lat_locked:1;
		unsigned int ld_reserved3:26;
	};
	struct {
		unsigned int mtl_dse:5;
		unsigned int mtl_locked:1;
		unsigned int mtl_stlb_miss:1;
		unsigned int mtl_fwd_blk:1;
		unsigned int ld_reserved4:24;
	};
	struct {
		unsigned int lnc_dse:8;
		unsigned int ld_reserved5:2;
		unsigned int lnc_stlb_miss:1;
		unsigned int lnc_locked:1;
		unsigned int lnc_data_blk:1;
		unsigned int lnc_addr_blk:1;
		unsigned int ld_reserved6:18;
	};
	struct {
		unsigned int pnc_dse: 8;
		unsigned int pnc_l2_miss:1;
		unsigned int pnc_stlb_clean_hit:1;
		unsigned int pnc_stlb_any_hit:1;
		unsigned int pnc_stlb_miss:1;
		unsigned int pnc_locked:1;
		unsigned int pnc_data_blk:1;
		unsigned int pnc_addr_blk:1;
		unsigned int pnc_fb_full:1;
		unsigned int ld_reserved8:16;
	};
	struct {
		unsigned int arw_dse:8;
		unsigned int arw_l2_miss:1;
		unsigned int arw_xq_promotion:1;
		unsigned int arw_reissue:1;
		unsigned int arw_stlb_miss:1;
		unsigned int arw_locked:1;
		unsigned int arw_data_blk:1;
		unsigned int arw_addr_blk:1;
		unsigned int arw_fb_full:1;
		unsigned int ld_reserved9:16;
	};
};


/*
 * Map PEBS Load Latency Data Source encodings to generic
 * memory data source information
 */
#define P(a, b) PERF_MEM_S(a, b)

Annotation

Implementation Notes