OSDN Git Service

Plumb real stack traces through StrictMode
authorKurt Nelson <kurtn@google.com>
Thu, 7 Sep 2017 17:56:56 +0000 (10:56 -0700)
committerKurt Nelson <kurtn@google.com>
Mon, 23 Oct 2017 17:04:19 +0000 (10:04 -0700)
commit0918c93a3faaa3c96c0f053c2506902bfb298231
tree0038a0aba7dd30d7d48b1262f1a374a1e8ba71ec
parent1767ab6d697bed14dc8eb3cf0fbe9a6592a9b3d4
Plumb real stack traces through StrictMode

Currently StrictMode uses a string representation of the entire stack
trace throughout. Switching to passing Throwables will allow callback
consumers to traverse an array.

It does not regress the performance test added in ag/3083879.

Test: adb shell am instrument -w -e class android.os.StrictModeTest \
    com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner

timeThreadViolation_mean=332071
timeThreadViolation_median=328184
timeThreadViolation_min=311253
timeThreadViolation_standardDeviation=16106

timeCrossBinderThreadViolationNoStrictMode_mean=1843599
timeCrossBinderThreadViolationNoStrictMode_median=1824457
timeCrossBinderThreadViolationNoStrictMode_min=1810186
timeCrossBinderThreadViolationNoStrictMode_standardDeviation=43539

timeCrossBinderThreadViolation_mean=2300256
timeCrossBinderThreadViolation_median=2148796
timeCrossBinderThreadViolation_min=1792660
timeCrossBinderThreadViolation_standardDeviation=472271

timeVmViolationNoStrictMode_mean=27794864
timeVmViolationNoStrictMode_median=26617027
timeVmViolationNoStrictMode_min=23994153
timeVmViolationNoStrictMode_standardDeviation=3384362

timeVmViolation_mean=32878535
timeVmViolation_median=34775241
timeVmViolation_min=28373537
timeVmViolation_standardDeviation=3462046

timeThreadViolationNoStrictMode_mean=373863
timeThreadViolationNoStrictMode_median=388998
timeThreadViolationNoStrictMode_min=333664
timeThreadViolationNoStrictMode_standardDeviation=33219

Bug: 62458734
Change-Id: I6b3924be91f19654c502e0ec2f44cc07d6e86e3f
Test: cts-tradefed run cts-dev --module CtsOsTestCases --test
android.os.cts.StrictModeTest
api/test-current.txt
core/java/android/os/StrictMode.java
services/core/java/com/android/server/am/ActivityManagerService.java