9#ifndef liblldb_IntelPTSingleBufferTrace_H_
10#define liblldb_IntelPTSingleBufferTrace_H_
15#include "llvm/Support/Error.h"
19namespace process_linux {
52 static llvm::Expected<IntelPTSingleBufferTrace>
54 std::optional<lldb::cpu_id_t> cpu_id = std::nullopt,
55 bool disabled =
false, std::optional<int> cgroup_fd = std::nullopt);
60 llvm::Expected<std::vector<uint8_t>>
This file contains a thin wrapper of the perf_event_open API and classes to handle the destruction of...
This class wraps a single perf event collecting intel pt data in a single buffer.
static llvm::Expected< IntelPTSingleBufferTrace > Start(const TraceIntelPTStartRequest &request, std::optional< lldb::tid_t > tid, std::optional< lldb::cpu_id_t > cpu_id=std::nullopt, bool disabled=false, std::optional< int > cgroup_fd=std::nullopt)
Start tracing using a single Intel PT trace buffer.
PerfEvent m_perf_event
perf event configured for IntelPT.
const PerfEvent & GetPerfEvent() const
llvm::Error Resume()
Resume the collection of this trace.
IntelPTSingleBufferTrace(PerfEvent &&perf_event)
Construct new IntelPTSingleBufferThreadTrace.
llvm::Error Pause()
Pause the collection of this trace.
llvm::Expected< std::vector< uint8_t > > GetBinaryData(const TraceGetBinaryDataRequest &request) const
llvm::Expected< std::vector< uint8_t > > GetIptTrace()
Read the intel pt trace buffer managed by this trace instance.
size_t GetIptTraceSize() const
Thin wrapper of the perf_event_open API.
llvm::Expected< uint32_t > GetIntelPTOSEventType()
Return the Linux perf event type for Intel PT.
A class that represents a running process on the host machine.
jLLDBTraceGetBinaryData gdb-remote packet
jLLDBTraceStart gdb-remote packet