Commit Graph

55429 Commits

Author SHA1 Message Date
Treehugger Robot e8537ccfa2 Merge "TEST_MAPPING: add libmodprobe_tests to presubmit" 2019-12-20 00:38:44 +00:00
Treehugger Robot e2e2b2d3d3 Merge "Fix error checking in append_string" 2019-12-20 00:38:25 +00:00
Nikita Ioffe 36f1dfa144 Merge "Now for real unmount bind-mounts on top of /data"
am: ee08c978d2

Change-Id: Ib5a3d90e8d4e58f6812e9481577e11e6e9aa1ccc
2019-12-19 16:31:51 -08:00
Steven Moreland 243f57bb82 libutils: sp/wp: undef #defines
Seems these undefs are slightly out of sync/out of date.

Bug: N/A
Test: libutils_test
Change-Id: I884ae1ca97754a6459a2c7844264f513eecddaba
2019-12-19 16:17:33 -08:00
Nikita Ioffe 8dbc97f257 Merge "Don't proceed with userspace reboot if device doesn't support it"
am: c9d8d2b7aa

Change-Id: I4cc84170808dc0061016ee405178975f5f075d84
2019-12-19 16:12:07 -08:00
Ruchir Rastogi 3ef6f2e806 Merge "Merge libstatspush_compat and libstatssocket_q"
am: a275bc4b6a

Change-Id: I40fa4a751b11849696729f84f0e510c0bdeb6006
2019-12-19 16:11:43 -08:00
Ruchir Rastogi 1b7d460990 Merge changes from topic "StatsEvent JNI"
am: 0a31673879

Change-Id: I0525a19b92ab2e7d6900d9e8a07f1f02b28c6336
2019-12-19 16:07:17 -08:00
Ruchir Rastogi 5ad4ecbc17 StatsEventCompat
am: 926fa88c35

Change-Id: I12dd19476925ff0dbf91078fa493e29351fd3939
2019-12-19 16:06:48 -08:00
Muhammad Qureshi ba8835c858 Remove libstats/Android.bp
am: a33f81bff5

Change-Id: I4b0886f59dfe6c773662c1dafe4190a8785e21a7
2019-12-19 16:06:13 -08:00
Muhammad Qureshi bf9e1fcf1d Make stats_event write function parameters const
am: 6d5a2fc44d

Change-Id: I05f926f13476b8c87a46f945d3d2d7e7e9dc7aef
2019-12-19 16:05:38 -08:00
Muhammad Qureshi bd0c0b9d63 Create stats_buffer_writer
am: 962cc23b9f

Change-Id: Ie46fc58097da952e0e26bb27f13880c3498b5411
2019-12-19 16:05:11 -08:00
Nikita Ioffe ee08c978d2 Merge "Now for real unmount bind-mounts on top of /data" 2019-12-20 00:01:28 +00:00
Nikita Ioffe c9d8d2b7aa Merge "Don't proceed with userspace reboot if device doesn't support it" 2019-12-19 23:44:06 +00:00
Treehugger Robot a275bc4b6a Merge "Merge libstatspush_compat and libstatssocket_q" 2019-12-19 23:31:55 +00:00
Treehugger Robot 0a31673879 Merge changes from topic "StatsEvent JNI"
* changes:
  Improve stats_event memory usage
  StatsEventCompat
  Remove libstats/Android.bp
  Make stats_event write function parameters const
  Create stats_buffer_writer
2019-12-19 23:31:48 +00:00
Ruchir Rastogi 3bbc240263 Fix error checking in append_string
Test: m -j
Change-Id: Ifa806d5037acb17f83cbf45712e9795d6f56152f
2019-12-19 14:57:10 -08:00
Nikita Ioffe 3d6a5fcb87 Now for real unmount bind-mounts on top of /data
Approach in
https://android-review.googlesource.com/c/platform/system/core/+/1191457
depended on ordering of entries. Instead fs_mgr now tries to unmount
everything with the same block device as /data until timeout is reached.
This is very similar to what is done in UmountPartitions in reboot.cpp,
but I'm a little bit reluctant to merge them together, since the later
unmount all read-write partitions, while here we are only interested in
/data.

Test: on both coral and blueline:
Test: adb shell /system/bin/vdc checkpoint startCheckpoint 1
Test: adb shell setprop sys.init.userdata_remount.force_umount_f2fs 1
Test: adb reboot userspace
Test: verified that userdata was remounted
Bug: 135984674
Change-Id: I929a058fa2f9639f0a2b73e9ea269cf1e07db889
2019-12-19 21:18:42 +00:00
Josh Gao d0cc7eb1ad Merge "adb: use poll instead of select in shell_service."
am: 27fa358d41

Change-Id: Icba2b4ca0304e6808fd9c54215cb816e1ef51d58
2019-12-19 12:26:46 -08:00
Josh Gao 27fa358d41 Merge "adb: use poll instead of select in shell_service." 2019-12-19 20:22:13 +00:00
Steve Muckle e5b327385e TEST_MAPPING: add libmodprobe_tests to presubmit
Bug: 143884053
Test: atest libmodprobe_tests
Change-Id: I0050ebab3ff7c994bd7a67229db9b0a2c8ed8e09
2019-12-19 19:17:08 +00:00
Jooyung Han 08792eb5de Add system_ext/apex/*/bin to fs_config
Flattened APEXes can be installed in /system_ext.
Especially, GSI have both flattened/unflattened apexes so that it can
run with updatable devices and non-updatable devices as well.

Bug: 145963716
Test: flash GSI on P device and boot
Change-Id: I3a941672446a5353517243a851739a66f4252617
2019-12-20 03:54:57 +09:00
Yifan Hong be230af10b libsnapshot: no underscores in test names
This is required for gtest.
Test: run it

Change-Id: I9b0d7ee651c283c00035104d4257d8e8addf4db0
2019-12-19 10:45:54 -08:00
Songchun Fan 2d873010cf Merge "[incremental] create /data/incremental in init.rc"
am: a1344fa6d7

Change-Id: I785b99ca12cd04ef6220013596fed1273df8b86f
2019-12-19 10:18:59 -08:00
Songchun Fan a1344fa6d7 Merge "[incremental] create /data/incremental in init.rc" 2019-12-19 18:14:06 +00:00
Muhammad Qureshi 7da018252b Merge "Create libstatssocket_q"
am: 0ba7842577

Change-Id: Ibb745108290c67e97c2e766d7534bcc4de28c49d
2019-12-19 10:11:09 -08:00
Peter Collingbourne fac30bf6bf Merge "Stop using weak symbols in libvndksupport."
am: 1d789eb210

Change-Id: I774fed449cd64177fd8878b8d719733449e4e93d
2019-12-19 10:03:13 -08:00
Treehugger Robot 0ba7842577 Merge "Create libstatssocket_q" 2019-12-19 17:36:08 +00:00
Peter Collingbourne 1d789eb210 Merge "Stop using weak symbols in libvndksupport." 2019-12-19 17:27:37 +00:00
Kiyoung Kim 986e453d9c Remove ld.config.recovery.txt build
Remove ld.config.recovery.txt build as this will be replaced to be
generated from linkerconfig during build time.

Bug: 146414198
Test: m -j passed
Test: Checked linker config generated under recovery's system/etc
Change-Id: I0d2aa121973c4c99e68f44f4e76e4eab74dc2f95
2019-12-19 16:37:43 +09:00
Ruchir Rastogi 20516da9bc Merge libstatspush_compat and libstatssocket_q
This cleanup makes it clear that there are only two acceptable ways of
logging to the socket: either through libstatspush_compat or
libstatssocket (which will soon be renamed to libstatspush).

Test: m -j
Change-Id: I467b08bc300c2ef394b22422c6acf55a978a380a
Merged-In: I6a49b4995b56df462e1be901ea5e54acfe2e8bac
2019-12-18 17:48:28 -08:00
Ruchir Rastogi 79dd3eaa87 Improve stats_event memory usage
We now truncate the buffer to the appropriate length when clients call
stats_event_build().

Benchmarking tests indicate that truncating the buffer to the
appropriate length increases the cost clients pay to write to the socket
by 2%. This is negligible enough that I decided to truncate the buffer
for both pushed and pulled atoms in order to simplify the API.

Test: m libstatssocket
Test: bit libstatssocket_benchmark:*
Bug: 144126231
Change-Id: I35dec748ff87c0821d0d06779a406997e6e64966
Merged-In: Ife976bb383ecff8de5064730692a95e2a3a82c9d
2019-12-18 17:44:26 -08:00
Ruchir Rastogi 926fa88c35 StatsEventCompat
StatsEventCompat is a wrapper library that toggles between the old
logging scheme and the new logging scheme. It was designed particularly
for the DNS Resolver module and should not be used by others.

We will merge libstatspush_compat and libstatssocket_q in a future CL.

Test: m libstatspush_compat
Test: bit libstatspush_compat_test:* (passes on Q and R)
Bug: 145534143

Change-Id: Ib355031f3573101ea90bd8694861fbfc33b0c788
Merged-In: Idf35ccb6669798166475f08b2fbab40534b5db19
2019-12-18 17:21:27 -08:00
Muhammad Qureshi a33f81bff5 Remove libstats/Android.bp
subdirs is not needed

Test: m -j
Change-Id: Idc034571eadae9c3135324af45fb4cd404ba8dd2
Merged-In: Ia7675fdf2e9a3a19bc52396ccbcc551556958803
2019-12-18 15:26:02 -08:00
Muhammad Qureshi 6d5a2fc44d Make stats_event write function parameters const
Bug: 143968790
Test: bit statsd_test:*
Change-Id: I413accb10cf3de4c5c49eb06a472168b1171039b
Merged-In: I2660cad5400a0e819c60b9caa706bb66ca2eef4f
2019-12-18 15:20:59 -08:00
Muhammad Qureshi 962cc23b9f Create stats_buffer_writer
Move iovec* construction and noteLogLoss from stats_event_list to
stats_buffer_writer.h.
Expose write_buffer_to_statsd that takes in a byte array and writes
it to the statsd socket. Currently exposed for StatsLog.write JNI call.

This change also allows getting rid of stats_event_list once all clients
have migrated to stats_event

Bug: 145619049
Test: m -j libstatssocket
Change-Id: I73f914985421fc1a4f094982c826bf364604b788
Merged-In: I0048e392c2f5039eb70dacf4e91a43d3f32e8749
2019-12-18 15:15:43 -08:00
Muhammad Qureshi a3dcefc079 Create libstatssocket_q
Break up libstatssocket into libstatssocket_q and libstatssocket.
libstatssocket_q is for Q Mainline modules.

Bug: 145569088
Test: m -j
Test: bit statsd_test:*
Test: adb shell cmd stats print-logs && adb logcat "*:S statsd:*"
Change-Id: I2978dd544f4cb17714f3d14d5977cf6b46277ef9
Merged-In: I9d113b37640345ebad6aa269ab710db0d2179671
2019-12-18 15:11:53 -08:00
Josh Gao 15f0402787 Merge "adb: fix use after free of atransport."
am: 1cdcc5f7e8

Change-Id: I07a1214ef5278b96adc0111fc2ae4c247fdc9015
2019-12-18 14:42:21 -08:00
Treehugger Robot 1cdcc5f7e8 Merge "adb: fix use after free of atransport." 2019-12-18 22:39:48 +00:00
Ruchir Rastogi b2aacf613e Merge "Simplified stats_event.c; exposed getter methods"
am: d054eb7310

Change-Id: Ifc4b4f28cdeb0b9d6f4d9caf8bce03515a932417
2019-12-18 14:29:38 -08:00
Treehugger Robot d054eb7310 Merge "Simplified stats_event.c; exposed getter methods" 2019-12-18 22:27:27 +00:00
Ruchir Rastogi fc9a804cab Merge changes I15abdf13,I70304168,I52b0cb8e
am: a23ce83a3b

Change-Id: I706cd1c1c940b9a3b2bd27db0181fe47eb565e08
2019-12-18 14:26:35 -08:00
Ruchir Rastogi 3ccb84e989 Merge "First draft of native StatsEvent API"
am: 5158ab9ff2

Change-Id: I6ea9f02d399d7f355dc68b16af8b5095787f4137
2019-12-18 14:25:56 -08:00
Treehugger Robot a23ce83a3b Merge changes I15abdf13,I70304168,I52b0cb8e
* changes:
  General cleanup; add support for key-value pairs
  Move type ids to stats_event.h
  Set default timestamp to elapsedRealtimeNanos
2019-12-18 22:17:30 +00:00
Treehugger Robot 5158ab9ff2 Merge "First draft of native StatsEvent API" 2019-12-18 22:17:23 +00:00
David Anderson 661ad4e54f init: Use ImageManager for DSUs.
The first_stage_mount code for DSUs predates both the DSU name and the
ImageManager abstraction. Move this code to ImageManager, so it can be
shared with overlayfs/scratch handling. And while we're here, rename GSI
to DSU for clarity.

Bug: 134949511
Test: dsu works
Change-Id: I9ef374bccc6cdbe2ada88baef4e7c0bc81b1e85e
2019-12-18 22:03:31 +00:00
Josh Gao 63da8e6272 adb: use poll instead of select in shell_service.
Bug: http://b/141955761
Test: test_device.py
Test: adbd_test
Change-Id: I8976304a1011e81e85f8d90d95d36ecd82834f5f
2019-12-18 14:02:57 -08:00
Ruchir Rastogi a38d5a6fd6 Simplified stats_event.c; exposed getter methods
Simplifications/changes:
(1) We remove the bufPos field and track the end of the buffer using
    only the size field.
(2) We rename put_<type>() functions to append_<type>() to signify that the
    value will be placed at the end of the buffer. We also move the
    increment of event->size to within the append_<type>() functions;
    this improves readability of the write_<type>() functions.
(3) We immediately write the timestamp and atom id to the buffer in
    order to simplify stats_event_build().
(4) We never check for null pointers; checking for null pointers
    delays errors and obfuscates the root problem.
(5) We change the the annotationId and numPairs parameters to be
    uint8_t's. This helps signify to clients that these values must fit
    in 1 byte.
(6) Clients no longer have to pass in the length of strings. Instead, we
    expect them to pass in null-terminated strings, and we will
    calculate the length outselves using strnlen.

Test: m -j libstatssocket
Change-Id: I6d192768876a23d7016173bcdaf59f8b7e92b182
Merged-In: I0173f8bc76ef25118379dce5d2481f5f7a9b7519
2019-12-18 13:17:36 -08:00
Ruchir Rastogi 3822e61d7b General cleanup; add support for key-value pairs
Encoding of key-value pairs follows strategy described in
go/statsd-socket-doc.

Fixed bug where timestamp and atom id were not contributing to the
number of fields in the buffer.

Note: Similar to ag/9603344, which was abandoned because of git rebasing
issues.

Test: m -j libstatssocket compiles
Bug: 143079361
Change-Id: I15abdf13ad8debf83ae1f6c372676db4fe390289
Merged-In: I8d23ddf2dbfee518ad970894ac09ba3ad5b5b4ad
2019-12-18 13:11:28 -08:00
Ruchir Rastogi a3bc1af1b8 Move type ids to stats_event.h
This allows the parsing code within statsd to access the type ids.
Also, we move stats_event.h to the include directory for consistency.

Test: m -j libstatssocket
Change-Id: I7030416872677f3a523c2baf7bf6bcb4ca0ae6a4
Merged-In: I1db7fc9e9d0efd2225612353a8fc49bb13220ff0
2019-12-18 11:58:42 -08:00
Ruchir Rastogi f4d23fc353 Set default timestamp to elapsedRealtimeNanos
Test: m -j libstatssocket compiles
Change-Id: I52b0cb8e1e916413db3dc0fe1b9a7e922833bdf7
Merged-In: I62f4c6bb14c3914124a6af25ff46fb0a980204e7
2019-12-18 11:53:38 -08:00