Commit graph

37848 commits

Author SHA1 Message Date
Shawn Willden
252f333b31 Merge "Add swillden and dkrahn to OWNERS"
am: 8edf81d50f

Change-Id: Ide52b00a57b156b0edc10827068e512d58727e70
2017-12-21 20:59:58 +00:00
Shawn Willden
8edf81d50f Merge "Add swillden and dkrahn to OWNERS" 2017-12-21 20:47:23 +00:00
Shawn Willden
10ed6fcc85 Add swillden and dkrahn to OWNERS
Test: N/A
Change-Id: I0d3fd54af475ee9184eb44de689b821c450b874f
2017-12-21 12:45:24 -08:00
Ivan Lozano
2fbf6f1083 Merge "Fix sanitizer errors in bootstat.cpp."
am: 9ddf491492

Change-Id: Ib417abbcf4ce2b18f508af9e0ef95e4cca789c02
2017-12-21 17:52:41 +00:00
Steve Paik
89938ac4a4 Merge "Convert autosuspend_wakeup_count.c to cpp"
am: 3b7998aaa1

Change-Id: I1173a17321d245f78d70dc685869c8b875e540f7
2017-12-21 17:46:12 +00:00
Logan Chien
3d5afa7b34 Merge "Separate VNDK libs into another linker namespace"
am: b00ed37a66

Change-Id: Icd85a59b1357f7931c4e8b84e57ec45273b1bc73
2017-12-21 17:45:36 +00:00
Andrew Chant
499d82e5df Merge "usblib: usb_device_get_string decoding fixes."
am: d8dc605d6c

Change-Id: I790e57b379160b82b4b8a1b758ceaf7a049a7b3f
2017-12-21 17:44:51 +00:00
Christopher Ferris
ca0cae76eb Merge "Add tool to save information from a process."
am: 7c20a6cd7c

Change-Id: I7f834ea5770d2ae646c84ff08cd5037a9b2fc473
2017-12-21 17:44:14 +00:00
Ivan Lozano
9ddf491492 Merge "Fix sanitizer errors in bootstat.cpp." 2017-12-21 06:42:55 +00:00
Treehugger Robot
3b7998aaa1 Merge "Convert autosuspend_wakeup_count.c to cpp" 2017-12-21 03:24:16 +00:00
Logan Chien
b00ed37a66 Merge "Separate VNDK libs into another linker namespace" 2017-12-21 01:32:04 +00:00
Steve Paik
db88774631 Convert autosuspend_wakeup_count.c to cpp
Change this file to cpp before cleaning it up.

Bug: 70669809
Test:  Suspend works
Change-Id: Ice927dbb205447a94f33b417e32f7c2cd79613eb
2017-12-20 17:02:31 -08:00
Andrew Chant
d8dc605d6c Merge "usblib: usb_device_get_string decoding fixes." 2017-12-21 00:09:25 +00:00
Christopher Ferris
7c20a6cd7c Merge "Add tool to save information from a process." 2017-12-20 23:20:39 +00:00
Ivan Lozano
44d3cacfce Fix sanitizer errors in bootstat.cpp.
Integer overflow sanitized builds are throwing an error on the while
loop decrement in the rfind function. This refactors the loop to prevent
decrementing the value on the final iteration.

Test: Compiled and device boots without runtime error.
Bug: 30969751
Change-Id: Ice4532cce933062b3c14adf2d9749cfdea4ad84c
Merged-In: Ice4532cce933062b3c14adf2d9749cfdea4ad84c
2017-12-20 14:59:19 -08:00
Tomasz Wasilczyk
ed5448c4be Merge "Use LOG_TAG instead of binary name as a tag."
am: d535a9cab9

Change-Id: Ib1580bf760fb6998b6a1e0bda96210bb13ec9a6f
2017-12-20 21:49:14 +00:00
Tomasz Wasilczyk
d535a9cab9 Merge "Use LOG_TAG instead of binary name as a tag." 2017-12-20 21:28:29 +00:00
Christopher Ferris
3dfd2aea7a Add tool to save information from a process.
Also, modify the ProcessVmRead function to allow arbitrarily large
reads and add a test for it.

Test: Run tool and verify the output can be used to do an offline
Test: unwind.
Test: Ran unit tests.
Change-Id: I0974ddca4f5cf72b4c9fa29b597a0a669e223828
2017-12-20 12:57:01 -08:00
Elliott Hughes
26c7becfce Merge "Add std::string StartsWith*/EndsWith* overloads."
am: dbbba76f88

Change-Id: Ic1c31d9197691d81bdefd267e9ba5182e17102a6
2017-12-20 20:32:36 +00:00
Elliott Hughes
dbbba76f88 Merge "Add std::string StartsWith*/EndsWith* overloads." 2017-12-20 20:21:55 +00:00
Tomasz Wasilczyk
c251600102 Use LOG_TAG instead of binary name as a tag.
If LOG_TAG was not defined, falling back to a default
behaviour (using binary name).

Bug: 35361699
Test: manual
Change-Id: I209a6ebaf0df882f98642f6d1831766cb296c951
2017-12-20 10:59:46 -08:00
Elliott Hughes
579e682628 Add std::string StartsWith*/EndsWith* overloads.
We should have done this from the beginning. Thanks to Windows, we're not
going to be able to switch libbase over to std::string_view any time soon.

Bug: N/A
Test: ran tests
Change-Id: Iff2f56986e39de53f3ac484415378af17dacf26b
2017-12-20 09:42:22 -08:00
Josh Gao
498a076cae Merge "base: extract {ASSERT,EXPECT}_MATCH helpers from debuggerd_test."
am: df9fbc7d75

Change-Id: I420c44ec3cdf8522f8446667845cede0a1f88aae
2017-12-20 03:26:29 +00:00
Tom Cherry
a9ca04a17d Merge "Only apply match if there is something to apply"
am: e6b83cfe5a

Change-Id: I83967a110621ea19d51cf55bfcf46eda9f2e010f
2017-12-20 03:25:47 +00:00
Treehugger Robot
df9fbc7d75 Merge "base: extract {ASSERT,EXPECT}_MATCH helpers from debuggerd_test." 2017-12-20 03:24:39 +00:00
Tom Cherry
e6b83cfe5a Merge "Only apply match if there is something to apply" 2017-12-20 03:20:53 +00:00
Josh Gao
eba1be0d98 Merge "debuggerd: add pause time benchmark."
am: 1b4ab8bc39

Change-Id: I88ff97517b4dab107a25f415651ae9c5564612d1
2017-12-20 02:48:15 +00:00
Treehugger Robot
1b4ab8bc39 Merge "debuggerd: add pause time benchmark." 2017-12-20 02:43:31 +00:00
Jiyong Park
17f0ae765e Merge "/vendor/lib/hw is removed from search paths for vendor default ns"
am: 3388af49e6

Change-Id: I64fcc4e27b7016b2071ffeec9c22aa3398a76cfa
2017-12-20 02:25:08 +00:00
Treehugger Robot
3388af49e6 Merge "/vendor/lib/hw is removed from search paths for vendor default ns" 2017-12-20 02:19:14 +00:00
Josh Gao
30171a8b47 base: extract {ASSERT,EXPECT}_MATCH helpers from debuggerd_test.
Add some helper macros that perform regex string matching to
<android-base/test_utils.h>.

Test: libbase_test32/64 on host
Change-Id: I1b0f03dc73f8b4fdfb8ac6c75d59ef421e0e9640
2017-12-19 17:16:12 -08:00
Tom Cherry
f5ed661f72 Only apply match if there is something to apply
It is possible for a match to only contain a context and not a schema,
or vice versa and in this case, the previously matched values should
continue to be used.  The serializer already handles this case by
setting the index of the match to ~0u if there is not one, so this
change simply has the parser skip these values.

Bug: 70858511
Test: unit tests, including new ones
Change-Id: Ibc65bd8d637e39f3b1ce7bcc2b88189b75173f88
2017-12-19 16:47:21 -08:00
Josh Gao
a42314e436 debuggerd: add pause time benchmark.
Add a benchmark to measure how long we pause a process when dumping.

Bug: http://b/62112103
Test: manually ran it
Change-Id: Iceec2f722915b0ae26144c86dcbeb35793f963da
2017-12-19 16:36:04 -08:00
Andrew Chant
8ea8101b04 usblib: usb_device_get_string decoding fixes.
usb_device_get_string converts incoming ucs-2 text
to ascii by truncating the upper byte of each
character.  This is error prone.

This patch introduces usb_device_get_string_ucs2
to access raw USB string descriptors, as well as
changes usb_device_get_string to replace any non
ascii character with '?'.

Bug: 70163357
Change-Id: If8f98fee4be6ea75dc0f7ce7beba7fd7b6aabf88
Merged-In: If8f98fee4be6ea75dc0f7ce7beba7fd7b6aabf88
Test: Connected & disconnected a NuForceDAC.
2017-12-19 22:20:51 +00:00
Steven Moreland
79c5de4d4b Merge "Usage suggestions."
am: 51c2088f3b

Change-Id: I4e928f1194d89ba0a3c0dc85079dbd7bd30f0e49
2017-12-19 20:38:47 +00:00
Treehugger Robot
51c2088f3b Merge "Usage suggestions." 2017-12-19 20:32:29 +00:00
Yabin Cui
ac7b9ea890 Merge "libBacktraceOffline: improve unwinding callchains."
am: e1d9e7c343

Change-Id: I850c5b47387c2791ab8dd19c6e5b618fea05ce95
2017-12-19 18:33:40 +00:00
James Hawkins
23749d7b3f Merge "bootstat: Add tons of new boot reasons."
am: e3114fdec9

Change-Id: Id0056bc8316e49feba2ac2e9ba1b4780b88618f1
2017-12-19 18:33:02 +00:00
Jiyong Park
a91e8d0152 Merge "Support partners to expose their own system libs to Android apps"
am: ad5ed892a7

Change-Id: Ib1d2d9ecfd7d559114258359e1408849549c2eae
2017-12-19 18:29:56 +00:00
Julien Desprez
9db200e4dc Merge "Add suite component to test modules"
am: 20bc9eb60b

Change-Id: I6dd534a93db0423b5bc8b3e5f7db5c2850e3a2d2
2017-12-19 18:28:58 +00:00
Yabin Cui
e1d9e7c343 Merge "libBacktraceOffline: improve unwinding callchains." 2017-12-19 18:26:00 +00:00
James Hawkins
e3114fdec9 Merge "bootstat: Add tons of new boot reasons." 2017-12-19 17:19:48 +00:00
Treehugger Robot
ad5ed892a7 Merge "Support partners to expose their own system libs to Android apps" 2017-12-19 16:21:29 +00:00
Jiyong Park
d1006fe659 Support partners to expose their own system libs to Android apps
Partners (entities other than AOSP) can expose their own system
libraries which are in /system/lib[64] to Android apps. This can be done
by adding the name of the libs into the files
/system/etc/public.libraries-<companyname>.txt.

There can be multiple of the txt files on a device, which is for the
case that multiple partners contributing to the same system image
have their own set of public libraries.

The public libraries MUST be named as lib<name>.<companyname>.so. This
is to prevent accidental exposure of AOSP-defined system private libs.

Note 1:
<companyname> doesn't need to be the same as the value of the sysprop
ro.product.manufacturer or anything that can be part of a file path.

Note 2:
This feature is not for exposing SoC-specific libs to Android apps. That
is already done by /vendor/etc/public.libraries.txt and is only for
libs in /vendor/lib[64].

Bug: 68280171
Test: mm -j under /system/core/libnativeloader/test
cts-tradefed run commandAndExit cts-dev -m CtsJniTestCases -t
android.jni.cts.JniStaticTest#test_linker_namespaces

Change-Id: I7d32ec27c7858e35b96c7c98223cc110acb35b81
2017-12-19 23:35:09 +09:00
Jiyong Park
483cd2e2fe /vendor/lib/hw is removed from search paths for vendor default ns
Shared libraries in the directory should be dlopened with full file
paths. That was a workaround for some legacy prebuilt binaries and they
are all now fixed. Thus removing.

Bug: 70551668
Test: walleye, aosp_walleye, taimen, aosp_taimen boot to the UI

Change-Id: Ifb123b09c13f873cbefa7784e76dfe5f35575a8d
2017-12-19 21:43:25 +09:00
Treehugger Robot
20bc9eb60b Merge "Add suite component to test modules" 2017-12-19 08:15:29 +00:00
Logan Chien
225b71d8c5 Separate VNDK libs into another linker namespace
This commit extracts /system/lib[64]/vndk and /system/lib[64]/vndk-sp
into another namespace in the vendor section.  This commit is necessary
because LLNDK libraries (e.g. libc or libnativewindow) may otherwise
link to the shared libraries in /system/lib[64]/vndk-sp, which may be
older than the one LLNDK libraries built with.

Test: aosp_walleye boots
Bug: 70816018
Change-Id: I6fceb0da92c978ad940af91f5efe84e673c9247e
2017-12-19 15:29:48 +08:00
Yabin Cui
9879137720 libBacktraceOffline: improve unwinding callchains.
1. Extend MAX_BACKTRACE_FRAMES to 256, as we can have callchains
   with length near 256 when recording Android applications.

2. .eh_frame and .ARM.exidx doesn't know how to unwind from instructions
   setting up or destroying stack frames. It can lead to wrong callchains,
   which may contain pcs outside executable mapping areas. Stop unwinding
   once this is detected.

3. Some CIE entries in .eh_frame/.debug_frame suggest unwinder reading
   personality routine from memory. However, that is not available in
   offline unwinding, and leads to ACCESS_MEM_FAILED error. Work around
   this by returning all zero data when failed to read data for some
   addresses.

4. Some libraries have empty .eh_frame_hdr but valid .eh_frame.
   Work around this by building eh_frame_hdr manually.

5. Prefer to use .debug_frame than .eh_frame. Because the former
   can unwind instructions setting up and destroying stack frames.

Bug: http://b/69383534
Test: run backtrace_test.
Test: run simpleperf on some apps.

Change-Id: I62dddda3865dd567c6be150ce5527dc2d3516256
2017-12-18 18:20:44 -08:00
Steven Moreland
b810209438 Merge "Remove CompileTimeIfElse."
am: 6d8aff5fdc

Change-Id: I0a23c1d7174098acc43de368bbb9e25785fb6222
2017-12-19 01:49:54 +00:00
Treehugger Robot
6d8aff5fdc Merge "Remove CompileTimeIfElse." 2017-12-19 01:44:19 +00:00