Linux Perf
intel-pt-pkt-decoder.h
Go to the documentation of this file.
1
/*
2
* intel_pt_pkt_decoder.h: Intel Processor Trace support
3
* Copyright (c) 2013-2014, Intel Corporation.
4
*
5
* This program is free software; you can redistribute it and/or modify it
6
* under the terms and conditions of the GNU General Public License,
7
* version 2, as published by the Free Software Foundation.
8
*
9
* This program is distributed in the hope it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
* more details.
13
*
14
*/
15
16
#ifndef INCLUDE__INTEL_PT_PKT_DECODER_H__
17
#define INCLUDE__INTEL_PT_PKT_DECODER_H__
18
19
#include <stddef.h>
20
#include <stdint.h>
21
22
#define INTEL_PT_PKT_DESC_MAX 256
23
24
#define INTEL_PT_NEED_MORE_BYTES -1
25
#define INTEL_PT_BAD_PACKET -2
26
27
#define INTEL_PT_PSB_STR "\002\202\002\202\002\202\002\202" \
28
"\002\202\002\202\002\202\002\202"
29
#define INTEL_PT_PSB_LEN 16
30
31
#define INTEL_PT_PKT_MAX_SZ 16
32
33
enum
intel_pt_pkt_type
{
34
INTEL_PT_BAD
,
35
INTEL_PT_PAD
,
36
INTEL_PT_TNT
,
37
INTEL_PT_TIP_PGD
,
38
INTEL_PT_TIP_PGE
,
39
INTEL_PT_TSC
,
40
INTEL_PT_TMA
,
41
INTEL_PT_MODE_EXEC
,
42
INTEL_PT_MODE_TSX
,
43
INTEL_PT_MTC
,
44
INTEL_PT_TIP
,
45
INTEL_PT_FUP
,
46
INTEL_PT_CYC
,
47
INTEL_PT_VMCS
,
48
INTEL_PT_PSB
,
49
INTEL_PT_PSBEND
,
50
INTEL_PT_CBR
,
51
INTEL_PT_TRACESTOP
,
52
INTEL_PT_PIP
,
53
INTEL_PT_OVF
,
54
INTEL_PT_MNT
,
55
INTEL_PT_PTWRITE
,
56
INTEL_PT_PTWRITE_IP
,
57
INTEL_PT_EXSTOP
,
58
INTEL_PT_EXSTOP_IP
,
59
INTEL_PT_MWAIT
,
60
INTEL_PT_PWRE
,
61
INTEL_PT_PWRX
,
62
};
63
64
struct
intel_pt_pkt
{
65
enum
intel_pt_pkt_type
type
;
66
int
count
;
67
uint64_t
payload
;
68
};
69
70
const
char
*
intel_pt_pkt_name
(
enum
intel_pt_pkt_type
);
71
72
int
intel_pt_get_packet
(
const
unsigned
char
*buf,
size_t
len,
73
struct
intel_pt_pkt
*packet);
74
75
int
intel_pt_pkt_desc
(
const
struct
intel_pt_pkt
*packet,
char
*buf,
size_t
len);
76
77
#endif
intel_pt_pkt::count
int count
Definition:
intel-pt-pkt-decoder.h:66
INTEL_PT_PWRX
Definition:
intel-pt-pkt-decoder.h:61
INTEL_PT_TIP
Definition:
intel-pt-pkt-decoder.h:44
INTEL_PT_PSBEND
Definition:
intel-pt-pkt-decoder.h:49
INTEL_PT_FUP
Definition:
intel-pt-pkt-decoder.h:45
intel_pt_pkt_name
const char * intel_pt_pkt_name(enum intel_pt_pkt_type)
Definition:
intel-pt-pkt-decoder.c:76
INTEL_PT_EXSTOP
Definition:
intel-pt-pkt-decoder.h:57
INTEL_PT_PAD
Definition:
intel-pt-pkt-decoder.h:35
INTEL_PT_MODE_TSX
Definition:
intel-pt-pkt-decoder.h:42
intel_pt_pkt_type
intel_pt_pkt_type
Definition:
intel-pt-pkt-decoder.h:33
intel_pt_pkt
Definition:
intel-pt-pkt-decoder.h:64
INTEL_PT_TRACESTOP
Definition:
intel-pt-pkt-decoder.h:51
INTEL_PT_PWRE
Definition:
intel-pt-pkt-decoder.h:60
INTEL_PT_TIP_PGE
Definition:
intel-pt-pkt-decoder.h:38
INTEL_PT_EXSTOP_IP
Definition:
intel-pt-pkt-decoder.h:58
INTEL_PT_PTWRITE
Definition:
intel-pt-pkt-decoder.h:55
intel_pt_get_packet
int intel_pt_get_packet(const unsigned char *buf, size_t len, struct intel_pt_pkt *packet)
Definition:
intel-pt-pkt-decoder.c:528
INTEL_PT_MNT
Definition:
intel-pt-pkt-decoder.h:54
INTEL_PT_MTC
Definition:
intel-pt-pkt-decoder.h:43
INTEL_PT_PIP
Definition:
intel-pt-pkt-decoder.h:52
INTEL_PT_OVF
Definition:
intel-pt-pkt-decoder.h:53
intel_pt_pkt_desc
int intel_pt_pkt_desc(const struct intel_pt_pkt *packet, char *buf, size_t len)
Definition:
intel-pt-pkt-decoder.c:541
INTEL_PT_VMCS
Definition:
intel-pt-pkt-decoder.h:47
intel_pt_pkt::type
enum intel_pt_pkt_type type
Definition:
intel-pt-pkt-decoder.h:65
INTEL_PT_TIP_PGD
Definition:
intel-pt-pkt-decoder.h:37
INTEL_PT_BAD
Definition:
intel-pt-pkt-decoder.h:34
INTEL_PT_PSB
Definition:
intel-pt-pkt-decoder.h:48
INTEL_PT_TSC
Definition:
intel-pt-pkt-decoder.h:39
INTEL_PT_MWAIT
Definition:
intel-pt-pkt-decoder.h:59
intel_pt_pkt::payload
uint64_t payload
Definition:
intel-pt-pkt-decoder.h:67
INTEL_PT_MODE_EXEC
Definition:
intel-pt-pkt-decoder.h:41
INTEL_PT_TNT
Definition:
intel-pt-pkt-decoder.h:36
INTEL_PT_CBR
Definition:
intel-pt-pkt-decoder.h:50
INTEL_PT_TMA
Definition:
intel-pt-pkt-decoder.h:40
INTEL_PT_PTWRITE_IP
Definition:
intel-pt-pkt-decoder.h:56
INTEL_PT_CYC
Definition:
intel-pt-pkt-decoder.h:46
util
intel-pt-decoder
intel-pt-pkt-decoder.h
Generated by
1.8.13