tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.h

Source file repositories/reference/linux-study-clean/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.h

File Facts

System
Linux kernel
Corpus path
tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.h
Extension
.h
Size
2051 bytes
Lines
93
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 intel_pt_pkt {
	enum intel_pt_pkt_type	type;
	int			count;
	uint64_t		payload;
};

/*
 * Decoding of BIP packets conflicts with single-byte TNT packets. Since BIP
 * packets only occur in the context of a block (i.e. between BBP and BEP), that
 * context must be recorded and passed to the packet decoder.
 */
enum intel_pt_pkt_ctx {
	INTEL_PT_NO_CTX,	/* BIP packets are invalid */
	INTEL_PT_BLK_4_CTX,	/* 4-byte BIP packets */
	INTEL_PT_BLK_8_CTX,	/* 8-byte BIP packets */
};

const char *intel_pt_pkt_name(enum intel_pt_pkt_type);

int intel_pt_get_packet(const unsigned char *buf, size_t len,
			struct intel_pt_pkt *packet,
			enum intel_pt_pkt_ctx *ctx);

void intel_pt_upd_pkt_ctx(const struct intel_pt_pkt *packet,
			  enum intel_pt_pkt_ctx *ctx);

int intel_pt_pkt_desc(const struct intel_pt_pkt *packet, char *buf, size_t len);

#endif

Annotation

Implementation Notes