diff --git a/lldb/include/lldb/Core/Declaration.h b/lldb/include/lldb/Core/Declaration.h --- a/lldb/include/lldb/Core/Declaration.h +++ b/lldb/include/lldb/Core/Declaration.h @@ -152,8 +152,6 @@ /// The number of bytes that this object occupies in memory. /// The returned value does not include the bytes for any /// shared string values. - /// - /// \see ConstString::StaticMemorySize () size_t MemorySize() const; /// Set accessor for the declaration file specification. diff --git a/lldb/include/lldb/Core/FileSpecList.h b/lldb/include/lldb/Core/FileSpecList.h --- a/lldb/include/lldb/Core/FileSpecList.h +++ b/lldb/include/lldb/Core/FileSpecList.h @@ -152,8 +152,6 @@ /// /// \return /// The number of bytes that this object occupies in memory. - /// - /// \see ConstString::StaticMemorySize () size_t MemorySize() const; bool IsEmpty() const { return m_files.empty(); } diff --git a/lldb/include/lldb/Core/Mangled.h b/lldb/include/lldb/Core/Mangled.h --- a/lldb/include/lldb/Core/Mangled.h +++ b/lldb/include/lldb/Core/Mangled.h @@ -183,8 +183,6 @@ /// /// \return /// The number of bytes that this object occupies in memory. - /// - /// \see ConstString::StaticMemorySize () size_t MemorySize() const; /// Set the string value in this object. diff --git a/lldb/include/lldb/Symbol/Function.h b/lldb/include/lldb/Symbol/Function.h --- a/lldb/include/lldb/Symbol/Function.h +++ b/lldb/include/lldb/Symbol/Function.h @@ -110,8 +110,6 @@ /// The number of bytes that this object occupies in memory. /// The returned value does not include the bytes for any /// shared string values. - /// - /// \see ConstString::StaticMemorySize () virtual size_t MemorySize() const; protected: @@ -238,8 +236,6 @@ /// The number of bytes that this object occupies in memory. /// The returned value does not include the bytes for any /// shared string values. - /// - /// \see ConstString::StaticMemorySize () size_t MemorySize() const override; private: @@ -595,8 +591,6 @@ /// The number of bytes that this object occupies in memory. /// The returned value does not include the bytes for any /// shared string values. - /// - /// \see ConstString::StaticMemorySize () size_t MemorySize() const; /// Get whether compiler optimizations were enabled for this function diff --git a/lldb/include/lldb/Utility/ConstString.h b/lldb/include/lldb/Utility/ConstString.h --- a/lldb/include/lldb/Utility/ConstString.h +++ b/lldb/include/lldb/Utility/ConstString.h @@ -394,20 +394,8 @@ /// /// \return /// The number of bytes that this object occupies in memory. - /// - /// \see ConstString::StaticMemorySize () size_t MemorySize() const { return sizeof(ConstString); } - /// Get the size in bytes of the current global string pool. - /// - /// Reports the size in bytes of all shared C string values, containers and - /// any other values as a byte size for the entire string pool. - /// - /// \return - /// The number of bytes that the global string pool occupies - /// in memory. - static size_t StaticMemorySize(); - struct MemoryStats { size_t GetBytesTotal() const { return bytes_total; } size_t GetBytesUsed() const { return bytes_used; } diff --git a/lldb/include/lldb/Utility/FileSpec.h b/lldb/include/lldb/Utility/FileSpec.h --- a/lldb/include/lldb/Utility/FileSpec.h +++ b/lldb/include/lldb/Utility/FileSpec.h @@ -334,8 +334,6 @@ /// /// \return /// The number of bytes that this object occupies in memory. - /// - /// \see ConstString::StaticMemorySize () size_t MemorySize() const; /// Change the file specified with a new path. diff --git a/lldb/source/Utility/ConstString.cpp b/lldb/source/Utility/ConstString.cpp --- a/lldb/source/Utility/ConstString.cpp +++ b/lldb/source/Utility/ConstString.cpp @@ -159,18 +159,6 @@ return nullptr; } - // Return the size in bytes that this object and any items in its collection - // of uniqued strings + data count values takes in memory. - size_t MemorySize() const { - size_t mem_size = sizeof(Pool); - for (const auto &pool : m_string_pools) { - llvm::sys::SmartScopedReader rlock(pool.m_mutex); - for (const auto &entry : pool.m_string_map) - mem_size += sizeof(StringPoolEntryType) + entry.getKey().size(); - } - return mem_size; - } - ConstString::MemoryStats GetMemoryStats() const { ConstString::MemoryStats stats; for (const auto &pool : m_string_pools) { @@ -338,11 +326,6 @@ m_string = StringPool().GetConstTrimmedCStringWithLength(cstr, cstr_len); } -size_t ConstString::StaticMemorySize() { - // Get the size of the static string pool - return StringPool().MemorySize(); -} - ConstString::MemoryStats ConstString::GetMemoryStats() { return StringPool().GetMemoryStats(); }