summaryrefslogtreecommitdiff
path: root/libutils/ProcessCallStack.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2016-10-24 08:20:26 -0700
committerMark Salyzyn <salyzyn@google.com>2016-10-24 10:43:52 -0700
commit8fcfd85acc26f96dffb987951c33f09416e1ede7 (patch)
treecd98d105d1afbfe1c3a4c083a757ab0c678a0238 /libutils/ProcessCallStack.cpp
parent8cf0bd75f79ed641b5841dea1d34af18c6b4d40d (diff)
logd: address code fragility in last watermarks
Do not make the assumption that if worstPid is set, that the log buffer id is not LOG_ID_EVENTS or LOG_ID_SECURITY. Add comments to prevent future over-optimization based on this assumption. Make sure we reset mLast[id] = begin() when we mark it unset, but tell optimizer this is an _impossible_ path. SideEffects: drop two branches in all erase calls, gain an unordered find() on an empty list for events and security buffers. Test: gTest logd-unit-tests, liblog-unit-test & logcat-unit-tests Bug: 32247044 Change-Id: Ic156ca2253c050c28021cedf48bedaf7bd692c09
Diffstat (limited to 'libutils/ProcessCallStack.cpp')
0 files changed, 0 insertions, 0 deletions