Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:42

0001 //===-- SBStatisticsOptions.h -----------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_API_SBSTATISTICSOPTIONS_H
0010 #define LLDB_API_SBSTATISTICSOPTIONS_H
0011 
0012 #include "lldb/API/SBDefines.h"
0013 
0014 namespace lldb {
0015 
0016 /// This class handles the verbosity when dumping statistics
0017 class LLDB_API SBStatisticsOptions {
0018 public:
0019   SBStatisticsOptions();
0020   SBStatisticsOptions(const lldb::SBStatisticsOptions &rhs);
0021   ~SBStatisticsOptions();
0022 
0023   const SBStatisticsOptions &operator=(const lldb::SBStatisticsOptions &rhs);
0024 
0025   /// If true, dump only high-level summary statistics. Exclude details like
0026   /// targets, modules, breakpoints, etc. This turns off `IncludeTargets`,
0027   /// `IncludeModules` and `IncludeTranscript` by default.
0028   ///
0029   /// Defaults to false.
0030   void SetSummaryOnly(bool b);
0031   bool GetSummaryOnly();
0032 
0033   /// If true, dump statistics for the targets, including breakpoints,
0034   /// expression evaluations, frame variables, etc.
0035   ///
0036   /// Defaults to true, unless the `SummaryOnly` mode is enabled, in which case
0037   /// this is turned off unless specified.
0038   ///
0039   /// If both `IncludeTargets` and `IncludeModules` are true, a list of module
0040   /// identifiers will be added to the "targets" section.
0041   void SetIncludeTargets(bool b);
0042   bool GetIncludeTargets() const;
0043 
0044   /// If true, dump statistics for the modules, including time and size of
0045   /// various aspects of the module and debug information, type system, path,
0046   /// etc.
0047   ///
0048   /// Defaults to true, unless the `SummaryOnly` mode is enabled, in which case
0049   /// this is turned off unless specified.
0050   ///
0051   /// If both `IncludeTargets` and `IncludeModules` are true, a list of module
0052   /// identifiers will be added to the "targets" section.
0053   void SetIncludeModules(bool b);
0054   bool GetIncludeModules() const;
0055 
0056   /// If true and the setting `interpreter.save-transcript` is enabled, include
0057   /// a JSON array with all commands the user and/or scripts executed during a
0058   /// debug session.
0059   ///
0060   /// Defaults to true, unless the `SummaryOnly` mode is enabled, in which case
0061   /// this is turned off unless specified.
0062   void SetIncludeTranscript(bool b);
0063   bool GetIncludeTranscript() const;
0064 
0065   /// If set to true, the debugger will load all debug info that is available
0066   /// and report statistics on the total amount. If this is set to false, then
0067   /// only report statistics on the currently loaded debug information.
0068   /// This can avoid loading debug info from separate files just so it can
0069   /// report the total size which can slow down statistics reporting.
0070   void SetReportAllAvailableDebugInfo(bool b);
0071   bool GetReportAllAvailableDebugInfo();
0072 
0073 protected:
0074   friend class SBTarget;
0075   const lldb_private::StatisticsOptions &ref() const;
0076 
0077 private:
0078   std::unique_ptr<lldb_private::StatisticsOptions> m_opaque_up;
0079 };
0080 } // namespace lldb
0081 #endif // LLDB_API_SBSTATISTICSOPTIONS_H