LLDB  mainline
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
lldb_private::trace_intel_pt::TraceIntelPTSessionFileParser Class Reference

#include <TraceIntelPTSessionFileParser.h>

Inheritance diagram for lldb_private::trace_intel_pt::TraceIntelPTSessionFileParser:
Inheritance graph
Collaboration diagram for lldb_private::trace_intel_pt::TraceIntelPTSessionFileParser:
Collaboration graph

Public Member Functions

 TraceIntelPTSessionFileParser (Debugger &debugger, const llvm::json::Value &trace_session_file, llvm::StringRef session_file_dir)
 See TraceSessionFileParser::TraceSessionFileParser for the description of these fields. More...
llvm::Expected< lldb::TraceSP > Parse ()
 Parse the structured data trace session and create the corresponding Target objects. More...
lldb::TraceSP CreateTraceIntelPTInstance (const pt_cpu &cpu_info, std::vector< ParsedProcess > &parsed_processes)
- Public Member Functions inherited from lldb_private::TraceSessionFileParser
 TraceSessionFileParser (Debugger &debugger, llvm::StringRef session_file_dir, llvm::StringRef schema)
llvm::Expected< std::vector< ParsedProcess > > ParseCommonSessionFile (const JSONTraceSessionBase &session)
 Parse the fields common to all trace session schemas. More...

Static Public Member Functions

static llvm::StringRef GetSchema ()
- Static Public Member Functions inherited from lldb_private::TraceSessionFileParser
static std::string BuildSchema (llvm::StringRef plugin_schema)
 Build the full schema for a Trace plug-in. More...

Static Private Member Functions

static pt_cpu ParsePTCPU (const JSONTraceIntelPTCPUInfo &cpu_info)

Private Attributes

const llvm::json::Value & m_trace_session_file

Additional Inherited Members

- Protected Member Functions inherited from lldb_private::TraceSessionFileParser
void NormalizePath (lldb_private::FileSpec &file_spec)
 Resolve non-absolute paths relative to the session file folder. More...
lldb::ThreadPostMortemTraceSP ParseThread (lldb::ProcessSP &process_sp, const JSONThread &thread)
llvm::Expected< ParsedProcessParseProcess (const JSONProcess &process)
llvm::Error ParseModule (lldb::TargetSP &target_sp, const JSONModule &module)
llvm::Error CreateJSONError (llvm::json::Path::Root &root, const llvm::json::Value &value)
 Create a user-friendly error message upon a JSON-parsing failure using the json::ObjectMapper functionality. More...
- Protected Attributes inherited from lldb_private::TraceSessionFileParser
std::string m_session_file_dir
llvm::StringRef m_schema

Detailed Description

Definition at line 21 of file TraceIntelPTSessionFileParser.h.

Constructor & Destructor Documentation

◆ TraceIntelPTSessionFileParser()

lldb_private::trace_intel_pt::TraceIntelPTSessionFileParser::TraceIntelPTSessionFileParser ( Debugger debugger,
const llvm::json::Value &  trace_session_file,
llvm::StringRef  session_file_dir 

See TraceSessionFileParser::TraceSessionFileParser for the description of these fields.

Definition at line 26 of file TraceIntelPTSessionFileParser.h.

Member Function Documentation

◆ CreateTraceIntelPTInstance()

TraceSP TraceIntelPTSessionFileParser::CreateTraceIntelPTInstance ( const pt_cpu &  cpu_info,
std::vector< ParsedProcess > &  parsed_processes 

Definition at line 43 of file TraceIntelPTSessionFileParser.cpp.

◆ GetSchema()

StringRef TraceIntelPTSessionFileParser::GetSchema ( )
The JSON schema for the session data.

Definition at line 19 of file TraceIntelPTSessionFileParser.cpp.

References string().

◆ Parse()

Expected< TraceSP > TraceIntelPTSessionFileParser::Parse ( )

Parse the structured data trace session and create the corresponding Target objects.

In case of an error, no targets are created.

A lldb::TraceSP instance with the trace session data. In case of errors, return a null pointer.

Definition at line 57 of file TraceIntelPTSessionFileParser.cpp.

References lldb_private::trace_intel_pt::JSONTraceIntelPTSettings::cpuInfo, lldb_private::fromJSON(), and lldb_private::JSONTraceSession< TPluginSettings >::trace.

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

◆ ParsePTCPU()

pt_cpu TraceIntelPTSessionFileParser::ParsePTCPU ( const JSONTraceIntelPTCPUInfo cpu_info)

Member Data Documentation

◆ m_trace_session_file

const llvm::json::Value& lldb_private::trace_intel_pt::TraceIntelPTSessionFileParser::m_trace_session_file

Definition at line 51 of file TraceIntelPTSessionFileParser.h.

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