9#ifndef liblldb_IntelPTCollector_H_
10#define liblldb_IntelPTCollector_H_
20#include <linux/perf_event.h>
26namespace process_linux {
57 llvm::Expected<llvm::json::Value>
GetState();
60 llvm::Expected<std::vector<uint8_t>>
75 llvm::Expected<LinuxPerfZeroTscConversion &>
This file contains a thin wrapper of the perf_event_open API and classes to handle the destruction of...
Main class that manages intel-pt process and thread tracing.
llvm::Expected< LinuxPerfZeroTscConversion & > FetchPerfTscConversionParameters()
llvm::Expected< std::vector< uint8_t > > GetBinaryData(const TraceGetBinaryDataRequest &request)
Implementation of the jLLDBTraceGetBinaryData packet.
llvm::Error TraceStart(lldb::tid_t tid, const TraceIntelPTStartRequest &request)
Start tracing a specific thread.
llvm::Error TraceStop(const TraceStopRequest &request)
Implementation of the jLLDBTraceStop packet.
IntelPTProcessTraceUP m_process_trace_up
Only one instance of "process trace" can be active at a given time.
NativeProcessProtocol & m_process
The target process.
static bool IsSupported()
llvm::Error TraceStart(const TraceIntelPTStartRequest &request)
Implementation of the jLLDBTraceStart packet.
IntelPTThreadTraceCollection m_thread_traces
Threads traced due to "thread tracing".
llvm::Error OnThreadCreated(lldb::tid_t tid)
If "process tracing" is enabled, then trace the given thread.
llvm::Error OnThreadDestroyed(lldb::tid_t tid)
Stops tracing a tracing upon a destroy event.
void Clear()
Dispose of all traces.
llvm::Expected< llvm::json::Value > GetState()
Implementation of the jLLDBTraceGetState packet.
void ProcessWillResume()
To be invoked before the process will resume, so that we can capture the first instructions after the...
void ProcessDidStop()
To be invoked as soon as we know the process stopped.
Manages a list of thread traces.
std::unique_ptr< IntelPTProcessTrace > IntelPTProcessTraceUP
A class that represents a running process on the host machine.
jLLDBTraceGetBinaryData gdb-remote packet
jLLDBTraceStart gdb-remote packet
jLLDBTraceStop gdb-remote packet