Commit graph

37166 commits

Author SHA1 Message Date
Jin Qian
65dea71248 storaged: clean up disk stats code
Merged disk_stats_publisher into disk_stats_monitor class.

Moved proc file check to disk_stats class instead of doing so in
storaged, same for uid_io.

Added is_zero function to check zero disk_stats.

Added operators to compute disk_stats.

Change-Id: I277ae51f6fe18464f92e45c03471343784e67093
2017-10-02 15:45:14 -07:00
TreeHugger Robot
8832077aa4 Merge "storaged: fix task io stats parsing" 2017-09-28 21:18:25 +00:00
Jin Qian
0e02687d3f storaged: fix task io stats parsing
comm field in task io stats string can have comma since this field
includes task arguments. As a result, splitting the string by comma
doesn't always give 13 fields. Parse the string in following way to
fix that.

last 11 fields -> pid and io stats
Second field to 12th from last -> comm

Bug: 63739275
Change-Id: I6a2418260444c71d6492fc6cbd639d3cc54ceaed
2017-09-28 11:29:51 -07:00
Josh Gao
de54531d85 Merge changes I12d46493,I0ed00441,I55e5dc5a,If61296ff into oc-mr1-dev am: c03127ef5c
am: be399346db

Change-Id: I6aac2c5e196fcb3df3c6490a0e12f11ebc886dc2
2017-09-28 18:02:30 +00:00
Josh Gao
be399346db Merge changes I12d46493,I0ed00441,I55e5dc5a,If61296ff into oc-mr1-dev
am: c03127ef5c

Change-Id: I513e8af7c137166a7cd2094f464605bba2618dba
2017-09-28 18:00:39 +00:00
Josh Gao
c03127ef5c Merge changes I12d46493,I0ed00441,I55e5dc5a,If61296ff into oc-mr1-dev
* changes:
  adb: add lock to remove_socket.
  Revert "adb: fix deadlock between transport_unref and usb_close."
  adb: allow selection of a specific transport.
  adb: fix deadlock in kick_all_transports.
2017-09-28 17:51:44 +00:00
Caroline Tice
55f52c0348 Merge "Eliminate false positive static analyzer warnings." 2017-09-28 16:10:42 +00:00
Josh Gao
2b933918fc adb: add lock to remove_socket.
The comment that was previously here says that local_socket_list_lock
must be taken, but this function is exposed to external callers that
can't possibly take the lock.

Bug: http://b/65419665
Bug: 64709603 (presubmit balking at the line above)
Test: python test_device.py
Change-Id: I12d464933936b2a210a827ccf19ea201020d8d78
(cherry picked from commit 62c92f0c05)
2017-09-27 14:36:12 -07:00
Josh Gao
c78ecca70b Revert "adb: fix deadlock between transport_unref and usb_close."
This reverts commit 7e197ef833.

The mutex lock in transport_unref hides a race that seems otherwise
hard to fix. Specifically, there's no synchronization between acquiring
a transport and attaching it to an asocket*, leading to badness if the
transport is closed in between the two operations.

Fix the original problem the reverted patch addressed by manually
unlocking before calling unregister_usb_transport.

Bug: http://b/65419665
Bug: 64709603 (presubmit balking at the line above)
Test: python test_device.py
Change-Id: I0ed0044129b1671b2c5dd1b9fa2e70a9b4475dc5
(cherry picked from commit e48ecce671)
2017-09-27 14:36:08 -07:00
Josh Gao
1bd8498fc8 adb: allow selection of a specific transport.
Extend device selection to allow selecting a specific transport via
monotonically increasing identifier (visible in devices -l).

This is useful when using multiple devices (like hikey960...) that
have identical bogus serial numbers like 0123456789ABCDEF.

Bug: http://b/37043226
Bug: 65419665
Test: adb -t {1, 2, 9999999} {get-serialno, shell, features}
Change-Id: I55e5dc5a406a4eeee0012e39b52e8cd232e608a6
(cherry picked from commit b122b17555)
2017-09-27 14:36:02 -07:00
Josh Gao
39103b95c8 adb: fix deadlock in kick_all_transports.
Previously, kick_all_transports would deadlock if there were any
inaccessible transports, because the transport kick function would call
unregister_usb_transport, which attempts to take the already-held
transport lock.

Fix this by switching the transport lock over to a recursive mutex.

Bug: 65419665
Test: manual
Change-Id: If61296ff4745e1699f3e216811c1383582627604
(cherry picked from commit 1db71afe97)
2017-09-27 14:35:52 -07:00
Tom Cherry
e9a1339f8b Merge "init: remove non-protobuf single persistent property file" am: 61578ab50b am: aceda86059 am: 27c56990ce
am: 73a01e2ea4

Change-Id: Ib81c83365caf98856f9f6349e6ca6efc5c2717a9
2017-09-27 20:51:51 +00:00
Tom Cherry
73a01e2ea4 Merge "init: remove non-protobuf single persistent property file" am: 61578ab50b am: aceda86059
am: 27c56990ce

Change-Id: I6284b97f0a23cd60d7d032e2285ad89c85de34cd
2017-09-27 20:44:29 +00:00
Tom Cherry
27c56990ce Merge "init: remove non-protobuf single persistent property file" am: 61578ab50b
am: aceda86059

Change-Id: Ie413aa25233db86ad236ece01f961103d133cb60
2017-09-27 20:41:13 +00:00
Tom Cherry
aceda86059 Merge "init: remove non-protobuf single persistent property file"
am: 61578ab50b

Change-Id: Id4b622ebde1db431d5dcb8cc3edccc6843d4c72b
2017-09-27 20:38:29 +00:00
Tom Cherry
61578ab50b Merge "init: remove non-protobuf single persistent property file" 2017-09-27 20:35:09 +00:00
Mark Salyzyn
9403905c44 Merge "init: report shutdown,container for sigterm of init" am: d2b5a2417f am: 387dbf9ab0 am: a81e227284
am: 25964c7fd8

Change-Id: I7be95a9e0dbe90a45c820d3fbce758b80c8da193
2017-09-27 20:07:10 +00:00
Mark Salyzyn
25964c7fd8 Merge "init: report shutdown,container for sigterm of init" am: d2b5a2417f am: 387dbf9ab0
am: a81e227284

Change-Id: Ie1a696d1b747cf90cb7f300bb2af454c10659ba5
2017-09-27 19:48:05 +00:00
Mark Salyzyn
a81e227284 Merge "init: report shutdown,container for sigterm of init" am: d2b5a2417f
am: 387dbf9ab0

Change-Id: I3978179b92f096e3a951463dbe850a94a77ba27a
2017-09-27 19:45:01 +00:00
Mark Salyzyn
387dbf9ab0 Merge "init: report shutdown,container for sigterm of init"
am: d2b5a2417f

Change-Id: Ifb4ab5fa166ee055838c5ad52d69e0d0c07c7e59
2017-09-27 19:40:16 +00:00
Mark Salyzyn
d2b5a2417f Merge "init: report shutdown,container for sigterm of init" 2017-09-27 19:32:31 +00:00
Josh Gao
e1d702b5ee Merge "adb: partially revert b5e11415." am: ef9426d883 am: d3f7956f2f am: e8526de60b
am: 294a3e42f4

Change-Id: I41acf3640305f597dd7b54f2ed0900e57b5070da
2017-09-27 18:53:29 +00:00
Josh Gao
294a3e42f4 Merge "adb: partially revert b5e11415." am: ef9426d883 am: d3f7956f2f
am: e8526de60b

Change-Id: I079da0c338d18191182ad93d31c93d00ec11db64
2017-09-27 18:51:19 +00:00
Josh Gao
e8526de60b Merge "adb: partially revert b5e11415." am: ef9426d883
am: d3f7956f2f

Change-Id: I981f3acc2a2e27bbf34d838d60071bc8f66d4250
2017-09-27 18:49:26 +00:00
Josh Gao
d3f7956f2f Merge "adb: partially revert b5e11415."
am: ef9426d883

Change-Id: I3f7fa1577bc79b5bdcacbeacc7b5141cc9c73cb9
2017-09-27 18:45:18 +00:00
Treehugger Robot
ef9426d883 Merge "adb: partially revert b5e11415." 2017-09-27 18:38:28 +00:00
Tom Cherry
9614e4d4d9 init: remove non-protobuf single persistent property file
This has moved to being serialized with libprotobuf.

Test: persistent properties work on bullhead
Test: init unit tests
Change-Id: I26ebe135e37d352f9c53612301bde703144853e7
2017-09-27 18:22:35 +00:00
Tom Cherry
0f908b5a31 Merge "init: cleanup exit() uses" am: 9c568d0fc0 am: 531cd0f6d3 am: c0fcd21c05
am: 242a6654b4

Change-Id: Ibe3ee83b261d2e2b3ba104e347a1f83aee37b2bb
2017-09-27 17:22:23 +00:00
Tom Cherry
242a6654b4 Merge "init: cleanup exit() uses" am: 9c568d0fc0 am: 531cd0f6d3
am: c0fcd21c05

Change-Id: I6b40c532f2a0d2289f701abd4e4d46339a5ecbc1
2017-09-27 17:18:36 +00:00
Tom Cherry
c0fcd21c05 Merge "init: cleanup exit() uses" am: 9c568d0fc0
am: 531cd0f6d3

Change-Id: Idf2f49362e0e969e5e31f698ad963bf7be7a8d8d
2017-09-27 17:16:39 +00:00
Tom Cherry
531cd0f6d3 Merge "init: cleanup exit() uses"
am: 9c568d0fc0

Change-Id: I52ee55a8717f60bbf47b0cbb2a3115c63a824f84
2017-09-27 17:14:17 +00:00
Tom Cherry
9c568d0fc0 Merge "init: cleanup exit() uses" 2017-09-27 17:10:31 +00:00
Mark Salyzyn
161b8626bd init: report shutdown,container for sigterm of init
Change HandleSigtermSignal() handler to report shutdown,container. Add
the new reason to bootstat.  Remove log stutter as
HandlPowerctlMessage will also do a LOG(INFO) reporting
shutdown,container as reason.

Sending SIGTERM to init is to allow a host OS to ask an Android
Container instance to shutdown.  The temptation is to report
shutdown,sigterm but that does not accurately describe the usage
scenario.

Test: compile
Bug: 63736262
Change-Id: I3c5798921bdbef5d2689ad22a2e8103741b570b4
2017-09-27 09:10:00 -07:00
Mark Salyzyn
a8f2c29296 Merge changes I6620c996,I094c2cb0 into oc-mr1-dev am: 27e56723de -s ours
am: 7b034eb0a1

Change-Id: I14fa6165aae4be0e61b3ad3240c0f741412ebefa
2017-09-27 15:10:50 +00:00
Mark Salyzyn
7b034eb0a1 Merge changes I6620c996,I094c2cb0 into oc-mr1-dev
am: 27e56723de  -s ours

Change-Id: I9f18136d725664b8b732e0f4eb5d83822fda350c
2017-09-27 15:08:50 +00:00
Mark Salyzyn
47b7473cb8 Merge "init: shutdown,thermal shut off display immediately" am: 82ee4060ed am: a27a48590a am: 9c76b46e4e
am: 7b736efe13

Change-Id: I0b0e1845d4e6e38a28a20bfb8c7aada7fd03df81
2017-09-27 15:06:53 +00:00
Mark Salyzyn
7b736efe13 Merge "init: shutdown,thermal shut off display immediately" am: 82ee4060ed am: a27a48590a
am: 9c76b46e4e

Change-Id: I22c838b5183dae77f143cc45df52452c5f05915b
2017-09-27 15:04:23 +00:00
Mark Salyzyn
9c76b46e4e Merge "init: shutdown,thermal shut off display immediately" am: 82ee4060ed
am: a27a48590a

Change-Id: I419ffe6fab44d138d84c92c811a0b03ace796c1a
2017-09-27 15:02:40 +00:00
Mark Salyzyn
a27a48590a Merge "init: shutdown,thermal shut off display immediately"
am: 82ee4060ed

Change-Id: I7c81548a3bbfefa8fadbe27d168708b2cb1d125a
2017-09-27 15:00:00 +00:00
Mark Salyzyn
82ee4060ed Merge "init: shutdown,thermal shut off display immediately" 2017-09-27 14:54:38 +00:00
Mark Salyzyn
27e56723de Merge changes I6620c996,I094c2cb0 into oc-mr1-dev
* changes:
  bootstat: bootloader stat files misspelled
  bootstat: switch from root.root to system.log
2017-09-27 14:53:53 +00:00
Elliott Hughes
a4a51c41c6 Show the number of VMAs in the tombstone. am: bab3354ede
am: c450b2f668

Change-Id: I2749fdf9188071ed47fa2477f8ed26d251dd46b9
2017-09-27 02:55:01 +00:00
Elliott Hughes
c450b2f668 Show the number of VMAs in the tombstone.
am: bab3354ede

Change-Id: I34faa36d3461a762ec559c58219aa03655dcee6e
2017-09-27 02:53:01 +00:00
Elliott Hughes
bab3354ede Show the number of VMAs in the tombstone.
Tombstones (especially ones with lots of VMAs) are regularly truncated.
We can at least show the number of VMAs, though, for anyone interested
in knowing whether they got close to the default 64Ki limit.

Bug: http://b/66911122
Bug: 64709603 (presubmit balking at the line above)
Test: ran crasher, examined tombstone

(cherry picked from commit 868d39a82f)

Change-Id: I286db66f28f132307d573dbe5164efc969dc6ddc
2017-09-26 17:24:39 -07:00
Alexandros Frantzis
aaea3f3db2 Merge "libsync: Add fence info tests" am: 6832535cd5 am: b5876fe3ed am: 8d19f45fe3
am: 6ed0bd7991

Change-Id: I0b0113ae40b205c9bef998cb32676b7b9f91b142
2017-09-27 00:10:42 +00:00
Alexandros Frantzis
6ed0bd7991 Merge "libsync: Add fence info tests" am: 6832535cd5 am: b5876fe3ed
am: 8d19f45fe3

Change-Id: I0bf4f3ceebd3c5506c624b84a89766a7eec52981
2017-09-27 00:06:42 +00:00
Alexandros Frantzis
8d19f45fe3 Merge "libsync: Add fence info tests" am: 6832535cd5
am: b5876fe3ed

Change-Id: I39e75e653e645cc18b4fa43410f9d9b2a14adc3b
2017-09-27 00:02:37 +00:00
Alexandros Frantzis
b5876fe3ed Merge "libsync: Add fence info tests"
am: 6832535cd5

Change-Id: I434ca616c410cf4898b8428d2035fc17220e618d
2017-09-26 23:58:18 +00:00
Treehugger Robot
6832535cd5 Merge "libsync: Add fence info tests" 2017-09-26 23:46:32 +00:00
Bowgo Tsai
39aaeb0cc5 Merge "fs_mgr_fstab: do an exact match when searching a mount point" am: a0dd1adab0 am: dff1e3418e am: d4ce377d8c
am: c4decb0f7e

Change-Id: Ie89ebdaf871367e20cebdb39ad5369f4a7a9159d
2017-09-26 23:39:42 +00:00