[Lldb-commits] [PATCH] D115951: Cache the manual DWARF index out to the LLDB cache directory when the LLDB index cache is enabled.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Dec 19 18:15:16 PST 2021


clayborg added inline comments.


================
Comment at: lldb/include/lldb/Symbol/Symtab.h:279
       m_mutex; // Provide thread safety for this symbol table
-  bool m_file_addr_to_index_computed : 1, m_name_indexes_computed : 1;
+  bool m_file_addr_to_index_computed : 1, m_name_indexes_computed : 1,
+    m_loaded_from_cache : 1, m_saved_to_cache : 1;
----------------
wallace wrote:
> teach me C++. What is this? Is everything stored as part of a single 8 byte section in memory?
This allows one byte to contain 8 bools. If you have a integer based type (bool, char, int, long, long long, etc) then they can be split up into bits for more efficient storage. Since we were already using bitfields here, I continued to use then. If you specify more than 8 in a row, it will take up another byte.


================
Comment at: lldb/test/API/functionalities/module_cache/debug_index/TestDebugIndexCache.py:40-41
+        command = "statistics dump "
+        if f:
+            f.write('(lldb) %s\n' % (command))
+        self.ci.HandleCommand(command, return_obj, False)
----------------
wallace wrote:
> i'm curious, why do you do that?
It was for debugging. If you don't specify a "log_path" then nothing happens here. But handy as we add more things to the statistics to dump the stats when debugging tests. I can remove if needed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115951/new/

https://reviews.llvm.org/D115951



More information about the lldb-commits mailing list