Commit Graph

4690 Commits

Author SHA1 Message Date
Kurt Nelson
87dd8bcbc2 Parcel nested stack trace elements
The only thing printed besides the stack elements is the classname `LogStackTrace`.
This is useless.
We can improve performance by only parceling around the StackTraceElement[] instead of serializing the whole Throwable.

testCrossBinderThreadViolation is currently ~3,700,000

Test: cts-tradefed run cts-dev --module CtsOsTestCases --test
android.os.cts.StrictModeTest
Bug: 68257982
Bug: 62458734
Bug: 68383527

timeThreadViolation_mean=374405
timeThreadViolation_median=372258
timeThreadViolation_min=367266
timeThreadViolation_standardDeviation=6998

timeCrossBinderThreadViolationNoStrictMode_mean=2331746
timeCrossBinderThreadViolationNoStrictMode_median=2337964
timeCrossBinderThreadViolationNoStrictMode_min=2226280
timeCrossBinderThreadViolationNoStrictMode_standardDeviation=64135

timeCrossBinderThreadViolation_mean=2484286
timeCrossBinderThreadViolation_median=2345391
timeCrossBinderThreadViolation_min=2331061
timeCrossBinderThreadViolation_standardDeviation=251332

timeVmViolationNoStrictMode_mean=2677281
timeVmViolationNoStrictMode_median=2733943
timeVmViolationNoStrictMode_min=2319806
timeVmViolationNoStrictMode_standardDeviation=295305

timeVmViolation_mean=3718122
timeVmViolation_median=3632176
timeVmViolation_min=3557980
timeVmViolation_standardDeviation=236624

timeThreadViolationNoStrictMode_mean=414257
timeThreadViolationNoStrictMode_median=414664
timeThreadViolationNoStrictMode_min=397317
timeThreadViolationNoStrictMode_standardDeviation=12954

Change-Id: If59812d71917aed08d557936ff7495d2f4ded23b
2017-10-27 11:12:05 -07:00
Kurt Nelson
9bcd7e9c5d Move violation extra messages into throwable
Some violations have a separate string from the throwable. Prepending
the string to the throwable's message or using it as the message sets us
up for all violations to extend Throwable.

Bug: 62458734
Test: cts-tradefed run cts-dev --module CtsOsTestCases --test
android.os.cts.StrictModeTest
Change-Id: I6a97ee69a90fb975dc453ca37fe53ea78ebfe974
2017-10-25 17:14:38 -07:00
Kurt Nelson
826d12cf92 Merge "Use annotation instead of comment" 2017-10-26 00:09:12 +00:00
Kurt Nelson
1981f4292d Use annotation instead of comment
Test: none
Bug: none
Change-Id: I723fba865116a203147dd5f2a6343b2cb29c65a2
2017-10-25 13:53:29 -07:00
Dianne Hackborn
c81983a0c3 Start removing remaining pm code to package manager
Everything is now moved out of the pm command except for
the various install commands.  I am going to hold of on
those since they require doing some resolution with the
current implementations in the package manager to make
sure they match and behave identically to the implementations
currently in the pm command.  But other than that, everything
in pm is now just redirecting over to "cmd package".

Also fix up some of the dumpsys output of a few other sevices
when asking to print the data for a particular package, so
the "pm dump" command gives a little more sane result.

Test: manual

Change-Id: I139e06e560203b72243d7eea9543c2240db0f8f8
2017-10-25 12:19:26 -07:00
TreeHugger Robot
17e5e2e573 Merge "Add some atoms to statsd" 2017-10-25 17:04:54 +00:00
Steven Moreland
90694f7037 Merge "Revert "HIDL Java getService now the same as C++."" am: 65d1e549b6 am: 4868f5311e
am: b29739e1c9

Change-Id: I0a11131c6736f03b15e967990edbbbd47b6537ed
2017-10-25 06:19:38 +00:00
Steven Moreland
b29739e1c9 Merge "Revert "HIDL Java getService now the same as C++."" am: 65d1e549b6
am: 4868f5311e

Change-Id: I80789cb8e1cf0d49e3f85fffe29a12eb74b7726e
2017-10-25 05:56:47 +00:00
Steven Moreland
65d1e549b6 Merge "Revert "HIDL Java getService now the same as C++."" 2017-10-25 04:50:08 +00:00
Steven Moreland
cc9e67c019 Revert "HIDL Java getService now the same as C++."
Appears to be causing problems on 2017 devices.

This reverts commit c1f00f8cd8.

Change-Id: I6c1717a612bfa3fe63f08160a1db652c284f6ba4
2017-10-25 04:46:26 +00:00
Steven Moreland
8c69e67acd Merge "HIDL Java getService now the same as C++." am: 0c41ad872f am: 34b5b69de9
am: fd05e9a075

Change-Id: I6e55ca21bf55f3fe581eaceabc371dc0b85260ad
2017-10-25 02:24:45 +00:00
Steven Moreland
fd05e9a075 Merge "HIDL Java getService now the same as C++." am: 0c41ad872f
am: 34b5b69de9

Change-Id: I3d7bd6b7b352093306da5d250b518ca9b7dc0f6b
2017-10-25 02:13:39 +00:00
Treehugger Robot
0c41ad872f Merge "HIDL Java getService now the same as C++." 2017-10-25 01:53:16 +00:00
Bookatz
8c6571bde8 Add some atoms to statsd
The following atoms (events) are added:
BatteryLevelChanged
ChargingStateChanged
PluggedStateChanged
DeviceTemperatureReported
DeviceOnStatusChanged
WakeupAlarmOccurred
KernelWakeupReported

Test: manual
Change-Id: I1e7d8a842ee67b5da30f20c9e6976c5bc4e0a0ef
2017-10-24 18:18:19 -07:00
TreeHugger Robot
c3787a8a83 Merge "Adds aidl definitions and their implementations for binder transfer of statsd entries to clients. This change only includes changes on statds side and does not include java library for clients to import. Java library will be a separate change as it requires system api review." 2017-10-25 00:18:53 +00:00
yro
31eb67b349 Adds aidl definitions and their implementations for binder transfer of
statsd entries to clients. This change only includes changes on statds
side and does not include java library for clients to import. Java
library will be a separate change as it requires system api review.

Test: statsd, statsd_test
Change-Id: I306c6e9687801668cc0145b12d38406bfe634775
2017-10-24 15:25:27 -07:00
Kurt Nelson
1efd46211f Merge "Plumb real stack traces through StrictMode" 2017-10-24 22:19:44 +00:00
Kurt Nelson
0918c93a3f 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
2017-10-23 10:04:19 -07:00
Steven Moreland
c1f00f8cd8 HIDL Java getService now the same as C++.
getService: wait for service if it is declared in the manifest
tryGetService: only return if the service is immediately available

Bug: 67981006
Test: hidl_test_java
Change-Id: I4485b84f0fde98851cf5f64d198a8c5410795c8c
2017-10-23 01:23:45 -07:00
TreeHugger Robot
b3d66a3ccd Merge "Changes pulled data to use Parcel objects." 2017-10-21 01:21:39 +00:00
David Chen
1481fe142d Changes pulled data to use Parcel objects.
Previously, pulled data was returned as a string. We instead
return the data as an array of StatsLogEventWrapper, which encodes
using the binary-encoded format liblog uses. StatsD uses the same
parsing as for pushed events to convert these. This CL also fixes
the parsing of log_msg since the strings were previously emptied
before we had a chance to read the values.

Note that the cpp-aidl can't support List of Parcelable, so we
have to return the results as an array.

Test: Manual using the new command in StatsService to print results.
Also created a new unit-test by creating a dummy pull code of -1,
but this test is deleted since it required creating a fake output in
StatsCompanionService.

Change-Id: I1cfb9ea081a59292a60e934e8527adc40982ed80
2017-10-20 16:29:59 -07:00
TreeHugger Robot
0d769d80a9 Merge "incidentd: dumping batterystats app data to proto" 2017-10-20 23:22:48 +00:00
TreeHugger Robot
fc5d6617c3 Merge changes from topic "health2_healthd_hwbinder"
* changes:
  BatteryService serves IBatteryPropertiesRegistrar.
  BatteryService: Use android.hardware.health@2.0.
2017-10-20 00:10:04 +00:00
Tom Cherry
d097e2aaf2 Merge "Allow ro. properties to have arbitrary lengths" am: 3851f132d1 am: 9fba6c2fe1 am: 918a29c88d
am: 3fb7276115

Change-Id: I7bc3e26d70267add40bfc2fb09b69b475e4daec6
2017-10-18 19:55:19 +00:00
Tom Cherry
3fb7276115 Merge "Allow ro. properties to have arbitrary lengths" am: 3851f132d1 am: 9fba6c2fe1
am: 918a29c88d

Change-Id: I29e0ca8d91d29431b498788b548fd48e85d6669b
2017-10-18 19:44:54 +00:00
Yifan Hong
1fd86f4c05 BatteryService serves IBatteryPropertiesRegistrar.
This binder service is originally served by healthd.
To allow BatteryManager to continue to work, BatteryService
implements this binder service.

Test: BatteryManagerTest
Bug: 62229583

Change-Id: I9c97b3936546740c6d63060899fe50c5c4c957bd
2017-10-18 12:35:10 -07:00
Kweku Adams
103351f9c2 incidentd: dumping batterystats app data to proto
Bug: 65750808
Test: flash device and checkout proto output against csv output
Change-Id: I2dad948d4b43dc904f01dcaef137a3ff947062c6
2017-10-18 12:32:38 -07:00
Tom Cherry
918a29c88d Merge "Allow ro. properties to have arbitrary lengths" am: 3851f132d1
am: 9fba6c2fe1

Change-Id: I17743afca87569e5ef6e17572aec0e8e8e535847
2017-10-18 18:48:55 +00:00
Tom Cherry
9fba6c2fe1 Merge "Allow ro. properties to have arbitrary lengths"
am: 3851f132d1

Change-Id: Ie9c340401786d97e469e283418cffef6fbbbb186
2017-10-18 18:39:42 +00:00
Tom Cherry
38a77c4048 Allow ro. properties to have arbitrary lengths
Bug: 23102347
Bug: 34954705
Test: build
Change-Id: I99b074633c60e95cdd2284bf8a708b9187c1e310
2017-10-18 09:25:17 -07:00
Tom Cherry
9a78e64d8f Merge "Frameworks: Remove warning for SystemProperties.get" am: c589496ce9 am: b72c0626f5 am: 16e676be4b
am: 3b01d0a09a

Change-Id: Icdc349598538e7cb2740e0829e797ec02ff0209a
2017-10-17 20:30:18 +00:00
Tom Cherry
3b01d0a09a Merge "Frameworks: Remove warning for SystemProperties.get" am: c589496ce9 am: b72c0626f5
am: 16e676be4b

Change-Id: Ie43c9ec866feba876016c8ceb4c1e5d6222f0a18
2017-10-17 20:04:51 +00:00
Tom Cherry
16e676be4b Merge "Frameworks: Remove warning for SystemProperties.get" am: c589496ce9
am: b72c0626f5

Change-Id: Ib0561d4ce3e027b2021bc6105f0be03ba6fffa99
2017-10-17 19:47:57 +00:00
Tom Cherry
b72c0626f5 Merge "Frameworks: Remove warning for SystemProperties.get"
am: c589496ce9

Change-Id: Ibef1415adec0dac324b0531b7038640c3584fdf1
2017-10-17 19:37:45 +00:00
Tom Cherry
95dd3cef21 Frameworks: Remove warning for SystemProperties.get
We now disallow non-UTF8 property values directly in property_service,
so there is no need for this warning.

This partially reverts 33aea8d40e.

Bug: 63177684
Test: make
Change-Id: I61f49f635c6095013f55b906e00925a8cbd1ea8c
2017-10-17 09:27:23 -07:00
Patrik Torstensson
23a3f240c0 Merge "Incorporate slab reclaimable into meminfo" into oc-mr1-dev am: 20fb01eb23
am: 7528452f57

Change-Id: I46c0b4b07044578fe300aaf587973a650628388b
2017-10-15 02:09:14 +00:00
Pankaj Kanwar
0e0a22e169 Merge "Merge "Cleanup of Cellular/Wifi aggregate statistics" into oc-mr1-dev am: eb98edfb83" into oc-mr1-dev-plus-aosp
am: c623db3d98

Change-Id: I5512c904eb29e2819358299df36f7a1c2c261992
2017-10-15 02:02:47 +00:00
Patrik Torstensson
7528452f57 Merge "Incorporate slab reclaimable into meminfo" into oc-mr1-dev
am: 20fb01eb23

Change-Id: Ia6afee63376c98552c3a5a0ee249fa751c3d3603
2017-10-13 07:35:04 +00:00
Patrik Torstensson
20fb01eb23 Merge "Incorporate slab reclaimable into meminfo" into oc-mr1-dev 2017-10-13 01:30:40 +00:00
Robert Benea
5e099800f8 Incorporate slab reclaimable into meminfo
Instead of using the whole slab mem for kernel usage, split the
unreclaimable to kernel and reclaimable to cache (since is freed
under mem. pressure).

Test: tested on gobo
Bug:67753120
Change-Id: I0f5a310bb88603ad7bb28e5398ea57c249c04fc2
2017-10-13 00:41:47 +00:00
Pankaj Kanwar
975c272419 Merge "Cleanup of Cellular/Wifi aggregate statistics" into oc-mr1-dev
am: eb98edfb83

Change-Id: Id45e4e83eadebbe812aa44bdfa5592831813fec9
2017-10-13 00:34:57 +00:00
Pankaj Kanwar
eb98edfb83 Merge "Cleanup of Cellular/Wifi aggregate statistics" into oc-mr1-dev 2017-10-13 00:26:11 +00:00
Yi Jin
129fc6ce19 Implement Activity Manager Broadcasts dump protos
Bug: 66729158
Test: Manually build and flash the system.img and test "activity --proto
broadcasts"
Change-Id: I3cb7474c4a3ab092f38ed6a121b4d034cadfc402
2017-10-11 18:35:14 -07:00
Siddharth Ray
3c648c4673 Cleanup of Cellular/Wifi aggregate statistics
Cleanup of Cellular/Wifi aggregate statistics in Batterystats dumpsys

Cellular
- Modification of field names to improve clarity
- Removed count "x" values
- Added power values to Rx signal strength
- Added power values to Tx power
- Added "Cellular Sleep time"
- Removed erroneous battery field (This is being fixed in b/67213886,
b/67213967)
- Removed the following fields (Mobile radio active unknown time, Mobile
radio active adjusted time, Signal scanning time)

Wifi
- Modification of field names to improve clarity
- Removed count "x" values
- Added power values to Rx signal strength
- Removed the following field (Wifi on, Wifi running)

BUG:67322291
Change-Id: I9630f154a73c7e3cb4bae4779609302f3674602f
2017-10-11 16:29:53 -07:00
TreeHugger Robot
b34b70b067 Merge "incidentd: Dumping batterystats system data to proto." 2017-10-11 17:56:34 +00:00
David Chen
de70169109 UID mapping to provide app name and version.
The UID map is updated by StatsCompanionService, which listens to broadcast
updates indicating that an app was updated/installed or removed. Also,
the entire map is updated when statsd first connects to the companion
service. Also, there is a way for metrics producers to subscribe to
updates, so that they can know when an app was upgraded.

Test: Created new unit-test for mapping and manually tested for install
and remove. Did not manually test the app upgrade.

Change-Id: I6676ae5c93b75c72d9badabb36aa9c40006db07d
2017-10-10 14:33:23 -07:00
Charles He
af60534c97 Merge "Add user restriction to suppress error dialogs." 2017-10-10 19:45:12 +00:00
Andreas Gampe
e2ce9017cd Merge "Parcel: Avoid NPE in finalization" am: b085deece9 am: cb34bdf55c am: 7934a7f828
am: 77de886b55

Change-Id: If5a797b8780765be8cc658d1e09bf4dea69dd923
2017-10-10 18:18:17 +00:00
Andreas Gampe
77de886b55 Merge "Parcel: Avoid NPE in finalization" am: b085deece9 am: cb34bdf55c
am: 7934a7f828

Change-Id: I5c2819892170855c4d009261785f9e8d26f9ad5e
2017-10-10 18:01:22 +00:00
Andreas Gampe
7934a7f828 Merge "Parcel: Avoid NPE in finalization" am: b085deece9
am: cb34bdf55c

Change-Id: Idd444cd9dfe78d4200f67a4fe6b3c4fb13767f29
2017-10-10 17:52:50 +00:00