LLDB mainline
Public Member Functions | List of all members
lldb_private::trace_intel_pt::TraceIntelPTBundleSaver Class Reference

#include <TraceIntelPTBundleSaver.h>

Public Member Functions

llvm::Expected< FileSpecSaveToDisk (TraceIntelPT &trace_ipt, FileSpec directory, bool compact)
 Save the Intel PT trace of a live process to the specified directory, which will be created if needed.
 

Detailed Description

Definition at line 18 of file TraceIntelPTBundleSaver.h.

Member Function Documentation

◆ SaveToDisk()

Expected< FileSpec > TraceIntelPTBundleSaver::SaveToDisk ( TraceIntelPT trace_ipt,
FileSpec  directory,
bool  compact 
)

Save the Intel PT trace of a live process to the specified directory, which will be created if needed.

This will also create a file <directory>/trace.json with the description of the trace bundle, along with others files which contain the actual trace data. The trace.json file can be used later as input for the "trace load" command to load the trace in LLDB.

Parameters
[in]trace_iptThe Intel PT trace to be saved to disk.
[in]directoryThe directory where the trace bundle will be created.
[in]compactFilter out information irrelevant to the traced processes in the context switch and intel pt traces when using per-cpu mode. This effectively reduces the size of those traces.
Returns
A FileSpec pointing to the bundle description file, or an llvm::Error otherwise.

Definition at line 355 of file TraceIntelPTBundleSaver.cpp.

References BuildCpusSection(), BuildKernelSection(), BuildProcessesSection(), lldb_private::trace_intel_pt::TraceIntelPT::GetCPUInfo(), lldb_private::FileSpec::GetPath(), lldb_private::trace_intel_pt::TraceIntelPT::GetPerfZeroTscConversion(), lldb_private::trace_intel_pt::TraceIntelPT::GetTraceMode(), lldb_private::FileSystem::Instance(), lldb_private::trace_intel_pt::TraceIntelPT::KernelMode, lldb_private::FileSystem::Resolve(), SaveTraceBundleDescription(), and lldb_private::trace_intel_pt::toJSON().

Referenced by lldb_private::trace_intel_pt::TraceIntelPT::SaveToDisk().


The documentation for this class was generated from the following files: