Linux Perf
intel-pt-decoder.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "intel-pt-insn-decoder.h"
Include dependency graph for intel-pt-decoder.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  intel_pt_state
 
struct  intel_pt_buffer
 
struct  intel_pt_params
 

Macros

#define INTEL_PT_IN_TX   (1 << 0)
 
#define INTEL_PT_ABORT_TX   (1 << 1)
 
#define INTEL_PT_ASYNC   (1 << 2)
 
#define INTEL_PT_FUP_IP   (1 << 3)
 

Enumerations

enum  intel_pt_sample_type {
  INTEL_PT_BRANCH = 1 << 0, INTEL_PT_INSTRUCTION = 1 << 1, INTEL_PT_TRANSACTION = 1 << 2, INTEL_PT_PTW = 1 << 3,
  INTEL_PT_MWAIT_OP = 1 << 4, INTEL_PT_PWR_ENTRY = 1 << 5, INTEL_PT_EX_STOP = 1 << 6, INTEL_PT_PWR_EXIT = 1 << 7,
  INTEL_PT_CBR_CHG = 1 << 8
}
 
enum  intel_pt_period_type { INTEL_PT_PERIOD_NONE, INTEL_PT_PERIOD_INSTRUCTIONS, INTEL_PT_PERIOD_TICKS, INTEL_PT_PERIOD_MTC }
 
enum  {
  INTEL_PT_ERR_NOMEM = 1, INTEL_PT_ERR_INTERN, INTEL_PT_ERR_BADPKT, INTEL_PT_ERR_NODATA,
  INTEL_PT_ERR_NOINSN, INTEL_PT_ERR_MISMAT, INTEL_PT_ERR_OVR, INTEL_PT_ERR_LOST,
  INTEL_PT_ERR_UNK, INTEL_PT_ERR_NELOOP, INTEL_PT_ERR_MAX
}
 
enum  intel_pt_param_flags { INTEL_PT_FUP_WITH_NLIP = 1 << 0 }
 

Functions

struct intel_pt_decoderintel_pt_decoder_new (struct intel_pt_params *params)
 
void intel_pt_decoder_free (struct intel_pt_decoder *decoder)
 
const struct intel_pt_stateintel_pt_decode (struct intel_pt_decoder *decoder)
 
unsigned char * intel_pt_find_overlap (unsigned char *buf_a, size_t len_a, unsigned char *buf_b, size_t len_b, bool have_tsc, bool *consecutive)
 
int intel_pt__strerror (int code, char *buf, size_t buflen)
 

Macro Definition Documentation

◆ INTEL_PT_ABORT_TX

#define INTEL_PT_ABORT_TX   (1 << 1)

Definition at line 26 of file intel-pt-decoder.h.

◆ INTEL_PT_ASYNC

#define INTEL_PT_ASYNC   (1 << 2)

Definition at line 27 of file intel-pt-decoder.h.

◆ INTEL_PT_FUP_IP

#define INTEL_PT_FUP_IP   (1 << 3)

Definition at line 28 of file intel-pt-decoder.h.

◆ INTEL_PT_IN_TX

#define INTEL_PT_IN_TX   (1 << 0)

Definition at line 25 of file intel-pt-decoder.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
INTEL_PT_ERR_NOMEM 
INTEL_PT_ERR_INTERN 
INTEL_PT_ERR_BADPKT 
INTEL_PT_ERR_NODATA 
INTEL_PT_ERR_NOINSN 
INTEL_PT_ERR_MISMAT 
INTEL_PT_ERR_OVR 
INTEL_PT_ERR_LOST 
INTEL_PT_ERR_UNK 
INTEL_PT_ERR_NELOOP 
INTEL_PT_ERR_MAX 

Definition at line 49 of file intel-pt-decoder.h.

◆ intel_pt_param_flags

Enumerator
INTEL_PT_FUP_WITH_NLIP 

Definition at line 63 of file intel-pt-decoder.h.

◆ intel_pt_period_type

Enumerator
INTEL_PT_PERIOD_NONE 
INTEL_PT_PERIOD_INSTRUCTIONS 
INTEL_PT_PERIOD_TICKS 
INTEL_PT_PERIOD_MTC 

Definition at line 42 of file intel-pt-decoder.h.

◆ intel_pt_sample_type

Enumerator
INTEL_PT_BRANCH 
INTEL_PT_INSTRUCTION 
INTEL_PT_TRANSACTION 
INTEL_PT_PTW 
INTEL_PT_MWAIT_OP 
INTEL_PT_PWR_ENTRY 
INTEL_PT_EX_STOP 
INTEL_PT_PWR_EXIT 
INTEL_PT_CBR_CHG 

Definition at line 30 of file intel-pt-decoder.h.

Function Documentation

◆ intel_pt__strerror()

int intel_pt__strerror ( int  code,
char *  buf,
size_t  buflen 
)

Definition at line 392 of file intel-pt-decoder.c.

◆ intel_pt_decode()

const struct intel_pt_state* intel_pt_decode ( struct intel_pt_decoder decoder)

Definition at line 2332 of file intel-pt-decoder.c.

Here is the call graph for this function:

◆ intel_pt_decoder_free()

void intel_pt_decoder_free ( struct intel_pt_decoder decoder)

Definition at line 347 of file intel-pt-decoder.c.

Here is the call graph for this function:

◆ intel_pt_decoder_new()

struct intel_pt_decoder* intel_pt_decoder_new ( struct intel_pt_params params)

Definition at line 212 of file intel-pt-decoder.c.

Here is the call graph for this function:

◆ intel_pt_find_overlap()

unsigned char* intel_pt_find_overlap ( unsigned char *  buf_a,
size_t  len_a,
unsigned char *  buf_b,
size_t  len_b,
bool  have_tsc,
bool *  consecutive 
)

intel_pt_find_overlap - determine start of non-overlapped trace data. : first buffer : size of first buffer : second buffer : size of second buffer : can use TSC packets to detect overlap : returns true if there is data in buf_b that is consecutive to buf_a

When trace samples or snapshots are recorded there is the possibility that the data overlaps. Note that, for the purposes of decoding, data is only useful if it begins with a PSB packet.

Return: A pointer into from where non-overlapped data starts, or + if there is no non-overlapped data.

Definition at line 2641 of file intel-pt-decoder.c.

Here is the call graph for this function: