LLDB  mainline
TraceIntelPTJSONStructs.h
Go to the documentation of this file.
1 //===-- TraceIntelPTJSONStructs.h -----------------------------*- C++ //-*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_TRACEINTELPTJSONSTRUCTS_H
10 #define LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_TRACEINTELPTJSONSTRUCTS_H
11 
12 #include "../common/TraceJSONStructs.h"
13 #include <intel-pt.h>
14 
15 namespace lldb_private {
16 namespace trace_intel_pt {
17 
19  JSONTraceIntelPTCPUInfo() = default;
20 
21  JSONTraceIntelPTCPUInfo(pt_cpu cpu_info) {
22  family = static_cast<int64_t>(cpu_info.family);
23  model = static_cast<int64_t>(cpu_info.model);
24  stepping = static_cast<int64_t>(cpu_info.stepping);
25  vendor = cpu_info.vendor == pcv_intel ? "intel" : "Unknown";
26  }
27 
28  int64_t family;
29  int64_t model;
30  int64_t stepping;
32 };
33 
37 };
38 
42 };
43 
46 };
47 
48 } // namespace trace_intel_pt
49 } // namespace lldb_private
50 
51 namespace llvm {
52 namespace json {
53 
54 bool fromJSON(
55  const Value &value,
57  Path path);
58 
59 bool fromJSON(const llvm::json::Value &value,
61  llvm::json::Path path);
62 
63 llvm::json::Value
65 
66 llvm::json::Value
68 
69 llvm::json::Value
71 
72 } // namespace json
73 } // namespace llvm
74 
75 #endif // LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_TRACEINTELPTJSONSTRUCTS_H
llvm
Definition: Debugger.h:49
lldb_private::trace_intel_pt::JSONTraceIntelPTCPUInfo::stepping
int64_t stepping
Definition: TraceIntelPTJSONStructs.h:30
lldb_private::trace_intel_pt::JSONTraceIntelPTCPUInfo
Definition: TraceIntelPTJSONStructs.h:18
lldb_private::trace_intel_pt::JSONTraceIntelPTCPUInfo::family
int64_t family
Definition: TraceIntelPTJSONStructs.h:28
lldb_private::trace_intel_pt::JSONTraceIntelPTTrace::cpuInfo
JSONTraceIntelPTCPUInfo cpuInfo
Definition: TraceIntelPTJSONStructs.h:36
lldb_private::trace_intel_pt::JSONTraceIntelPTSession
Definition: TraceIntelPTJSONStructs.h:39
lldb_private::JSONTracePluginSettings
Definition: TraceJSONStructs.h:40
lldb_private::trace_intel_pt::JSONTraceIntelPTSettings
Definition: TraceIntelPTJSONStructs.h:44
lldb_private::trace_intel_pt::JSONTraceIntelPTCPUInfo::JSONTraceIntelPTCPUInfo
JSONTraceIntelPTCPUInfo()=default
lldb_private::trace_intel_pt::JSONTraceIntelPTSession::ipt_trace
JSONTraceIntelPTTrace ipt_trace
Definition: TraceIntelPTJSONStructs.h:40
lldb_private::trace_intel_pt::JSONTraceIntelPTTrace::type
std::string type
Definition: TraceIntelPTJSONStructs.h:35
lldb_private::trace_intel_pt::JSONTraceIntelPTCPUInfo::vendor
std::string vendor
Definition: TraceIntelPTJSONStructs.h:31
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::trace_intel_pt::JSONTraceIntelPTSession::session_base
JSONTraceSessionBase session_base
Definition: TraceIntelPTJSONStructs.h:41
lldb_private::JSONTraceSessionBase
Definition: TraceJSONStructs.h:44
lldb_private::trace_intel_pt::JSONTraceIntelPTSettings::cpuInfo
JSONTraceIntelPTCPUInfo cpuInfo
Definition: TraceIntelPTJSONStructs.h:45
lldb_private::trace_intel_pt::JSONTraceIntelPTCPUInfo::model
int64_t model
Definition: TraceIntelPTJSONStructs.h:29
llvm::json::fromJSON
bool fromJSON(const Value &value, JSONAddress &address, Path path)
Definition: TraceJSONStructs.cpp:66
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::trace_intel_pt::JSONTraceIntelPTCPUInfo::JSONTraceIntelPTCPUInfo
JSONTraceIntelPTCPUInfo(pt_cpu cpu_info)
Definition: TraceIntelPTJSONStructs.h:21
lldb_private::trace_intel_pt::JSONTraceIntelPTTrace
Definition: TraceIntelPTJSONStructs.h:34
llvm::json::toJSON
llvm::json::Value toJSON(const JSONModule &module)
Definition: TraceJSONStructs.cpp:21