LLDB mainline
Classes | Functions
PerfContextSwitchDecoder.cpp File Reference
#include "PerfContextSwitchDecoder.h"
#include <optional>
Include dependency graph for PerfContextSwitchDecoder.cpp:

Go to the source code of this file.


struct  perf_event_header
struct  PerfContextSwitchRecord
 Record found in the perf_event context switch traces. More...
struct  ContextSwitchRecord
 Record produced after parsing the raw context switch trace produce by perf_event. More...


#define PERF_RECORD_MISC_SWITCH_OUT   (1 << 13)
 Copied from <linux/perf_event.h> to avoid depending on perf_event.h on non-linux platforms.
#define PERF_RECORD_LOST   2
#define PERF_RECORD_MAX   19


static Error RecoverExecutionsFromConsecutiveRecords (cpu_id_t cpu_id, const LinuxPerfZeroTscConversion &tsc_conversion, const ContextSwitchRecord &current_record, const std::optional< ContextSwitchRecord > &prev_record, std::function< void(const ThreadContinuousExecution &execution)> on_new_execution)

Macro Definition Documentation


#define PERF_RECORD_LOST   2

Definition at line 21 of file PerfContextSwitchDecoder.cpp.



Definition at line 24 of file PerfContextSwitchDecoder.cpp.


#define PERF_RECORD_MAX   19

Definition at line 26 of file PerfContextSwitchDecoder.cpp.


#define PERF_RECORD_MISC_SWITCH_OUT   (1 << 13)

Copied from <linux/perf_event.h> to avoid depending on perf_event.h on non-linux platforms.

Definition at line 19 of file PerfContextSwitchDecoder.cpp.



Definition at line 25 of file PerfContextSwitchDecoder.cpp.



Definition at line 22 of file PerfContextSwitchDecoder.cpp.



Definition at line 23 of file PerfContextSwitchDecoder.cpp.

Function Documentation

◆ RecoverExecutionsFromConsecutiveRecords()

static Error RecoverExecutionsFromConsecutiveRecords ( cpu_id_t  cpu_id,
const LinuxPerfZeroTscConversion tsc_conversion,
const ContextSwitchRecord current_record,
const std::optional< ContextSwitchRecord > &  prev_record,
std::function< void(const ThreadContinuousExecution &execution)>  on_new_execution