9#ifndef LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_PERFCONTEXTSWITCHDECODER_H
10#define LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_PERFCONTEXTSWITCHDECODER_H
14#include "llvm/Support/Error.h"
19namespace trace_intel_pt {
136llvm::Expected<std::vector<ThreadContinuousExecution>>
141llvm::Expected<std::vector<uint8_t>>
143 const std::set<lldb::pid_t> &pids);
llvm::Expected< std::vector< uint8_t > > FilterProcessesFromContextSwitchTrace(llvm::ArrayRef< uint8_t > data, const std::set< lldb::pid_t > &pids)
llvm::Expected< std::vector< ThreadContinuousExecution > > DecodePerfContextSwitchTrace(llvm::ArrayRef< uint8_t > data, lldb::cpu_id_t cpu_id, const LinuxPerfZeroTscConversion &tsc_conversion)
Decodes a context switch trace collected with perf_event_open.
A class that represents a running process on the host machine.
jLLDBTraceGetState gdb-remote packet
This class indicates the time interval in which a thread was running continuously on a cpu core.
uint64_t GetStartTSC() const
struct lldb_private::trace_intel_pt::ThreadContinuousExecution::@167::@170 only_end
struct lldb_private::trace_intel_pt::ThreadContinuousExecution::@167::@169 only_start
union lldb_private::trace_intel_pt::ThreadContinuousExecution::@167 tscs
static ThreadContinuousExecution CreateHintedEndExecution(lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid, uint64_t start, uint64_t hinted_end)
struct lldb_private::trace_intel_pt::ThreadContinuousExecution::@167::@168 complete
uint64_t GetEndTSC() const
uint64_t GetLowestKnownTSC() const
ThreadContinuousExecution(lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid)
We keep this constructor private to force the usage of the static named constructors.
static ThreadContinuousExecution CreateOnlyStartExecution(lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid, uint64_t start)
enum lldb_private::trace_intel_pt::ThreadContinuousExecution::Variant variant
Variant
In most cases both the start and end of a continuous execution can be accurately recovered from the c...
@ OnlyEnd
We only know the end. This might be the first entry or a cpu trace.
@ HintedEnd
The start is known and we have an upper bound for the end, i.e.
@ HintedStart
The end is known and we have a lower bound for the start, i.e.
@ Complete
Both endpoints are known.
@ OnlyStart
We only know the start. This might be the last entry of a cpu trace.
static ThreadContinuousExecution CreateCompleteExecution(lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid, uint64_t start, uint64_t end)
Constructors for the different variants of this object.
static ThreadContinuousExecution CreateHintedStartExecution(lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid, uint64_t hinted_start, uint64_t end)
static ThreadContinuousExecution CreateOnlyEndExecution(lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid, uint64_t end)