[llvm-branch-commits] [lldb] fcf9479 - [lldb] Don't instrument demangling.

Jonas Devlieghere via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Dec 23 10:48:06 PST 2020


Author: Jonas Devlieghere
Date: 2020-12-23T10:43:13-08:00
New Revision: fcf9479f7d65754cf311d8e5be1046f1ace28945

URL: https://github.com/llvm/llvm-project/commit/fcf9479f7d65754cf311d8e5be1046f1ace28945
DIFF: https://github.com/llvm/llvm-project/commit/fcf9479f7d65754cf311d8e5be1046f1ace28945.diff

LOG: [lldb] Don't instrument demangling.

Don't instrument demangling calls. These functions are very hot and
instrumenting them quickly results in too much data to be useful.

Added: 
    

Modified: 
    lldb/source/Core/Mangled.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Core/Mangled.cpp b/lldb/source/Core/Mangled.cpp
index eaad0f3ebf45..627be94a303c 100644
--- a/lldb/source/Core/Mangled.cpp
+++ b/lldb/source/Core/Mangled.cpp
@@ -14,7 +14,6 @@
 #include "lldb/Utility/Logging.h"
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/Stream.h"
-#include "lldb/Utility/Timer.h"
 #include "lldb/lldb-enumerations.h"
 
 #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
@@ -227,10 +226,6 @@ static char *GetItaniumDemangledStr(const char *M) {
 // makes use of ItaniumPartialDemangler's rich demangle info
 bool Mangled::DemangleWithRichManglingInfo(
     RichManglingContext &context, SkipMangledNameFn *skip_mangled_name) {
-  // We need to generate and cache the demangled name.
-  LLDB_SCOPED_TIMERF("Mangled::DemangleWithRichNameIndexInfo (m_mangled = %s)",
-                     m_mangled.GetCString());
-
   // Others are not meant to arrive here. ObjC names or C's main() for example
   // have their names stored in m_demangled, while m_mangled is empty.
   assert(m_mangled);
@@ -296,10 +291,6 @@ ConstString Mangled::GetDemangledName() const {
   // Check to make sure we have a valid mangled name and that we haven't
   // already decoded our mangled name.
   if (m_mangled && m_demangled.IsNull()) {
-    // We need to generate and cache the demangled name.
-    LLDB_SCOPED_TIMERF("Mangled::GetDemangledName (m_mangled = %s)",
-                       m_mangled.GetCString());
-
     // Don't bother running anything that isn't mangled
     const char *mangled_name = m_mangled.GetCString();
     ManglingScheme mangling_scheme = GetManglingScheme(m_mangled.GetStringRef());


        


More information about the llvm-branch-commits mailing list