Skip to content

Commit 9173fd7

Browse files
[lldb] Avoid repeated map lookups (NFC) (#112655)
1 parent 91b2ac6 commit 9173fd7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5323,9 +5323,8 @@ std::string ProcessGDBRemote::HarmonizeThreadIdsForProfileData(
53235323
uint32_t prev_used_usec = 0;
53245324
std::map<uint64_t, uint32_t>::iterator iterator =
53255325
m_thread_id_to_used_usec_map.find(thread_id);
5326-
if (iterator != m_thread_id_to_used_usec_map.end()) {
5327-
prev_used_usec = m_thread_id_to_used_usec_map[thread_id];
5328-
}
5326+
if (iterator != m_thread_id_to_used_usec_map.end())
5327+
prev_used_usec = iterator->second;
53295328

53305329
uint32_t real_used_usec = curr_used_usec - prev_used_usec;
53315330
// A good first time record is one that runs for at least 0.25 sec

0 commit comments

Comments
 (0)