Commit graph

26 commits

Author SHA1 Message Date
Victor Khimenko
7428c52ef2 Make libbacktrace buildable for native_bridge
Bug: http://b/153609531

Test: m -j64 libbacktrace.native_bridge

Change-Id: I2b8a881b4e952f3b68dbcaeb14f147a6d955b406
2020-06-18 22:02:46 +02:00
Jiyong Park
16a932a4ef Set apex_available property
The marked library(ies) were available to the APEXes via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 150999716
Test: m
Merged-In: I54db09314c7236a227f04281a439c1d5dc56ef2c
Change-Id: I54db09314c7236a227f04281a439c1d5dc56ef2c
(cherry picked from commit a2606921b2)
2020-05-18 13:30:25 +09:00
Yabin Cui
1c22b4fedf libprocinfo: remove error msg for unknown process state.
Unknown process states are expected since libprocinfo doesn't
list all process states in
https://github.com/torvalds/linux/blob/master/fs/proc/array.c#L130.
So remove error message for unknown state.

Bug: none
Test: run libprocinfo_test.
Change-Id: I321893855235367e037afd58ccb63d5140619095
2020-01-17 15:55:13 -08:00
Christopher Ferris
3bae40b279 Add ReadMapFileAsyncSafe function.
This is a function designed so that it doesn't do any allocations.
It's purpose is for testing allocation related code where doing an
allocation can disturb the test.

Added unit tests for the new code that disable memory allocations
before running.

Also, made the tests run in isolation mode since I added a bunch of
tests and this will keep the total runtime about the same as
before.

Bug: 137795072

Test: All unit tests pass.
Change-Id: I7645f1e9f88cdfbc57c8eebce80199b9cfae64c1
2019-08-23 10:07:44 -07:00
Treehugger Robot
1922a501bf Merge "Revert "Mark libs as double_loadable"" 2019-03-12 22:11:27 +00:00
Jooyung Han
55063b1444 Revert "Mark libs as double_loadable"
This reverts commit c624621554.

Reason for revert: These libs are no longer used by libmediandk(aosp/915075)

Change-Id: I5533a3c22263afb21f4053a569c4a646c9766404
2019-03-11 14:10:34 +00:00
Treehugger Robot
81767b1d3d Merge "procinfo: Read inode number from /proc/<pid>/maps" 2019-02-15 23:03:00 +00:00
Sandeep Patil
f31c70989b procinfo: Read inode number from /proc/<pid>/maps
Adjust all callbacks to include the inode number as well.

Fixes: 123532375
Test: libprocinfo_test
Test: libdmabufinfo_test
Test: libmeminfo_test

Change-Id: I71fd75d90d5ee44585011c5ae654a1dd7e185458
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-02-11 01:38:08 +00:00
Jooyung Han
c624621554 Mark libs as double_loadable
libs(libasyncio libmemtrack libprocinfo libusbhost) have
vendor variants and they are also used by LLNDK(libmediandk)
which means these libs can be double-loaded.

deps:
- libmediandk -> libmedia_jni -> libmtp -> libasyncio
- libmediandk -> libmedia_jni -> libandroid_runtime -> libmemtrack
- libmediandk -> libmedia_jni -> libandroid_runtime -> libdebuggerd_client -> libprocinfo
- libmediandk -> libmedia_jni -> libmtp -> libusbhost

Bug: 121280180
Test: m -j
Change-Id: I2c2b5d67cf47b85a2aa8c08f85c7e1a84490cf4e
2019-02-08 11:48:04 +09:00
Florian Mayer
3f1f2e07ab Add missing includes.
Test: Builds.
Change-Id: Ia8b79154902503cdd774dc3b4523466123b4324c
2018-12-06 10:09:20 -08:00
Yabin Cui
0fe48f943d libprocinfo: provide MapInfo structure for reading maps.
Bug: none
Test: run libprocinfo_test.
Change-Id: I4d3c0f3012e91571aef7ebf4b154df1c9c5addc2
2018-10-30 17:36:09 -07:00
Joel Fernandes
ed59ff4729 Remove ashmem from system/core
This topic removes ashmem from ART. Changes the names in system/core
too. It only affects "dalvik-" ashmem regions which are the majority.

Change-Id: Id993b4510d9b1461954cd8a6bf8ccede45fdaacc
Signed-off-by: Joel Fernandes <joelaf@google.com>
2018-08-24 12:30:09 -07:00
Yabin Cui
5f036ab89b libprocinfo: return error msg instead of printing it.
So users can decide whether to print error msg or not.

Bug: none
Test: run libprocinfo_test.
Change-Id: Ie1afcb58cb97493c7ffade6841b6eb7a800a3981
2018-07-24 14:34:06 -07:00
Jiyong Park
a0e75045e6 Build adbd for recovery
adbd (and its dependencies) are marked as recovery_available:true so
that recovery version of the binary is built separately from the one for
system partition. This allows us to stop copying the system version to
the recovery partition and also opens up the way to enable shared
libraries in the recovery partition. Then we can also build adbd as a
dynamic executable.

Bug: 79146551
Test: m -j adbd.recovery
Change-Id: Ib95614c7435f9d0afc02a0c7d5ae1a94e439e32a
2018-05-24 14:11:11 +09:00
Yabin Cui
edac5e3b25 libprocinfo: fix mac build.
Bug: none
Test: build.
Change-Id: Ic25d873d9d74edc8320b75d077536055f176c0dd
2018-05-15 12:51:57 -07:00
Yabin Cui
3841accba8 libprocinfo: add functions reading process map file.
Add test and benchmark.
Also switch libbacktrace, libunwindstack, libmemunreachable
to use libprocinfo for map file reading.
The benchmark shows using libprocinfo speeds up map file reading
in libbacktrace and libunwindstack 18% - 36% on walleye.

Bug: http://b/79118393
Test: run procinfo_test.
Test: run libunwindstack_test.
Test: run libbacktrace_test.
Test: run memunreachable_test.

Change-Id: Icf281c352f4103fc8d4ba6732c5c07b943330ca1
2018-05-14 14:00:18 -07:00
Elliott Hughes
40fdf3f4ab Add test_suites lines.
Bug: N/A
Test: builds
Change-Id: Ic5e2b9206bcfcb53c774989013b5db6aab462e42
2018-04-27 16:12:06 -07:00
Elliott Hughes
dc699a269f bpfmt.
Bug: N/A
Test: builds
Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
2018-02-16 17:58:14 -08:00
Elliott Hughes
693d63f9cf Add OWNERS.
Bug: N/A
Test: N/A
Change-Id: Ie785058c0f5eb9b4086c98ccba6e63e3ed411b65
2017-12-07 13:30:03 -08:00
Chih-Hung Hsieh
122352d983 Use -Werror in system/core
* Move -Wall -Werror from cppflags to cflags.
* Fix/suppress warning on unused variables.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I1e05e96a1d0bcb2ccef1ce456504b3af57167cc5
2017-11-01 11:32:55 -07:00
Justin Yun
6a7e882316 Mark the modules as VNDK in Android.bp
As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
        enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: Icecb22ed2ed0f58c3168605d4cf64815e2dda750
Change-Id: Icecb22ed2ed0f58c3168605d4cf64815e2dda750
(cherry picked from commit 9b0ed72942)
2017-09-14 08:35:16 +00:00
Josh Gao
9cb2e2eb8c libprocinfo: add support for parsing process state.
Bug: http://b/63008395
Test: libprocinfo_test32
Change-Id: I20a337bb5075bcdb325d2b48e174b0b5ef896261
2017-06-27 15:06:27 -07:00
Jayant Chowdhary
4362e5b0f8 Mark libprocinfo vendor_avaialable.
libprocinfo belongs to vndk-cap. Mark it vendor_available to enable vndk
abi stability checks on it.

Details: https://android-review.googlesource.com/368372

Test: mm -j64

Bug: 38244611

Change-Id: Ib79c7e3bdde1c7d3cd9f2bb95c284b4690a22ebb
2017-05-24 14:28:22 -07:00
Dan Willemsen
e0cd1e043d Enable more modules on linux_bionic builds
Bug: 31559095
Test: Enable host bionic, run soong
Change-Id: Ib4ebd909322cf464b6a40040e4b60ece7d905b6f
2017-03-15 15:44:00 -07:00
Tom Cherry
5b4eb23cfd Remove extraneous .clang-format files
The .clang-format files in the base, debuggerd, adb, libprocinfo, and
fastboot subdirectories each differ slightly from the top level
.clang-format-2 and .clang-format-4, but not in a substantially
meaningful way, as the source files in those directories have not been
re-formatted with clang-format.  Therefore, let's reduce the
differences and use only the two top level clang-format files.

Secondly perform some small clean-up of the top level .clang-format
files.  AllowShortBlocksOnASingleLine is already false in the Google
style, so it can be removed.  AllowShortFunctionsOnASingleLine should
not change between the -2 and -4 versions, so leave it at the Google
default style in both, which is 'All'.

The diff stats for these changes are:

./base/
Old:
640 insertions(+), 531 deletions(-)
New:
563 insertions(+), 808 deletions(-)

./debuggerd/
Old:
910 insertions(+), 886 deletions(-)
New:
991 insertions(+), 1023 deletions(-)

./adb/
Old:
2623 insertions(+), 2886 deletions(-)
New:
2655 insertions(+), 3103 deletions(-)

./libprocinfo/
Old:
2 insertions(+), 1 deletion(-)
New:
4 insertions(+), 18 deletions(-)

./fastboot/
Old:
618 insertions(+), 743 deletions(-)
New:
726 insertions(+), 882 deletions(-)

./init/
Old:
1755 insertions(+), 1866 deletions(-)
New:
1715 insertions(+), 1952 deletions(-)

Test: Above clang-format stats
Change-Id: I3f7b8ab0660c8394c5008ba95ea15e70dd22b55b
2017-03-14 14:06:31 -07:00
Josh Gao
911d729c8a libprocinfo: introduce.
Add a new library for parsing /proc files. Start with helpers for
parsing /proc/<pid>/status and /proc/<pid>/task.

Bug: http://b/30705528
Test: libprocinfo_test32/64 on host/bullhead
Change-Id: I5757514c0aede8a9d75834b55aae42a5cf762b95
2016-11-14 13:42:18 -08:00