Skip to content

Commit 339baae

Browse files
authored
Revert "Report only loaded debug info in statistics dump (llvm#81706)" (llvm#82150)
This reverts commit 21ddd7f because it breaks a bunch of tests: https://lab.llvm.org/buildbot/#/builders/68/builds/69018 https://green.lab.llvm.org/green/view/LLDB/job/as-lldb-cmake/16273
1 parent 5c96e71 commit 339baae

24 files changed

+21
-346
lines changed

lldb/bindings/interface/SBStatisticsOptionsDocstrings.i

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,3 @@
66
) lldb::SBStatisticsOptions::SetSummaryOnly;
77
%feature("docstring", "Gets whether the statistics only dump a summary."
88
) lldb::SBStatisticsOptions::GetSummaryOnly;
9-
%feature("docstring", "
10-
Sets whether the statistics will force loading all possible debug info."
11-
) lldb::SBStatisticsOptions::SetReportAllAvailableDebugInfo;
12-
%feature("docstring", "
13-
Gets whether the statistics will force loading all possible debug info."
14-
) lldb::SBStatisticsOptions::GetReportAllAvailableDebugInfo;

lldb/include/lldb/API/SBStatisticsOptions.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ class LLDB_API SBStatisticsOptions {
2525
void SetSummaryOnly(bool b);
2626
bool GetSummaryOnly();
2727

28-
/// If set to true, the debugger will load all debug info that is available
29-
/// and report statistics on the total amount. If this is set to false, then
30-
/// only report statistics on the currently loaded debug information.
31-
/// This can avoid loading debug info from separate files just so it can
32-
/// report the total size which can slow down statistics reporting.
33-
void SetReportAllAvailableDebugInfo(bool b);
34-
bool GetReportAllAvailableDebugInfo();
35-
3628
protected:
3729
friend class SBTarget;
3830
const lldb_private::StatisticsOptions &ref() const;

lldb/include/lldb/Symbol/SymbolFile.h

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,7 @@ class SymbolFile : public PluginInterface {
381381

382382
/// Metrics gathering functions
383383

384-
/// Return the size in bytes of all loaded debug information or total possible
385-
/// debug info in the symbol file.
384+
/// Return the size in bytes of all debug information in the symbol file.
386385
///
387386
/// If the debug information is contained in sections of an ObjectFile, then
388387
/// this call should add the size of all sections that contain debug
@@ -392,14 +391,7 @@ class SymbolFile : public PluginInterface {
392391
/// entire file should be returned. The default implementation of this
393392
/// function will iterate over all sections in a module and add up their
394393
/// debug info only section byte sizes.
395-
///
396-
/// \param load_all_debug_info
397-
/// If true, force loading any symbol files if they are not yet loaded and
398-
/// add to the total size. Default to false.
399-
///
400-
/// \returns
401-
/// Total currently loaded debug info size in bytes
402-
virtual uint64_t GetDebugInfoSize(bool load_all_debug_info = false) = 0;
394+
virtual uint64_t GetDebugInfoSize() = 0;
403395

404396
/// Return the time taken to parse the debug information.
405397
///
@@ -542,7 +534,7 @@ class SymbolFileCommon : public SymbolFile {
542534

543535
void Dump(Stream &s) override;
544536

545-
uint64_t GetDebugInfoSize(bool load_all_debug_info = false) override;
537+
uint64_t GetDebugInfoSize() override;
546538

547539
bool GetDebugInfoIndexWasLoadedFromCache() const override {
548540
return m_index_was_loaded_from_cache;

lldb/include/lldb/Symbol/SymbolFileOnDemand.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class SymbolFileOnDemand : public lldb_private::SymbolFile {
178178

179179
void PreloadSymbols() override;
180180

181-
uint64_t GetDebugInfoSize(bool load_all_debug_info = false) override;
181+
uint64_t GetDebugInfoSize() override;
182182
lldb_private::StatsDuration::Duration GetDebugInfoParseTime() override;
183183
lldb_private::StatsDuration::Duration GetDebugInfoIndexTime() override;
184184

lldb/include/lldb/Target/Statistics.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ struct ConstStringStats {
132132

133133
struct StatisticsOptions {
134134
bool summary_only = false;
135-
bool load_all_debug_info = false;
136135
};
137136

138137
/// A class that represents statistics for a since lldb_private::Target.

lldb/source/API/SBStatisticsOptions.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@ void SBStatisticsOptions::SetSummaryOnly(bool b) {
4444

4545
bool SBStatisticsOptions::GetSummaryOnly() { return m_opaque_up->summary_only; }
4646

47-
void SBStatisticsOptions::SetReportAllAvailableDebugInfo(bool b) {
48-
m_opaque_up->load_all_debug_info = b;
49-
}
50-
51-
bool SBStatisticsOptions::GetReportAllAvailableDebugInfo() {
52-
return m_opaque_up->load_all_debug_info;
53-
}
54-
5547
const lldb_private::StatisticsOptions &SBStatisticsOptions::ref() const {
5648
return *m_opaque_up;
5749
}

lldb/source/Commands/CommandObjectStats.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ class CommandObjectStatsDump : public CommandObjectParsed {
7878
case 's':
7979
m_stats_options.summary_only = true;
8080
break;
81-
case 'f':
82-
m_stats_options.load_all_debug_info = true;
83-
break;
8481
default:
8582
llvm_unreachable("Unimplemented option");
8683
}

lldb/source/Commands/Options.td

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,10 +1419,6 @@ let Command = "statistics dump" in {
14191419
def statistics_dump_all: Option<"all-targets", "a">, Group<1>,
14201420
Desc<"Include statistics for all targets.">;
14211421
def statistics_dump_summary: Option<"summary", "s">, Group<1>,
1422-
Desc<"Dump only high-level summary statistics. "
1422+
Desc<"Dump only high-level summary statistics."
14231423
"Exclude targets, modules, breakpoints etc... details.">;
1424-
def statistics_dump_force: Option<"load-all-debug-info", "f">, Group<1>,
1425-
Desc<"Dump the total possible debug info statistics. "
1426-
"Force loading all the debug information if not yet loaded, and collect "
1427-
"statistics with those.">;
14281424
}

lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ void SymbolFileBreakpad::ParseUnwindData() {
918918
m_unwind_data->win.Sort();
919919
}
920920

921-
uint64_t SymbolFileBreakpad::GetDebugInfoSize(bool load_all_debug_info) {
921+
uint64_t SymbolFileBreakpad::GetDebugInfoSize() {
922922
// Breakpad files are all debug info.
923923
return m_objfile_sp->GetByteSize();
924924
}

lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class SymbolFileBreakpad : public SymbolFileCommon {
141141

142142
llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
143143

144-
uint64_t GetDebugInfoSize(bool load_all_debug_info = false) override;
144+
uint64_t GetDebugInfoSize() override;
145145

146146
private:
147147
// A class representing a position in the breakpad file. Useful for

0 commit comments

Comments
 (0)