Commit Graph

39227 Commits

Author SHA1 Message Date
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
Artem Iglikov 04398a9b23 Sort devices list before output.
Makes copy of the transport list and sorts it by type and serial before
printing.

Bug: 70748433
Test: adb devices displays all connected devices
Change-Id: I917728a102972f2f38f2e370a0c6011c1eb883c7
2017-12-19 09:22:53 +00: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
Steven Moreland b8f152d3e2 Usage suggestions.
Providing alternative suggestions for using C++ stdlib types
instead of libutils types:
- higher interoperability
- fewer "legacy" quirks
- ability to use stl algorithms
- high optimization levels

Test: none
Change-Id: If81aa9982ca0ad229fa13c8142387906981b054d
2017-12-19 01:16:00 +00:00
Steve Paik 12400958a8 Merge "Create wrapper function for set_wakeup_callback"
am: d848876ff7

Change-Id: I6ee09acad175923ad9bfd26ab64377626ed92108
2017-12-19 00:29:39 +00:00
Treehugger Robot d848876ff7 Merge "Create wrapper function for set_wakeup_callback" 2017-12-19 00:06:15 +00:00
Steven Moreland 8edb49060a Remove CompileTimeIfElse.
- not used anywhere
- equivalent to std::conditional

Test: none
Bug: none
Change-Id: Iffc00acb899d5159359d60c09443c7d2d7fdf2a0
2017-12-18 15:52:50 -08:00
Josh Gao e9200b5db0 Merge "unwindstack: add some perfunctory MemoryOffline tests."
am: 8b18000b39

Change-Id: I814e7208c6969f4d335415320af2940753a178fa
2017-12-18 22:29:05 +00:00
Treehugger Robot 8b18000b39 Merge "unwindstack: add some perfunctory MemoryOffline tests." 2017-12-18 22:21:45 +00:00
Tom Cherry 705cbc7562 Merge "Reland "Have property_service create a serialized property_contexts file""
am: 432cca5c32

Change-Id: I6853876fd18d769f14c12be688457a58b8711bfd
2017-12-18 22:11:18 +00:00
Tom Cherry 432cca5c32 Merge "Reland "Have property_service create a serialized property_contexts file"" 2017-12-18 22:02:35 +00:00
James Hawkins e2c2724aee bootstat: Add tons of new boot reasons.
Bug: none
Test: none
Change-Id: I57e89a20f23d3b3cff2fa6667e25f1c37cb2870c
2017-12-18 13:40:27 -08:00
Elliott Hughes be281d0b56 Merge "Increased number of Android log lines for tombstones"
am: 3e58777255

Change-Id: Idc35a4de4fd0cc08297ea96ece4e0e081c0783d5
2017-12-18 18:57:36 +00:00
Elliott Hughes 3e58777255 Merge "Increased number of Android log lines for tombstones" 2017-12-18 18:52:05 +00:00
Steve Paik 2d44190539 Create wrapper function for set_wakeup_callback
Bug: 70669809
Test:  Compiles

Change-Id: I55f8b9995c2d872504b586addb07a18206da7fbe
2017-12-18 10:22:04 -08:00
Julien Desprez 5b585791db Add suite component to test modules
Test: build
Bug: 65303193
Change-Id: I620c7034b9bdfa056dbde97c28bc5abc3375cc42
2017-12-18 18:08:53 +00:00
Jiyong Park 9837d6be1f Don't install unnecessary VNDK libs
vndk_package is a phony module that includes ALL VNDK libs found in the
source code. As a result, VNDK libs that were actually not needed for
the device have been installed consuming storage. For example,
/system/lib/vndk/android.hardware.automotive*.so files were installed
even though walleye/taimen do not have automotive HALs.

VNDK libs are now installed by their link time dependencies (i.e. if a
vendor module uses libcutils, then /system/lib[64]/vndk-sp/libcutils.so
is automatically installed.).

By the way, there is a few number of VNDK libs that do not have any
link time dependency from vendor modules. They are always opened via
dlopen. In such cases, the vndk modules are added to `required`
or `LOCAL_REQUIRED_MODULES` of the module that dlopens them.

Bug: 67002788
Test: walleye builds and boots to the UI
Test: basic functionalities work (sound, camera, camcorder, slow-mo,
youtube, wifi, bluetooth)

Change-Id: I321256b9d20f20a9062c6d13b1745d8727eda558
2017-12-18 21:21:02 +09:00
Jiyong Park c56fafa4fc Merge "Do not use versioned VNDK directory in vendor partition"
am: 3459e5823e

Change-Id: I71264e329c01771a694999c710cdc41f4db69b7b
2017-12-18 05:01:46 +00:00
Treehugger Robot 3459e5823e Merge "Do not use versioned VNDK directory in vendor partition" 2017-12-18 04:58:39 +00:00
chirag honnavar def0888a80 Increased number of Android log lines for tombstones
5 lines are not enough for debug

Bug: b/69815742

Change-Id: I3117f221f4945941ec277064ffd2765dda74e192
2017-12-18 09:28:49 +09:00
Yabin Cui 29088725b2 Merge "libbacktrace: export offline unwinding failures."
am: 742fc190c8

Change-Id: Ic0443e038996a0b8d88af3c03c196aca5df85fee
2017-12-16 20:43:54 +00:00
Yabin Cui 742fc190c8 Merge "libbacktrace: export offline unwinding failures." 2017-12-16 20:40:25 +00:00
Christopher Ferris 31bf08431c Merge "Fix issues in libunwindstack."
am: e05d6afb90

Change-Id: I69d62a4d9fb9810ce13e22d57b84b1cc3d29f05f
2017-12-16 02:48:54 +00:00
Christopher Ferris e05d6afb90 Merge "Fix issues in libunwindstack." 2017-12-16 02:44:35 +00:00
Josh Gao 664de1b788 Merge "crash_dump: fork a copy of the target's address space."
am: 152bcf9b80

Change-Id: I222a960a411d3f1ab0b5ee8f61c3c812a875a0b4
2017-12-16 01:07:58 +00:00