Loading cmds/statsd/src/packages/UidMap.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -106,9 +106,9 @@ void UidMap::updateMap(const int64_t& timestamp, const vector<int32_t>& uid, t->set_uid(uid[j]); } mBytesUsed += snapshot->ByteSize(); ensureBytesUsedBelowLimit(); StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed); StatsdStats::getInstance().setUidMapSnapshots(mOutput.snapshots_size()); ensureBytesUsedBelowLimit(); getListenerListCopyLocked(&broadcastList); } // To avoid invoking callback while holding the internal lock. we get a copy of the listener Loading Loading @@ -142,9 +142,9 @@ void UidMap::updateApp(const int64_t& timestamp, const String16& app_16, const i log->set_uid(uid); log->set_version(versionCode); mBytesUsed += log->ByteSize(); ensureBytesUsedBelowLimit(); StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed); StatsdStats::getInstance().setUidMapChanges(mOutput.changes_size()); ensureBytesUsedBelowLimit(); auto range = mMap.equal_range(int(uid)); bool found = false; Loading Loading @@ -222,9 +222,9 @@ void UidMap::removeApp(const int64_t& timestamp, const String16& app_16, const i log->set_app(app); log->set_uid(uid); mBytesUsed += log->ByteSize(); ensureBytesUsedBelowLimit(); StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed); StatsdStats::getInstance().setUidMapChanges(mOutput.changes_size()); ensureBytesUsedBelowLimit(); auto range = mMap.equal_range(int(uid)); for (auto it = range.first; it != range.second; ++it) { Loading cmds/statsd/src/packages/UidMap.h +2 −2 Original line number Diff line number Diff line Loading @@ -152,9 +152,9 @@ private: // until the memory consumed by mOutput is below the specified limit. void ensureBytesUsedBelowLimit(); // Override used for testing the max memory allowed by uid map. -1 means we use the value // Override used for testing the max memory allowed by uid map. 0 means we use the value // specified in StatsdStats.h with the rest of the guardrails. size_t maxBytesOverride = -1; size_t maxBytesOverride = 0; // Cache the size of mOutput; size_t mBytesUsed; Loading Loading
cmds/statsd/src/packages/UidMap.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -106,9 +106,9 @@ void UidMap::updateMap(const int64_t& timestamp, const vector<int32_t>& uid, t->set_uid(uid[j]); } mBytesUsed += snapshot->ByteSize(); ensureBytesUsedBelowLimit(); StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed); StatsdStats::getInstance().setUidMapSnapshots(mOutput.snapshots_size()); ensureBytesUsedBelowLimit(); getListenerListCopyLocked(&broadcastList); } // To avoid invoking callback while holding the internal lock. we get a copy of the listener Loading Loading @@ -142,9 +142,9 @@ void UidMap::updateApp(const int64_t& timestamp, const String16& app_16, const i log->set_uid(uid); log->set_version(versionCode); mBytesUsed += log->ByteSize(); ensureBytesUsedBelowLimit(); StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed); StatsdStats::getInstance().setUidMapChanges(mOutput.changes_size()); ensureBytesUsedBelowLimit(); auto range = mMap.equal_range(int(uid)); bool found = false; Loading Loading @@ -222,9 +222,9 @@ void UidMap::removeApp(const int64_t& timestamp, const String16& app_16, const i log->set_app(app); log->set_uid(uid); mBytesUsed += log->ByteSize(); ensureBytesUsedBelowLimit(); StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed); StatsdStats::getInstance().setUidMapChanges(mOutput.changes_size()); ensureBytesUsedBelowLimit(); auto range = mMap.equal_range(int(uid)); for (auto it = range.first; it != range.second; ++it) { Loading
cmds/statsd/src/packages/UidMap.h +2 −2 Original line number Diff line number Diff line Loading @@ -152,9 +152,9 @@ private: // until the memory consumed by mOutput is below the specified limit. void ensureBytesUsedBelowLimit(); // Override used for testing the max memory allowed by uid map. -1 means we use the value // Override used for testing the max memory allowed by uid map. 0 means we use the value // specified in StatsdStats.h with the rest of the guardrails. size_t maxBytesOverride = -1; size_t maxBytesOverride = 0; // Cache the size of mOutput; size_t mBytesUsed; Loading