[Lldb-commits] [lldb] [lldb] Avoid repeated map lookups (NFC) (PR #112655)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 16 20:35:06 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/112655.diff
1 Files Affected:
- (modified) lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (+1-1)
``````````diff
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 3e09c316d74f44..70cbd1c57b895a 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -5324,7 +5324,7 @@ std::string ProcessGDBRemote::HarmonizeThreadIdsForProfileData(
std::map<uint64_t, uint32_t>::iterator iterator =
m_thread_id_to_used_usec_map.find(thread_id);
if (iterator != m_thread_id_to_used_usec_map.end()) {
- prev_used_usec = m_thread_id_to_used_usec_map[thread_id];
+ prev_used_usec = iterator->second;
}
uint32_t real_used_usec = curr_used_usec - prev_used_usec;
``````````
</details>
https://github.com/llvm/llvm-project/pull/112655
More information about the lldb-commits
mailing list