Loading cmds/statsd/src/atoms.proto +2 −2 Original line number Diff line number Diff line Loading @@ -2196,8 +2196,8 @@ message Temperature { /** * Pulls the statistics of calls to Binder. * * Binder stats are cumulative from boot unless somebody reset the data using * > adb shell dumpsys binder_calls_stats --reset * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one * config on the device. * * Next tag: 14 */ Loading services/core/java/com/android/server/BinderCallsStatsService.java +12 −0 Original line number Diff line number Diff line Loading @@ -118,10 +118,22 @@ public class BinderCallsStatsService extends Binder { this.mBinderCallsStats = binderCallsStats; } /** @see BinderCallsStats#reset */ public void reset() { mBinderCallsStats.reset(); } /** * @see BinderCallsStats#getExportedCallStats. * * Note that binder calls stats will be reset by statsd every time * the data is exported. */ public ArrayList<BinderCallsStats.ExportedCallStat> getExportedCallStats() { return mBinderCallsStats.getExportedCallStats(); } /** @see BinderCallsStats#getExportedExceptionStats */ public ArrayMap<String, Integer> getExportedExceptionStats() { return mBinderCallsStats.getExportedExceptionStats(); } Loading services/core/java/com/android/server/stats/StatsCompanionService.java +3 −0 Original line number Diff line number Diff line Loading @@ -929,6 +929,7 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { } List<ExportedCallStat> callStats = binderStats.getExportedCallStats(); binderStats.reset(); long elapsedNanos = SystemClock.elapsedRealtimeNanos(); for (ExportedCallStat callStat : callStats) { StatsLogEventWrapper e = new StatsLogEventWrapper(elapsedNanos, tagId, 13 /* fields */); Loading Loading @@ -957,6 +958,8 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { } ArrayMap<String, Integer> exceptionStats = binderStats.getExportedExceptionStats(); // TODO: decouple binder calls exceptions with the rest of the binder calls data so that we // can reset the exception stats. long elapsedNanos = SystemClock.elapsedRealtimeNanos(); for (Entry<String, Integer> entry : exceptionStats.entrySet()) { StatsLogEventWrapper e = new StatsLogEventWrapper(elapsedNanos, tagId, 2 /* fields */); Loading Loading
cmds/statsd/src/atoms.proto +2 −2 Original line number Diff line number Diff line Loading @@ -2196,8 +2196,8 @@ message Temperature { /** * Pulls the statistics of calls to Binder. * * Binder stats are cumulative from boot unless somebody reset the data using * > adb shell dumpsys binder_calls_stats --reset * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one * config on the device. * * Next tag: 14 */ Loading
services/core/java/com/android/server/BinderCallsStatsService.java +12 −0 Original line number Diff line number Diff line Loading @@ -118,10 +118,22 @@ public class BinderCallsStatsService extends Binder { this.mBinderCallsStats = binderCallsStats; } /** @see BinderCallsStats#reset */ public void reset() { mBinderCallsStats.reset(); } /** * @see BinderCallsStats#getExportedCallStats. * * Note that binder calls stats will be reset by statsd every time * the data is exported. */ public ArrayList<BinderCallsStats.ExportedCallStat> getExportedCallStats() { return mBinderCallsStats.getExportedCallStats(); } /** @see BinderCallsStats#getExportedExceptionStats */ public ArrayMap<String, Integer> getExportedExceptionStats() { return mBinderCallsStats.getExportedExceptionStats(); } Loading
services/core/java/com/android/server/stats/StatsCompanionService.java +3 −0 Original line number Diff line number Diff line Loading @@ -929,6 +929,7 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { } List<ExportedCallStat> callStats = binderStats.getExportedCallStats(); binderStats.reset(); long elapsedNanos = SystemClock.elapsedRealtimeNanos(); for (ExportedCallStat callStat : callStats) { StatsLogEventWrapper e = new StatsLogEventWrapper(elapsedNanos, tagId, 13 /* fields */); Loading Loading @@ -957,6 +958,8 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { } ArrayMap<String, Integer> exceptionStats = binderStats.getExportedExceptionStats(); // TODO: decouple binder calls exceptions with the rest of the binder calls data so that we // can reset the exception stats. long elapsedNanos = SystemClock.elapsedRealtimeNanos(); for (Entry<String, Integer> entry : exceptionStats.entrySet()) { StatsLogEventWrapper e = new StatsLogEventWrapper(elapsedNanos, tagId, 2 /* fields */); Loading