This is an archive of the discontinued LLVM Phabricator instance.

[lldb][NFC] Always update m_cache_{hits/misses} in FormatCache
ClosedPublic

Authored by teemperor on Mar 24 2020, 4:42 AM.

Details

Summary

These two variables are only incremented under LLDB_CONFIGURATION_DEBUG but their
value is always logged when verbose lldb formatter logging is enabled, which causes that our
cache hit/miss log looks like this in non-Debug builds:

Cache hits: 0 - Cache Misses: 0
...
Cache hits: 0 - Cache Misses: 0
...
Cache hits: 0 - Cache Misses: 0

This just always increments those two counters independent of build mode.

Diff Detail

Event Timeline

teemperor created this revision.Mar 24 2020, 4:42 AM
teemperor updated this revision to Diff 252282.Mar 24 2020, 5:20 AM
teemperor retitled this revision from [lldb][NFC] Remove m_cache_{hits/misses} from FormatCache to [lldb][NFC] Always update m_cache_{hits/misses} in FormatCache.
teemperor edited the summary of this revision. (Show Details)

Actually, I just realized this stuff is used (and even outside Debug builds) so that means this is actually wrong. Retitling revision...

JDevlieghere accepted this revision.Mar 24 2020, 9:05 AM
This revision is now accepted and ready to land.Mar 24 2020, 9:05 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2020, 12:23 PM