Commit graph

58223 commits

Author SHA1 Message Date
Tom Cherry
e288260524 Merge changes Ia7953e3c,Id1f29f4d,I38623130 am: f29cd20df5
Change-Id: Ide7fdcfd5b6060aec893991ed68a3ce95b75cf17
2020-05-21 21:03:47 +00:00
Tom Cherry
f29cd20df5 Merge changes Ia7953e3c,Id1f29f4d,I38623130
* changes:
  logd: use a std::list<> of values not pointers
  logd: refactor chatty deduplication logging
  logd: use RAII locks and thread annotations
2020-05-21 20:35:41 +00:00
Treehugger Robot
04c09d39cf Merge "emmc_optimized means stable_inodes" am: eb3be2e28f
Change-Id: Ie8f78b314d14f814df5f200a22ecb941bcefd16e
2020-05-21 20:05:15 +00:00
Treehugger Robot
4c199f5a28 Merge "libsnapshot: delete unused todo" am: 39fe8215e5
Change-Id: Idf419b8be3a8b1db6c33330b1f1ff83886dcb434
2020-05-21 20:05:04 +00:00
Treehugger Robot
eb3be2e28f Merge "emmc_optimized means stable_inodes" 2020-05-21 19:54:37 +00:00
Treehugger Robot
39fe8215e5 Merge "libsnapshot: delete unused todo" 2020-05-21 19:38:48 +00:00
Tom Cherry
1322472ad0 logd: use a std::list<> of values not pointers
This saves 4 or 8 bytes off of each log message for 32 bit or 64 bit
devices respectively.  In practice, this actually saves more, due to
avoiding heap fragmentation.

Averaging over 5 runs of the LogBufferTest.random_messages unit test
(32 bit), this change results in 8k less memory used when 1000 logs
are logged and results in 260k less memory used when 10000 logs are
logged.

Test: check memory usage during LogBufferTest.random_messages
Test: logging unit tests
Change-Id: Ia7953e3c4cb19631ef43bab1deb91bb336bc2520
2020-05-21 11:16:36 -07:00
Tom Cherry
a26f7dffe5 logd: refactor chatty deduplication logging
This code and comment is hard to follow, despite the operation being
simple, so refactor the code to be easier to follow.

Also, use std::unique_ptr instead of raw pointers as appropriate.

Test: logging unit tests
Change-Id: Id1f29f4deeca730d1e3b6856e1581d0b840f883e
2020-05-21 11:14:18 -07:00
Paul Crowley
c2f37683bc emmc_optimized means stable_inodes
If the emmc_optimized filesystem flag is set, then like
inlinecrypt_optimized, we have to ensure that stable_inodes is set
on the filesystem.

Bug: 144046242
Test: Cuttlefish, ext4: set the flag in fstab, check for the
    stable_inodes flag using tunefs -l
Change-Id: Id7f906564457c240ddf6677dd536698881385385
2020-05-21 11:14:05 -07:00
Tom Cherry
0b01ff0f39 logd: use RAII locks and thread annotations
Test: unit tests
Change-Id: I38623130a96f17a47ed79753e24b25efa9e38279
2020-05-21 11:07:04 -07:00
Yifan Hong
3f36212139 libsnapshot: delete unused todo
Too hard to make libsnapshot_fuzzer host supported.
Test: none

Change-Id: I974cea8f836b447e1fa6b676a1d95ebaf491442e
2020-05-21 11:03:01 -07:00
Tom Cherry
a4f37b2e76 Merge "logd: add tests for log deduplication" am: 0a6c83e7d0
Change-Id: I08a38ba52f6cf287fcf8fcc8f47d628ae54cb28f
2020-05-21 16:26:52 +00:00
Tom Cherry
0a6c83e7d0 Merge "logd: add tests for log deduplication" 2020-05-21 16:06:30 +00:00
Treehugger Robot
9640c76e05 Merge "adb: only submit USB writes on the worker thread." am: 4ea509e25d
Change-Id: I63e7eef74c293a008e33c856732ca25bbc03bba1
2020-05-20 23:51:05 +00:00
Treehugger Robot
4ea509e25d Merge "adb: only submit USB writes on the worker thread." 2020-05-20 23:34:37 +00:00
Tom Cherry
b398a7c85e logd: add tests for log deduplication
Fix a subtle bug that liblog event messages have a payload of int32_t,
not uint32_t, so they should only be summed to int32_t max.

Make a bunch of test improvements as well to support these.

Test: these tests
Change-Id: I4069cc546240bfffec5b19f34ebec913799674e8
2020-05-20 14:39:26 -07:00
Josh Gao
9e3e8c40e2 Merge "adb: fix flakiness in PTY shell protocol." am: b27365510d
Change-Id: I41c65bed67ceb644cf9d115bbc70883e16933dd9
2020-05-20 21:25:27 +00:00
Josh Gao
962551000b adb: only submit USB writes on the worker thread.
After USB disconnection, io_submit will block until the endpoint comes
back up. We handle this in the worker thread by sending it a signal to
break it out of io_submit when we notice that USB has gone down, but
opportunistic writes from the main thread can get stuck in this scenario
as well. Submitting the writes only on the worker thread doesn't have a
measurable impact on performance, so avert this scenario by only
submitting writes from the worker thread.

Bug: http://b/157078255
Test: test_device.py
Change-Id: I1118f2e2a70d13f15592eb996e7084033ed5cb9d
2020-05-20 21:03:18 +00:00
Josh Gao
b27365510d Merge "adb: fix flakiness in PTY shell protocol." 2020-05-20 21:01:23 +00:00
Treehugger Robot
6016dd02a4 Merge "adb: fix abb test." am: fc4e54ecb0
Change-Id: Ie4ea4e49688a7d0c6d593e8bc3f1930d6a16e6b1
2020-05-20 16:39:13 +00:00
Treehugger Robot
fc4e54ecb0 Merge "adb: fix abb test." 2020-05-20 16:25:45 +00:00
Baligh Uddin
876e883e0e Merge "Migrate system/core/base to system/libbase." am: 3b55f75706
Change-Id: Ic719e0fe67964336ebd25d94f8bb4e0bc14fc751
2020-05-20 12:38:51 +00:00
Baligh Uddin
3b55f75706 Merge "Migrate system/core/base to system/libbase." 2020-05-20 12:22:54 +00:00
Josh Gao
be41ae5666 adb: fix flakiness in PTY shell protocol.
When a subprocess closes its PTY slave, the master fd will report
POLLHUP when polled. This leads to us prematurely tearing everything
down, without reading out output that's been written to the PTY.

Resolve this by waiting until the fd no longer reports POLLIN.

Bug: http://b/156551485
Bug: http://b/156552734
Test: `adb shell 'X=0; while /data/nativetest64/adbd_test/adbd_test --gtest_filter="ShellServiceTest.*Pty*" >/dev/null 2>&1; do X=$((X+1)); echo $X; done'` for 1000 iterations (failed within 20, previously)
Test: test_device.py
Change-Id: Ie591e0cafb532cd6cebdf6f356dc967565b5a2d9
2020-05-19 20:54:40 -07:00
Rick Yiu
0d69819bf2 Merge "Add choice for changing sched policy when setting thread priority" am: 9ada65c0c6
Change-Id: Icacda86d1ea49588a94609e2e5d534ff3c289889
2020-05-20 03:25:18 +00:00
Josh Gao
8f83498cbd adb: fix abb test.
Don't hardcode cmd's output.

Bug: http://b/157092201
Test: python3 -m unittest test_device.AbbTest
Change-Id: I7145e8d2a31b1c1b459c1e55af3670b95e653eee
2020-05-19 20:12:52 -07:00
Rick Yiu
9ada65c0c6 Merge "Add choice for changing sched policy when setting thread priority" 2020-05-20 03:03:18 +00:00
Christopher Ferris
00586bd861 Merge "Add new reparse benchmarks." am: 1fbb1b8718
Change-Id: Ic38f5d173d5be0de2eff2a22728767beb2872a6f
2020-05-19 23:33:09 +00:00
Christopher Ferris
1fbb1b8718 Merge "Add new reparse benchmarks." 2020-05-19 23:12:27 +00:00
Baligh Uddin
28d0f1a3af Migrate system/core/base to system/libbase.
Add Symlink to ensure hardcoded references do not break build.
BUG: 148941208
test: TH

Change-Id: Ia2b69de1af6e07be2aab3ba4fe1493de80269c40
Merged-In: I1134f1e9e968b9273748e2483bea8d25e5c9e994
2020-05-19 21:32:42 +00:00
David Anderson
1edffcd3ac Merge "libsnapshot_test: Fix running on DSUs." am: 984aa655df
Change-Id: I5b8df0b32a0b247f163182b7cad34809bc6b0107
2020-05-19 19:10:40 +00:00
David Anderson
984aa655df Merge "libsnapshot_test: Fix running on DSUs." 2020-05-19 18:47:32 +00:00
Christopher Ferris
5990a9d442 Add new reparse benchmarks.
Test: Ran benchmarks on host and device.
Change-Id: I41b7d29bfa3468b9b9b8cbdfe94aca830d14f98e
2020-05-19 10:31:53 -07:00
Tom Cherry
427f320b56 Merge changes I85e6c989,Ie4ecc502,I1f8cfbb7 am: 0e95c2108f
Change-Id: I5d7e9296896bac44693833c1846be99d79d2935d
2020-05-19 14:53:48 +00:00
Tom Cherry
0e95c2108f Merge changes I85e6c989,Ie4ecc502,I1f8cfbb7
* changes:
  logd: build liblogd and its test on host
  logd: add LogBufferTest.cpp
  liblog: remove unused log_time functions, inline the others
2020-05-19 14:37:46 +00:00
Treehugger Robot
7fc15fcbf7 Merge "Migrate platform/system/core/libziparchive to p/system/libziparchive" am: 1b1ac36214
Change-Id: I40802838c248bc959cfc98d853966bc2ac5a3fea
2020-05-19 13:19:34 +00:00
Treehugger Robot
1b1ac36214 Merge "Migrate platform/system/core/libziparchive to p/system/libziparchive" 2020-05-19 12:45:51 +00:00
Baligh Uddin
db6e6038d0 Migrate platform/system/core/libziparchive to p/system/libziparchive
BUG: 149737100
Test: Forrest Run and TH
Change-Id: Id0872496eb9fcfb5075ddec22956a9a35d1514d4
Merged-In: I357a8c655855949bb0957675510bbaa26b47bc3c
2020-05-19 11:55:59 +00:00
Treehugger Robot
947a960f19 Merge "Optimizing install-multi-package to use ABB." am: bd05d33ce7
Change-Id: Id1ed403fdc083ff1a9073db6153fdc1ac22928c5
2020-05-19 06:56:04 +00:00
Treehugger Robot
bd05d33ce7 Merge "Optimizing install-multi-package to use ABB." 2020-05-19 06:27:46 +00:00
Treehugger Robot
22e35247eb Merge "Incremental install mode for install-multi." am: 3eb41352c5
Change-Id: Ib2666899505ed33bf2916611435311421d593139
2020-05-19 06:14:16 +00:00
David Anderson
0d2bcd4afe libsnapshot_test: Fix running on DSUs.
Because DSUs mount userdata via a fiemap, libfiemap has trouble creating
additional fiemaps on top of it. The complex stacking of dm-linear is
not supported. For other libfiemap tests we've hacked around this
limitation. If LpMetadata is in a folder named "test", we allow the
backing device search to stop at a dm node, whereas otherwise it would
need to stop at a physical device.

However this was not quite enough for vts_libsnapshot_test, because (1)
the test folder was not included in the pattern match, and (2)
CreateLogicalPartition() could not handle device-mapper names, as it
expects a named physical partition. Addressing both of these allows the
tests to pass on DSUs.

Bug: 156713441
Test: vts_libsnapshot_test on DSU
Change-Id: Ie7ee70e31dff0809a5f0c402ed132d80dd03d9b1
2020-05-19 06:02:37 +00:00
Treehugger Robot
3eb41352c5 Merge "Incremental install mode for install-multi." 2020-05-19 06:00:40 +00:00
Alex Buynytskyy
a64d4f81a4 Optimizing install-multi-package to use ABB.
Bug: 150803885
Test: atest adb_test adbd_test
Test: adb install-multi-package Picsart_9.30.5.apk Pinterest_6.54.0.apk
Change-Id: I2fcd093e61afdd16d481194e1d5f8f66acf6a66c
2020-05-19 04:29:34 +00:00
Alex Buynytskyy
c06d01e2d9 Incremental install mode for install-multi.
Bug: 150803885
Test: atest adb_test adbd_test fastdeploy_test
Change-Id: I242104267273bac21ab41390d3e77a434ffa565d
2020-05-19 04:29:27 +00:00
Joshua Duong
1b0de1b97d Merge changes from topic "adb-mdns" am: 7ce4a267f5
Change-Id: Ic6f82f881955e933a57fb3663a085f254c83fa26
2020-05-19 00:49:08 +00:00
Joshua Duong
7ce4a267f5 Merge changes from topic "adb-mdns"
* changes:
  adb pair: allow passing password as command-line argument.
  Change adb auto-connect to use mdns instance name.
  'adb pair' by mdns instance name.
  'adb connect' by mDNS service name.
  Add mDNS service instance name parser.
2020-05-19 00:30:06 +00:00
Treehugger Robot
21d4718069 Merge "base: delete abi compatibility shims." am: 64979d3726
Change-Id: I39dbc644e5039949a0f22bcd8a9179f541d45ed4
2020-05-18 23:15:45 +00:00
Treehugger Robot
64979d3726 Merge "base: delete abi compatibility shims." 2020-05-18 22:59:39 +00:00
Tom Cherry
a515197266 logd: build liblogd and its test on host
Plus the various fixups needed for building on host.

Test: run these tests on host
Change-Id: I85e6c989068f80c5a80eaf5ad149fdad0a045c08
2020-05-18 15:54:06 -07:00