Skip to content

Commit 3bd8897

Browse files
committed
remove unused
1 parent f49c3e2 commit 3bd8897

File tree

3 files changed

+4
-30
lines changed

3 files changed

+4
-30
lines changed

lldb/include/lldb/Core/Telemetry.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ struct TargetInfo : public LLDBBaseTelemetryInfo {
106106
return (T->getKind() & LLDBEntryKind::TargetInfo) ==
107107
LLDBEntryKind::TargetInfo;
108108
}
109+
void serialize(llvm::telemetry::Serializer &serializer) const override;
109110
};
110111

111112
struct DebuggerInfo : public LLDBBaseTelemetryInfo {
@@ -139,17 +140,6 @@ class TelemetryManager : public llvm::telemetry::Manager {
139140

140141
virtual llvm::StringRef GetInstanceName() const = 0;
141142

142-
/// The following methods are for reporting the load of an executable.
143-
/// One is invoked at the beginning of the process and the other at
144-
/// the end.
145-
/// This is done in two passes to avoid losing date in case of any error/crash
146-
/// during the action.
147-
///
148-
/// Invoked at the begining of the load of the main-executable.
149-
virtual void AtMainExecutableLoadStart(TargetInfo *entry);
150-
/// Invoked at the end of the load.
151-
virtual void AtMainExecutableLoadEnd(TargetInfo *entry);
152-
153143
static TelemetryManager *GetInstance();
154144

155145
protected:

lldb/source/Core/Telemetry.cpp

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@ void DebuggerInfo::serialize(Serializer &serializer) const {
6868
serializer.write("is_exit_entry", is_exit_entry);
6969
}
7070

71-
void LLDBBaseTelemetryInfo::serialize(Serializer &serializer) const {
72-
serializer.write("entry_kind", getKind());
73-
serializer.write("session_id", SessionId);
74-
serializer.write("start_time", ToNanosec(start_time));
75-
if (end_time.has_value())
76-
serializer.write("end_time", ToNanosec(end_time.value()));
77-
}
78-
7971
void TargetInfo::serialize(Serializer &serializer) const {
8072
LLDBBaseTelemetryInfo::serialize(serializer);
8173

@@ -88,14 +80,6 @@ void TargetInfo::serialize(Serializer &serializer) const {
8880
}
8981
}
9082

91-
void MiscTelemetryInfo::serialize(Serializer &serializer) const {
92-
LLDBBaseTelemetryInfo::serialize(serializer);
93-
serializer.write("target_uuid", target_uuid);
94-
serializer.beginObject("meta_data");
95-
for (const auto &kv : meta_data)
96-
serializer.write(kv.first, kv.second);
97-
serializer.endObject();
98-
}
9983

10084
TelemetryManager::TelemetryManager(std::unique_ptr<Config> config)
10185
: m_config(std::move(config)), m_id(MakeUUID()) {}
@@ -119,8 +103,8 @@ class NoOpTelemetryManager : public TelemetryManager {
119103
}
120104

121105
explicit NoOpTelemetryManager()
122-
: TelemetryManager(std::make_unique<LLDBConfig>(
123-
/*EnableTelemetry*/ false, /*DetailedCommand*/ false)) {}
106+
: TelemetryManager(std::make_unique<::llvm::telemetry::Config>(
107+
/*EnableTelemetry*/ false)) {}
124108

125109
virtual llvm::StringRef GetInstanceName() const override {
126110
return "NoOpTelemetryManager";

lldb/source/Target/Process.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ bool Process::SetExitStatus(int status, llvm::StringRef exit_string) {
10661066
// Use a mutex to protect setting the exit status.
10671067
std::lock_guard<std::mutex> guard(m_exit_status_mutex);
10681068
Debugger *debugger = &(GetTarget().GetDebugger());
1069-
telemetry::ScopedDispatch<telemetry::TargetInfo> helper(debugger);
1069+
telemetry::ScopedDispatcher<telemetry::TargetInfo> helper(debugger);
10701070
// Save the Module UUID since the Module might be gone by end of scope.
10711071
std::string target_uuid =
10721072
GetTarget().GetExecutableModule()->GetUUID().GetAsString();

0 commit comments

Comments
 (0)