#include "IntelPTMultiCoreTrace.h"
#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
#include "Procfs.h"
#include <optional>
usingnamespacelldb;
usingnamespacelldb_private;
usingnamespaceprocess_linux;
usingnamespacellvm;
static bool IsTotalBufferLimitReached(ArrayRef<cpu_id_t> cores,
const TraceIntelPTStartRequest &request) { … }
static Error IncludePerfEventParanoidMessageInError(Error &&error) { … }
Expected<std::unique_ptr<IntelPTMultiCoreTrace>>
IntelPTMultiCoreTrace::StartOnAllCores(const TraceIntelPTStartRequest &request,
NativeProcessProtocol &process,
std::optional<int> cgroup_fd) { … }
void IntelPTMultiCoreTrace::ForEachCore(
std::function<void(cpu_id_t cpu_id, IntelPTSingleBufferTrace &core_trace)>
callback) { … }
void IntelPTMultiCoreTrace::ForEachCore(
std::function<void(cpu_id_t cpu_id, IntelPTSingleBufferTrace &intelpt_trace,
ContextSwitchTrace &context_switch_trace)>
callback) { … }
void IntelPTMultiCoreTrace::ProcessDidStop() { … }
void IntelPTMultiCoreTrace::ProcessWillResume() { … }
TraceIntelPTGetStateResponse IntelPTMultiCoreTrace::GetState() { … }
bool IntelPTMultiCoreTrace::TracesThread(lldb::tid_t tid) const { … }
llvm::Error IntelPTMultiCoreTrace::TraceStart(lldb::tid_t tid) { … }
Error IntelPTMultiCoreTrace::TraceStop(lldb::tid_t tid) { … }
Expected<std::optional<std::vector<uint8_t>>>
IntelPTMultiCoreTrace::TryGetBinaryData(
const TraceGetBinaryDataRequest &request) { … }