MediaMetrics: Tune garbage collection
Reduce thresholds for garbage collection.
Track the number of gcs in the dumpsys.
Test: 30x repeated invocation of AudioTrackTest
Test: adb shell showmap '$(pgrep -f audioserver)'
Test: adb shell dumpsys media.metrics --all
Bug: 159410113
Change-Id: I3ff7bb84bc45e44fe3d5ea84fecdf05c76cf5733
diff --git a/services/mediametrics/AnalyticsState.h b/services/mediametrics/AnalyticsState.h
index b648947..09c0b4c 100644
--- a/services/mediametrics/AnalyticsState.h
+++ b/services/mediametrics/AnalyticsState.h
@@ -93,7 +93,7 @@
int32_t ll = lines;
if (ll > 0) {
- ss << "TransactionLog:\n";
+ ss << "TransactionLog: gc(" << mTransactionLog.getGarbageCollectionCount() << ")\n";
--ll;
}
if (ll > 0) {
@@ -102,7 +102,7 @@
ll -= l;
}
if (ll > 0) {
- ss << "TimeMachine:\n";
+ ss << "TimeMachine: gc(" << mTimeMachine.getGarbageCollectionCount() << ")\n";
--ll;
}
if (ll > 0) {