|
static bool | intel_pt_sample_time (enum intel_pt_pkt_state pkt_state) |
|
static uint64_t | intel_pt_lower_power_of_2 (uint64_t x) |
|
static void | intel_pt_setup_period (struct intel_pt_decoder *decoder) |
|
static uint64_t | multdiv (uint64_t t, uint32_t n, uint32_t d) |
|
struct intel_pt_decoder * | intel_pt_decoder_new (struct intel_pt_params *params) |
|
static void | intel_pt_pop_blk (struct intel_pt_stack *stack) |
|
static uint64_t | intel_pt_pop (struct intel_pt_stack *stack) |
|
static int | intel_pt_alloc_blk (struct intel_pt_stack *stack) |
|
static int | intel_pt_push (struct intel_pt_stack *stack, uint64_t ip) |
|
static void | intel_pt_clear_stack (struct intel_pt_stack *stack) |
|
static void | intel_pt_free_stack (struct intel_pt_stack *stack) |
|
void | intel_pt_decoder_free (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_ext_err (int code) |
|
int | intel_pt__strerror (int code, char *buf, size_t buflen) |
|
static uint64_t | intel_pt_calc_ip (const struct intel_pt_pkt *packet, uint64_t last_ip) |
|
static void | intel_pt_set_last_ip (struct intel_pt_decoder *decoder) |
|
static void | intel_pt_set_ip (struct intel_pt_decoder *decoder) |
|
static void | intel_pt_decoder_log_packet (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_bug (struct intel_pt_decoder *decoder) |
|
static void | intel_pt_clear_tx_flags (struct intel_pt_decoder *decoder) |
|
static void | intel_pt_update_in_tx (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_bad_packet (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_get_data (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_get_next_data (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_get_split_packet (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_pkt_lookahead (struct intel_pt_decoder *decoder, intel_pt_pkt_cb_t cb, void *data) |
|
static void | intel_pt_fixup_last_mtc (uint32_t mtc, int mtc_shift, uint32_t *last_mtc) |
|
static int | intel_pt_calc_cyc_cb (struct intel_pt_pkt_info *pkt_info) |
|
static void | intel_pt_calc_cyc_to_tsc (struct intel_pt_decoder *decoder, bool from_mtc) |
|
static int | intel_pt_get_next_packet (struct intel_pt_decoder *decoder) |
|
static uint64_t | intel_pt_next_period (struct intel_pt_decoder *decoder) |
|
static uint64_t | intel_pt_next_sample (struct intel_pt_decoder *decoder) |
|
static void | intel_pt_sample_insn (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_walk_insn (struct intel_pt_decoder *decoder, struct intel_pt_insn *intel_pt_insn, uint64_t ip) |
|
static bool | intel_pt_fup_event (struct intel_pt_decoder *decoder) |
|
static bool | intel_pt_fup_with_nlip (struct intel_pt_decoder *decoder, struct intel_pt_insn *intel_pt_insn, uint64_t ip, int err) |
|
static int | intel_pt_walk_fup (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_walk_tip (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_walk_tnt (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_mode_tsx (struct intel_pt_decoder *decoder, bool *no_tip) |
|
static void | intel_pt_calc_tsc_timestamp (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_overflow (struct intel_pt_decoder *decoder) |
|
static void | intel_pt_calc_tma (struct intel_pt_decoder *decoder) |
|
static void | intel_pt_calc_mtc_timestamp (struct intel_pt_decoder *decoder) |
|
static void | intel_pt_calc_cbr (struct intel_pt_decoder *decoder) |
|
static void | intel_pt_calc_cyc_timestamp (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_walk_psbend (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_walk_fup_tip (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_walk_trace (struct intel_pt_decoder *decoder) |
|
static bool | intel_pt_have_ip (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_walk_psb (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_walk_to_ip (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_sync_ip (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_part_psb (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_rest_psb (struct intel_pt_decoder *decoder, int part_psb) |
|
static int | intel_pt_get_split_psb (struct intel_pt_decoder *decoder, int part_psb) |
|
static int | intel_pt_scan_for_psb (struct intel_pt_decoder *decoder) |
|
static int | intel_pt_sync (struct intel_pt_decoder *decoder) |
|
static uint64_t | intel_pt_est_timestamp (struct intel_pt_decoder *decoder) |
|
const struct intel_pt_state * | intel_pt_decode (struct intel_pt_decoder *decoder) |
|
static bool | intel_pt_next_psb (unsigned char **buf, size_t *len) |
|
static bool | intel_pt_step_psb (unsigned char **buf, size_t *len) |
|
static unsigned char * | intel_pt_last_psb (unsigned char *buf, size_t len) |
|
static bool | intel_pt_next_tsc (unsigned char *buf, size_t len, uint64_t *tsc, size_t *rem) |
|
static int | intel_pt_tsc_cmp (uint64_t tsc1, uint64_t tsc2) |
|
static unsigned char * | intel_pt_find_overlap_tsc (unsigned char *buf_a, size_t len_a, unsigned char *buf_b, size_t len_b, bool *consecutive) |
|
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) |
|
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.
static unsigned char* intel_pt_find_overlap_tsc |
( |
unsigned char * |
buf_a, |
|
|
size_t |
len_a, |
|
|
unsigned char * |
buf_b, |
|
|
size_t |
len_b, |
|
|
bool * |
consecutive |
|
) |
| |
|
static |
intel_pt_find_overlap_tsc - determine start of non-overlapped trace data using TSC. : first buffer : size of first buffer : second buffer : size of second buffer : returns true if there is data in buf_b that is consecutive to buf_a
If the trace contains TSC we can look at the last TSC of and the first TSC of in order to determine if the buffers overlap, and then walk forward in until a later TSC is found. A precondition is that and are positioned at a PSB.
Return: A pointer into from where non-overlapped data starts, or + if there is no non-overlapped data.
Definition at line 2580 of file intel-pt-decoder.c.
static bool intel_pt_next_psb |
( |
unsigned char ** |
buf, |
|
|
size_t * |
len |
|
) |
| |
|
static |
intel_pt_next_psb - move buffer pointer to the start of the next PSB packet. : pointer to buffer pointer : size of buffer
Updates the buffer pointer to point to the start of the next PSB packet if there is one, otherwise the buffer pointer is unchanged. If is updated, is adjusted accordingly.
Return: true if a PSB packet is found, false otherwise.
Definition at line 2421 of file intel-pt-decoder.c.
static bool intel_pt_step_psb |
( |
unsigned char ** |
buf, |
|
|
size_t * |
len |
|
) |
| |
|
static |
intel_pt_step_psb - move buffer pointer to the start of the following PSB packet. : pointer to buffer pointer : size of buffer
Updates the buffer pointer to point to the start of the following PSB packet (skipping the PSB at itself) if there is one, otherwise the buffer pointer is unchanged. If is updated, is adjusted accordingly.
Return: true if a PSB packet is found, false otherwise.
Definition at line 2446 of file intel-pt-decoder.c.
static int intel_pt_tsc_cmp |
( |
uint64_t |
tsc1, |
|
|
uint64_t |
tsc2 |
|
) |
| |
|
static |
intel_pt_tsc_cmp - compare 7-byte TSCs. : first TSC to compare : second TSC to compare
This function compares 7-byte TSC values allowing for the possibility that TSC wrapped around. Generally it is not possible to know if TSC has wrapped around so for that purpose this function assumes the absolute difference is less than half the maximum difference.
Return: %-1 if is before , %0 if == , %1 if is after .
Definition at line 2542 of file intel-pt-decoder.c.