13void TraceExpander::resetCurrentRecord() {
16 BuildingRecord =
false;
18 CurrentRecord.
Data.clear();
41 if (!IgnoringRecords) {
42 CurrentRecord.
TSC = R.tsc();
43 CurrentRecord.
CPU = R.cpu();
44 CurrentRecord.
PId = PID;
45 CurrentRecord.
TId = TID;
47 CurrentRecord.
Data = std::string(R.data());
48 BuildingRecord =
true;
55 if (!IgnoringRecords) {
57 CurrentRecord.
TSC = BaseTSC;
58 CurrentRecord.
CPU = CPUId;
59 CurrentRecord.
PId = PID;
60 CurrentRecord.
TId = TID;
62 CurrentRecord.
Data = std::string(R.data());
63 BuildingRecord =
true;
70 if (!IgnoringRecords) {
72 CurrentRecord.
TSC = BaseTSC;
73 CurrentRecord.
CPU = CPUId;
74 CurrentRecord.
PId = PID;
75 CurrentRecord.
TId = TID;
78 CurrentRecord.
Data = std::string(R.data());
79 BuildingRecord =
true;
85 CurrentRecord.
CallArgs.push_back(R.arg());
97 IgnoringRecords =
false;
105 IgnoringRecords =
true;
106 resetCurrentRecord();
111 resetCurrentRecord();
112 if (!IgnoringRecords) {
113 BaseTSC += R.delta();
114 CurrentRecord.
Type = R.recordType();
115 CurrentRecord.
FuncId = R.functionId();
116 CurrentRecord.
TSC = BaseTSC;
117 CurrentRecord.
PId = PID;
118 CurrentRecord.
TId = TID;
119 CurrentRecord.
CPU = CPUId;
120 BuildingRecord =
true;
126 resetCurrentRecord();
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Error visit(BufferExtents &) override
This is an optimization pass for GlobalISel generic memory operations.
uint32_t PId
The process ID for the currently running process.
int32_t FuncId
The function ID for the record, if this is a function call record.
RecordTypes Type
Identifies the type of record.
uint32_t TId
The thread ID for the currently running thread.
uint16_t CPU
The CPU where the thread is running. We assume number of CPUs <= 65536.
uint64_t TSC
Get the full 8 bytes of the TSC when we get the log record.
std::string Data
For custom and typed events, we provide the raw data from the trace.
uint16_t RecordType
RecordType values are used as "sub-types" which have meaning in the context of the Type below.
std::vector< uint64_t > CallArgs
The function call arguments.