Bug: 153540919
Test: Able to boot without errors
Change-Id: If206e5e3d76a7919b7468bc2d9666b3aff296b3b
Merged-In: If206e5e3d76a7919b7468bc2d9666b3aff296b3b
Make it easier to identify adbd's PIDs for coverage purposes by adding
an explicit log message to grep for.
Test: manual
Change-Id: I47e13417c0d9adb7d427414fd70c218f988909f5
loop_control.h already provides loop device management APIs that we need
here. In addition, this change fixes a subtle race condition between
uevented creating a loop device node in userspace and
PrepareZramBackingDevice accessing it without waiting for it to be
created.
Test: device boots
Test: adb reboot userspace
Bug: 154500256
Change-Id: If80f18c8c337210030a6caf2aec6f7a47472b6fb
Merged-In: If80f18c8c337210030a6caf2aec6f7a47472b6fb
(cherry picked from commit c8313adf88)
servingComplete_ was left uninitialized and only set to 'true'
in the code. We initialize it to the 'false' state to avoid
uninitialized references in SkipToRequest().
Bug: 150865433
Test: TreeHugger
Change-Id: Ia8a4d7135c432eb657543c5498fc9dbe8f4718b6
Merged-In: Ia8a4d7135c432eb657543c5498fc9dbe8f4718b6
In vts_libsnapshot_test, liblp was explicitly imported as static
library, but due to the importing of libsnapshot_defaults, it also
inherited the shared importing.
The import in libsnapshot_default, is not required, drop it.
Test: manual inspection with ldd
Bug: 148889015
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I12ba0516a482dc917848b5f34cccc659a60a4803
Switch the __x86.get_pc_thunk.bx functions from .gnu.linkonce to comdat
section groups. lld doesn't implement .gnu.linkonce and will instead
discard the input sections. It might produce a faulty binary that has
no get_pc_thunk function in it, which would crash.
Normally, these functions are generated by GCC and are present in many
object files compiled with PIC. Clang doesn't use them, and instead
initializes the PIC base register with a "call 1f; 1: pop %ebx" pair.
I also added cfi_startproc / cfi_endproc to be consistent with current
GCC output.
I marked this CL with do-not-merge because the code it touches has been
removed in the next release, so it won't merge. I reviewed the
automerger graph, and this do-not-merge CL:
- will be applied to qt-qpr1-dev-plus-aosp (which needs the CL)
- won't be applied to rvc-dev-plus-aosp (which doesn't need the CL)
https://android-build.googleplex.com/builds/automerger/graph/project/googleplex-android/platform/system/core
Bug: http://b/154376560
Bug: https://bugs.llvm.org/show_bug.cgi?id=45594
Test: VM boots
Change-Id: I681c4c46503aff65f32a22c9da15397a42b67183
Even though mdnsresponder seems to allow us to use _adb_secure_connect
and _adb_secure_pairing as service names, these names violate the syntax
outlined in RFC6763, and may not be compatible with other dns-sd
implementations.
Also address some comments from a previous CL.
Bug: 154268895
Test: atest adbd_test
Change-Id: Ia872e976fc4276587b500a827a41d46d9dc755dd
Userdebug devices enable JDWP for every process, so if adbd is turned
off manually, we get an error message for every single process on the
system.
Bug: http://b/154319466
Test: manual
Change-Id: Ia702974d371e35497573c31e22cfb2b572334590
Since this function is used in userspace reboot, we need to be more
diligent with error handling, e.g.:
* If init fails to read /sys/block/zram0/backing_dev, then fail and
fallback to hard reboot.
* Always call swapoff.
* Always reset zram.
* Tear down loop device only if zram is backed by a loop device.
Test: adb reboot userspace
Bug: 153917129
Change-Id: I4709da1d08cf427ad9c898cfb2506b6a29f1d680
Merged-In: I4709da1d08cf427ad9c898cfb2506b6a29f1d680
(cherry picked from commit a840d405eb)
Previously, we weren't distinguishing between nonexistent devices and
devices that don't support features, resulting in lots of stuff being
broken for pre-N devices.
Bug: http://b/154272158
Test: adb shell on a JB emulator
Change-Id: I0058b2a60678e1ad0503f5abac30157be976c9c4
This function is responsible for majority of CPU time in prefetto.
Reduce the number of memory reads (don't read strings byte-by-byte).
Update all calls of ReadString to include the third parameter to have
a max read.
Add an Elf creation benchmark since this function is on the elf
creation path.
Test: libunwindstack_unit_test
Change-Id: Ia36e1f1a5ba76c9e9f13c43fb9e3691dde7897f2
libsnapshot* uses update_metadata-protos. This
used to be optimized out, but now that SnapshotManager is
virtual, CreateUpdateSnapshots can no longer be optimized out.
Bug: 148956645
Test: compiles
Change-Id: Ib67cafd156308bf5a477996ec32eb786f8e896db
This is preferred over SnapshotMergeStats::GetInstance because
the latter needs a concrete SnapshotManager, not the ISnapshotManager
interface.
SnapshotManagerStub::GetSnapshotMergeStatsInstance returns
a SnapshotMergeStatsStub instance.
Test: vts_libsnapshot_test
Bug: 148956645
Change-Id: Ife0ad6d3ce85333cbf395d07f74dedc9ca3fe675
Avoid crashes in update_engine. When SnapshotManager
should not be used (e.g. Virtual A/B is not enabled),
use the stub instead.
Bug: 148956645
Test: update_engine_unittests
Change-Id: Id524a1dfe5d085d439fc5492d4b7f72ee583c17e
This is the public interface of SnapshotManager.
SnapshotManager then inherits from it.
Test: compiles
Test: vts_libsnapshot_test
Test: update_engine_unittests
Bug: 148956645
Bug: 153555889
Change-Id: Ib19c038f9bb41dd8d27f72ff6a24c231cd4c5a76
ELF symbols are not sorted by address. Create remap table
which reshuffles the indices into sorted-by-address order.
This saves over 6x of memory (the remap table needs just
uint32_t per entry, as opposed the FuncInfo cache entry).
ART symbols are sorted. Make use of that fact.
Bug: 110133331
Test: libunwindstack_test
Test: art/test.py -b --host -r -t 137-cfi
Change-Id: I1812d2dd3ad6a69ae93ed50ca387749c649289b9
This uses an experimental Linux kernel API for reading the tags across
processes using ptrace.
Bug: 135772972
Test: Unit tests pass.
Change-Id: Ib1a09d9219166011de80cf250b756bb8a4bcdb0a