Lines Matching defs:packet

152 	struct intel_pt_pkt packet;
292 * A TSC packet can slip past MTC packets so that the timestamp appears
417 [INTEL_PT_ERR_BADPKT] = "Bad packet",
421 [INTEL_PT_ERR_OVR] = "Overflow packet",
435 static uint64_t intel_pt_calc_ip(const struct intel_pt_pkt *packet,
440 switch (packet->count) {
443 packet->payload;
447 packet->payload;
450 ip = packet->payload;
457 packet->payload;
460 ip = packet->payload;
471 decoder->last_ip = intel_pt_calc_ip(&decoder->packet, decoder->last_ip);
483 intel_pt_log_packet(&decoder->packet, decoder->pkt_len, decoder->pos,
501 decoder->tx_flags = decoder->packet.payload & INTEL_PT_IN_TX;
512 intel_pt_log("ERROR: Bad packet\n");
598 ret = intel_pt_get_packet(buf, len, &decoder->packet, &decoder->pkt_ctx);
618 struct intel_pt_pkt packet;
652 ret = intel_pt_get_packet(buf, len, &pkt_info.packet,
660 } while (pkt_info.packet.type == INTEL_PT_PAD);
666 pkt_info.last_packet_type = pkt_info.packet.type;
685 * MTC provides a 8-bit slice of CTC but the TMA packet only provides the lower
687 * provided by the TMA packet. Fix-up the last_mtc calculated from the TMA
688 * packet by copying the missing bits from the current MTC assuming the least
713 switch (pkt_info->packet.type) {
738 mtc = pkt_info->packet.payload;
778 timestamp = pkt_info->packet.payload |
801 ctc = pkt_info->packet.payload;
802 fc = pkt_info->packet.count;
823 data->cycle_cnt += pkt_info->packet.payload;
827 cbr = pkt_info->packet.payload;
910 decoder->last_packet_type = decoder->packet.type;
925 &decoder->packet, &decoder->pkt_ctx);
938 } while (decoder->packet.type == INTEL_PT_PAD);
1266 if (decoder->packet.count == 0) {
1276 if (decoder->packet.count == 0) {
1360 if (decoder->packet.type != INTEL_PT_TIP ||
1361 decoder->packet.count == 0) {
1417 fup_tx_flags = decoder->packet.payload &
1422 if (decoder->packet.type == INTEL_PT_FUP) {
1457 timestamp = intel_pt_8b_tsc(decoder->packet.payload,
1464 timestamp = decoder->packet.payload |
1549 uint32_t ctc = decoder->packet.payload;
1550 uint32_t fc = decoder->packet.count;
1585 mtc = decoder->packet.payload;
1633 unsigned int cbr = decoder->packet.payload & 0xff;
1635 decoder->cbr_payload = decoder->packet.payload;
1654 decoder->cycle_cnt += decoder->packet.payload;
1656 decoder->tot_cyc_cnt += decoder->packet.payload;
1686 decoder->blk_type = decoder->packet.payload;
1689 decoder->state.items.is_32_bit = decoder->packet.count;
1701 uint32_t id = decoder->packet.count;
1717 decoder->state.items.val[pos][id] = decoder->packet.payload;
1732 switch (decoder->packet.type) {
1756 intel_pt_log("ERROR: Unexpected packet\n");
1777 decoder->exec_mode = decoder->packet.payload;
1781 decoder->cr3 = decoder->packet.payload & (BIT63 - 1);
1786 if (decoder->packet.count) {
1840 switch (decoder->packet.type) {
1875 if (decoder->packet.count == 0) {
1891 if (decoder->packet.count == 0) {
1903 if (decoder->packet.count == 0) {
1912 decoder->cr3 = decoder->packet.payload & (BIT63 - 1);
1926 decoder->exec_mode = decoder->packet.payload;
1962 if (decoder->leap && !decoder->in_psb && decoder->packet.type != INTEL_PT_PSB) {
1968 switch (decoder->packet.type) {
1974 if (!decoder->packet.count)
1983 if (!decoder->packet.count)
1992 if (!decoder->packet.count)
2082 last_packet_type = decoder->packet.type;
2098 switch (decoder->packet.type) {
2100 if (!decoder->packet.count)
2102 decoder->tnt = decoder->packet;
2110 if (decoder->packet.count != 0)
2119 if (decoder->packet.count == 0) {
2141 if (decoder->packet.count != 0)
2147 if (decoder->packet.count == 0) {
2204 decoder->cr3 = decoder->packet.payload & (BIT63 - 1);
2248 decoder->exec_mode = decoder->packet.payload;
2272 decoder->fup_ptw_payload = decoder->packet.payload;
2276 if (decoder->packet.type == INTEL_PT_FUP) {
2289 decoder->state.ptw_payload = decoder->packet.payload;
2293 decoder->fup_mwait_payload = decoder->packet.payload;
2300 decoder->packet.payload;
2307 decoder->state.pwrx_payload = decoder->packet.payload;
2314 if (decoder->packet.type == INTEL_PT_FUP) {
2333 decoder->state.pwrx_payload = decoder->packet.payload;
2354 if (decoder->packet.type == INTEL_PT_FUP) {
2371 return decoder->packet.count &&
2372 (decoder->have_last_ip || decoder->packet.count == 3 ||
2373 decoder->packet.count == 6);
2388 switch (decoder->packet.type) {
2405 intel_pt_log("ERROR: Unexpected packet\n");
2442 decoder->cr3 = decoder->packet.payload & (BIT63 - 1);
2446 decoder->exec_mode = decoder->packet.payload;
2461 intel_pt_log("ERROR: Unexpected packet\n");
2504 switch (decoder->packet.type) {
2561 decoder->cr3 = decoder->packet.payload & (BIT63 - 1);
2565 decoder->exec_mode = decoder->packet.payload;
2899 * intel_pt_next_psb - move buffer pointer to the start of the next PSB packet.
2903 * Updates the buffer pointer to point to the start of the next PSB packet if
2907 * Return: %true if a PSB packet is found, %false otherwise.
2924 * packet.
2928 * Updates the buffer pointer to point to the start of the following PSB packet
2932 * Return: %true if a PSB packet is found, %false otherwise.
2951 * intel_pt_last_psb - find the last PSB packet in a buffer.
2988 * Find a TSC packet in @buf and return the TSC value. This function assumes
2990 * PSBEND packet is found.
2998 struct intel_pt_pkt packet;
3002 ret = intel_pt_get_packet(buf, len, &packet, &ctx);
3005 if (packet.type == INTEL_PT_TSC) {
3006 *tsc = packet.payload;
3010 if (packet.type == INTEL_PT_PSBEND)
3156 * useful if it begins with a PSB packet.
3314 * A TSC packet can slip past MTC packets but, after fast