Commit Graph

43937 Commits

Author SHA1 Message Date
Tom Cherry 44f0023e81 Add a version script for liblog for the platform
liblog has a version script for the NDK and VNDK, however it doesn't
have symbols intended to be used by the platform.  This change adds
those symbols to the version script and enables it, hiding the rest of
the symbols.

Test: build
Change-Id: I494d048d78bb47d763482eb56a6f79babfe163f4
2019-01-17 11:46:31 -08:00
Tom Cherry 9e12433760 Statically link liblog to logd/logcat and their tests
logd/logcat use more symbols than the rest of the platform, so let's
statically link them for now while we understand the API that the
platform overall uses.

Test: build
Change-Id: I21ae1bd3ff9b310f099612fbe790f769712661df
2019-01-17 11:37:22 -08:00
Tom Cherry e181bf5116 Merge "Remove liblog/uio.c and <log/uio.h>" 2019-01-17 17:19:52 +00:00
Tom Cherry 065854748e Merge "Remove __android_log_event_list and the reader aspect of android_log_event_list" 2019-01-17 17:18:10 +00:00
Christopher Ferris b94c2e52a6 Merge "Add support for UnwinderFromPid object." 2019-01-17 16:21:33 +00:00
Randall Huang 91b5adfc88 Merge "reboot: only run fsck when detecting filesystem inconsistency" 2019-01-17 15:03:13 +00:00
Treehugger Robot a36528da5c Merge "Fix clang-tidy warnings in log_time.h" 2019-01-17 12:30:38 +00:00
Nicolas Geoffray ec6bd00f33 Merge "Add runtime module members to owners." 2019-01-17 06:58:06 +00:00
Bernie Innocenti 804e7d8c4f Fix clang-tidy warnings in log_time.h
- Zero initialize log_time instances by default
 - Disable implicit conversions by making constructors explicit
 - Explicitly initialize to EPOCH in most places
 - Change sniffTime() to avoid in-place modification of a log_time

I stopped here, but we could consider following up with a more invasive
change to make log_time instances immutable and perhaps also remove the
default constructor to force explicit initialization to EPOCH.

Test: atest libbase_test netd_unit_test
Change-Id: I67e716ef74adaaf40ab2c6e2e0dddb8d309bc7ca
2019-01-17 14:45:19 +09:00
Treehugger Robot ccb06c7b2b Merge "Retry mounts on -EAGAIN" 2019-01-17 04:10:19 +00:00
Treehugger Robot bf17bd653a Merge "logd: use .clang-format-4 like the rest of system/core" 2019-01-17 02:17:10 +00:00
Treehugger Robot 6a462405d0 Merge "Remove liblog's rate limiting" 2019-01-17 01:25:27 +00:00
Daniel Rosenberg 5620c6ce0c Retry mounts on -EAGAIN
F2fs may return -EAGAIN on mounting with checkpoint=disable. This
signals that the required garbage collection was taking a while, and
that more garbage collection is required, and will be resumed by
attempting to mount again.

Test: Start device with checkpointing set up with an f2fs userdata
      partition that is in need of heavy garbage collection.
      Mount should fail with EAGAIN and retry
Bug: 122917966

Change-Id: I83341f68e5cffa5f1bd569dfb2037ad5d3cbd7a3
2019-01-16 17:24:50 -08:00
Treehugger Robot 1b676027c4 Merge "Multi-package support for APEX." 2019-01-17 01:18:11 +00:00
Treehugger Robot 3daecf5977 Merge "Revert "Create new mount directory /mnt/runtime/full."" 2019-01-17 01:04:50 +00:00
Treehugger Robot 3ec4081849 Merge "libnativeloader: remove stubs for now." 2019-01-17 00:56:38 +00:00
Treehugger Robot fa14bc85b0 Merge "toolbox: getevent: disable stdout buffering" 2019-01-17 00:47:21 +00:00
Tom Cherry 9ddb1ddf14 Merge "liblog: statically link tests" 2019-01-16 23:45:18 +00:00
Tom Cherry c2ea6e7c39 Remove __android_log_event_list and the reader aspect of android_log_event_list
One user of each, dubious API, remove it while we work on a new one.

Test: build
Change-Id: If422246226addaf873dc2af32553fad3a5182089
2019-01-16 15:35:20 -08:00
Tom Cherry df8063d045 logd: use .clang-format-4 like the rest of system/core
Test: n/a
Change-Id: I9ad125247f502edb4462817417624c2f527d7870
2019-01-16 15:20:15 -08:00
Christopher Ferris eb0772ff4a Add support for UnwinderFromPid object.
This object is able to be easily used from other code and can be used
to replace the libbacktrace calls in other parts of the platform.

Also, demangle the function names when calling FormatFrame.

Bug: 120606663

Test: Unit tests pass, debuggerd using this code directly passes unit
Test: tests.
Change-Id: Ifd8cf9bdd89174c1736810711d20e9f37f29b1bf
2019-01-16 15:13:25 -08:00
Tom Cherry 6f6ef39b48 Remove liblog/uio.c and <log/uio.h>
readv() isn't used by anyone, writev() has one easily replaced user.
uio.h can be left as a private header for windows compatibility with
struct iovec.

Test: build
Change-Id: I33d4c6bdee6fd818271f78ae06abdd2aa09430f2
2019-01-16 14:26:36 -08:00
Tom Cherry 4f8246122f Merge "Use #pragma one for all liblog includes" 2019-01-16 22:25:53 +00:00
Nicolas Geoffray 7338ef5f5c Add runtime module members to owners.
Test: N/A
Change-Id: Id6cdf1a1b643df7744bf476e6e745ecc384708d7
2019-01-16 22:00:48 +00:00
Dario Freni bc54c3670f Multi-package support for APEX.
This CL introduces two changes to adb install-multi-package:
- If there is at least one apex package in the list of packages, use the
  --staged parameter for both the parent and the child sessions
- When the package being sent is an apex, use the --apex parameter

Bug: 118865310
Test: Printed out the resulting commands and verified that both
non-staged and staged workflow are accepted by PackageManager. Tried
scheduling install sessions for a mix of APK/APEX, only APKs, only APEX.
Change-Id: I8d1a6a7c5408fb95c10d79e38ddaf115a46f5d8b
2019-01-16 21:59:34 +00:00
Nicolas Geoffray d06cb94d25 libnativeloader: remove stubs for now.
Seems to break VMDebug test.

Also add missed strdup in returned error message.

bug: 122957265
Test: VMDebug
Change-Id: I64727d707f20c0e6afcb5455edf20c99011a81dc
2019-01-16 21:40:34 +00:00
Bo Hu c8b83f3874 Merge "disable darwin build for libdm" 2019-01-16 20:38:43 +00:00
Sudheer Shanka 54b8844b13 Revert "Create new mount directory /mnt/runtime/full."
This reverts commit 987e732fe8.

Reason for revert: 122957837

Change-Id: Ib1451d46a05f34eb52fdc13143529913df5ec001
2019-01-16 19:52:29 +00:00
Treehugger Robot 1d69860960 Merge "Remove <log/logd.h> and <log/logger.h>" 2019-01-16 19:50:23 +00:00
Tom Cherry bab52203b7 Use #pragma one for all liblog includes
Test: build
Change-Id: I0ffe40853a89acffc1af4fd3838ef488706d23dc
2019-01-16 10:49:45 -08:00
Treehugger Robot 3a4591c750 Merge "Remove checks for _USING_LIBCXX" 2019-01-16 18:43:18 +00:00
Tom Cherry 3b4bddc638 Remove liblog's rate limiting
After a few years of being available, there only ended up being one
user of this, so it is clear that logd's duplicate message mechanism
is the favored solution.

The one user of this rate limiting is questionable as is, since due to
the nature of storaged, the mainloop only runs once per minute by
default as is, so there is essentially nothing to be gained by rate
limiting any further.

Test: build
Change-Id: I0610d11efda1ce8b581b939bad11ff295cb2daa6
2019-01-16 10:37:14 -08:00
Treehugger Robot e780431345 Merge "Remove __ANDROID_USE_LIBLOG_* guards" 2019-01-16 18:28:21 +00:00
Treehugger Robot 72c06c5f68 Merge "fs_mgr: avb check avb_slot_data" 2019-01-16 16:53:17 +00:00
Tom Cherry c5ce8a8ef7 Merge "liblog: convert to C++" 2019-01-16 16:44:06 +00:00
Sudheer Shanka 598a4bcb13 Merge "Create new mount directory /mnt/runtime/full." 2019-01-16 16:34:21 +00:00
Christopher Ferris 61f4ceb55a Merge "Fix usage of Read instead of ReadFully." 2019-01-16 15:27:01 +00:00
Nicolas Geoffray a88a0fa389 Merge "Move to C API of libnativeloader." 2019-01-16 15:05:53 +00:00
Nicolas Geoffray c3a73dcd27 Move to C API of libnativeloader.
Test: m
Bug: 119840313
Bug: 122710865

(cherry picked from commit e1d970df09)

Merged-In: Id5b08ef5de0d38cb678a50e45d38dfb8107c4a1c
Change-Id: Ic82baa885caa5125dd3c8b5de854128c75f48caf

Exempt-From-Owner-Approval: Cherry-pick of approved CL in master.
2019-01-16 13:40:28 +00:00
Randall Huang df2faa4238 reboot: only run fsck when detecting filesystem inconsistency
Running fsck when filesystem is in clean state is unnecessary
and causes long shutdown duration.

Bug: 120575926
Test: shutdown
Change-Id: I0562bdad4ac2fb2dd3c9617f96ca3d6279876bd8
Signed-off-by: Randall Huang <huangrandall@google.com>
2019-01-16 16:19:24 +08:00
Treehugger Robot 6410fd2434 Merge "adb: switch install to unique_fd." 2019-01-16 05:45:26 +00:00
Tom Cherry a6d599815c Remove <log/logd.h> and <log/logger.h>
These are deprecated and no one is currently using them, so remove
them.

Test: build
Change-Id: Ia8d96e8aacdc3dd80e061c835072a3df4e8d38d9
2019-01-15 20:53:37 -08:00
Tom Cherry 1e1b9155f4 Remove __ANDROID_USE_LIBLOG_* guards
These headers are platforms headers, so by definition they'll never be
compiled for a platform less than the current one.

Test: build
Change-Id: Ic1c1535b935929d713806faf17fbf9cd82275329
2019-01-15 20:51:01 -08:00
Tom Cherry e5b615076b Remove checks for _USING_LIBCXX
__cplusplus is enough

Test: build
Change-Id: Ia0cf3b5beafe41ae1ce17335b5b06c753e665a32
2019-01-15 20:49:06 -08:00
Christopher Ferris cadacdf474 Fix usage of Read instead of ReadFully.
Found by inspection.

Test: Builds and unit tests passes.
Change-Id: I10b63534ae0a3bff9ce56e821c542fa69c15822d
2019-01-15 19:10:49 -08:00
Wei Wang 3f4b005022 Merge "lmkd: bump process priority and set to FOREGROUND group before kill" 2019-01-16 03:06:21 +00:00
Tom Cherry 173a02b439 Merge "lmkd: add missing libcutils library to test" 2019-01-16 00:46:10 +00:00
Tom Cherry 71ba16488b liblog: convert to C++
Bug: 119867234
Test: liblog, logcat, logd unit tests

Change-Id: I2a33b6fc37f9860c0041e3573bfb59ea389f623c
2019-01-15 15:57:33 -08:00
Treehugger Robot cb33207a62 Merge "init: Allow first-stage mounts in the second stage if they're formattable." 2019-01-15 23:06:34 +00:00
bohu 54aa061c32 disable darwin build for libdm
bug: 122886514

Change-Id: I260e2d097023500f63f6fc217610f2868e842117
2019-01-15 22:57:00 +00:00