LLDB  mainline
Namespaces | Classes | Typedefs | Functions
lldb_private::process_linux Namespace Reference




class  IntelPTCollector
 Main class that manages intel-pt process and thread tracing. More...
class  IntelPTMultiCoreTrace
class  IntelPTPerThreadProcessTrace
 Manages a "process trace" instance by tracing each thread individually. More...
class  IntelPTProcessTrace
 Interface to be implemented by each 'process trace' strategy (per cpu, per thread, etc). More...
class  IntelPTSingleBufferTrace
 This class wraps a single perf event collecting intel pt data in a single buffer. More...
class  IntelPTThreadTraceCollection
 Manages a list of thread traces. More...
class  NativeProcessLinux
class  NativeRegisterContextLinux
class  NativeThreadLinux
class  PerfEvent
 Thin wrapper of the perf_event_open API. More...
class  SingleStepWorkaround


using IntelPTProcessTraceUP = std::unique_ptr< IntelPTProcessTrace >


llvm::Expected< uint32_tGetIntelPTOSEventType ()
 Return the Linux perf event type for Intel PT. More...
llvm::Expected< PerfEventCreateContextSwitchTracePerfEvent (lldb::cpu_id_t cpu_id, const PerfEvent *parent_perf_event=nullptr)
 Create a perf event that tracks context switches on a cpu. More...
llvm::Expected< LinuxPerfZeroTscConversionLoadPerfTscConversionParameters ()
 Load PerfTscConversionParameters from perf_event_mmap_page, if available. More...
llvm::Expected< llvm::ArrayRef< uint8_t > > GetProcfsCpuInfo ()
llvm::Expected< std::vector< lldb::cpu_id_t > > GetAvailableLogicalCoreIDs (llvm::StringRef cpuinfo)
llvm::Expected< llvm::ArrayRef< lldb::cpu_id_t > > GetAvailableLogicalCoreIDs ()

Typedef Documentation

◆ IntelPTProcessTraceUP

Definition at line 47 of file IntelPTProcessTrace.h.

Function Documentation

◆ CreateContextSwitchTracePerfEvent()

Expected< PerfEvent > lldb_private::process_linux::CreateContextSwitchTracePerfEvent ( lldb::cpu_id_t  cpu_id,
const PerfEvent parent_perf_event = nullptr 

Create a perf event that tracks context switches on a cpu.

[in]cpu_idThe core to trace.
[in]parent_perf_eventAn optional perf event that will be grouped with the new perf event.

Definition at line 306 of file Perf.cpp.

References lldb_private::process_linux::PerfEvent::GetFd(), lldb_private::GetLog(), lldb_private::process_linux::PerfEvent::Init(), lldb_private::process_linux::PerfEvent::IsEnabled(), LLDB_LOG, and lldb_private::Trace.

Referenced by lldb_private::process_linux::IntelPTMultiCoreTrace::StartOnAllCores().

◆ GetAvailableLogicalCoreIDs() [1/2]

llvm::Expected< llvm::ArrayRef< cpu_id_t > > lldb_private::process_linux::GetAvailableLogicalCoreIDs ( )
A list with all the logical cores available in the system and cache it if errors didn't happen.

Definition at line 53 of file Procfs.cpp.

References GetAvailableLogicalCoreIDs(), and GetProcfsCpuInfo().

◆ GetAvailableLogicalCoreIDs() [2/2]

llvm::Expected<std::vector<lldb::cpu_id_t> > lldb_private::process_linux::GetAvailableLogicalCoreIDs ( llvm::StringRef  cpuinfo)
A list of available logical core ids given the contents of /proc/cpuinfo.

Referenced by GetAvailableLogicalCoreIDs(), and lldb_private::process_linux::IntelPTMultiCoreTrace::StartOnAllCores().

◆ GetIntelPTOSEventType()

Expected< uint32_t > lldb_private::process_linux::GetIntelPTOSEventType ( )

Return the Linux perf event type for Intel PT.

Definition at line 107 of file IntelPTSingleBufferTrace.cpp.

References Decimal, kOSEventIntelPTTypeFile, and ReadIntelPTConfigFile().

Referenced by lldb_private::process_linux::IntelPTCollector::IsSupported().

◆ GetProcfsCpuInfo()

Expected< ArrayRef< uint8_t > > lldb_private::process_linux::GetProcfsCpuInfo ( )
The content of /proc/cpuinfo and cache it if errors didn't happen.

Definition at line 19 of file Procfs.cpp.

References lldb_private::getProcFile().

Referenced by GetAvailableLogicalCoreIDs(), lldb_private::process_linux::IntelPTCollector::GetBinaryData(), and lldb_private::process_linux::IntelPTCollector::GetState().

◆ LoadPerfTscConversionParameters()

Expected< LinuxPerfZeroTscConversion > lldb_private::process_linux::LoadPerfTscConversionParameters ( )

Load PerfTscConversionParameters from perf_event_mmap_page, if available.

Definition at line 27 of file Perf.cpp.

References lldb_private::process_linux::PerfEvent::Init(), string(), and lldb_private::LinuxPerfZeroTscConversion::time_mult.

Referenced by lldb_private::process_linux::IntelPTCollector::FetchPerfTscConversionParameters().