OSDN Git Service
Andreas Gampe [Wed, 28 Mar 2018 21:28:18 +0000 (14:28 -0700)]
Perfprofd: Factor out the command-line-based loop
Move cmdline-related code out of the core.
Bug:
73175642
Test: mmma system/extras/perfprofd
Test: perfprofd_test
Change-Id: Iae2a74f82ed103891149a8f21f8db509c8f53b65
Andreas Gampe [Wed, 28 Mar 2018 19:43:07 +0000 (12:43 -0700)]
Perfprofd: Move dropbox code to its own static library
Preparation to move this to generic code.
Bug:
73175642
Test: mmma system/extras/perfprofd
Test: perfprofd_test
Change-Id: I2cad55f201ff8af9acfe8e8e34c6bafea8ef1285
Yabin Cui [Thu, 29 Mar 2018 17:26:18 +0000 (17:26 +0000)]
Merge "simpleperf: support showing symbols for interpreted java code."
Treehugger Robot [Thu, 29 Mar 2018 16:44:28 +0000 (16:44 +0000)]
Merge "Perfprofd: Add compression to config proto"
Yabin Cui [Tue, 27 Mar 2018 00:34:00 +0000 (17:34 -0700)]
simpleperf: support showing symbols for interpreted java code.
To convert from a dex_pc (returned by libunwindstack) to a symbol name,
we need below things:
1. The mapping info of the vdex file containing the dex_pc.
2. The offsets of dex files in the vdex file.
So make below changes:
1. Record none executable maps when profiling java code.
2. Refactor dso code to add a new type for dex file, using DexFileDso
to store dex file offsets in a vdex file, and load symbols from that
vdex file.
3. Add read_dex_file.cpp to read java symbols using libdexfile.
4. Change the format of file section in record_file_format.h, to store
dex file offsets in vdex files.
Bug: http://b/
73126888
Bug: http://b/
77236599
Test: Run simpleperf to profile several apps manually, can see
Test: callstacks of both java code and native code.
Test: Run simpleperf_unit_test.
Change-Id: I08005a03beb3df1a70db034bc463f555934856ba
Treehugger Robot [Thu, 29 Mar 2018 00:02:57 +0000 (00:02 +0000)]
Merge "Allow recovery-dtbo in recovery.img to be signed"
Yabin Cui [Wed, 28 Mar 2018 22:54:20 +0000 (22:54 +0000)]
Merge "simpleperf: build simpleperf instead of simpleperf32 on gce_x86."
Andreas Gampe [Wed, 28 Mar 2018 22:51:33 +0000 (15:51 -0700)]
Perfprofd: Add compression to config proto
Bug:
73175642
Test: mmma system/extras/perfprofd
Change-Id: If2c164ca2d99ee4d85d67e7b0eed28811c415e8a
Yabin Cui [Wed, 28 Mar 2018 19:50:15 +0000 (12:50 -0700)]
simpleperf: build simpleperf instead of simpleperf32 on gce_x86.
Bug: http://b/
77219275
Test: build manually.
Change-Id: I9082fee3b31b7eb8e90096262c11d1875cbf4e64
Hridya Valsaraju [Fri, 23 Mar 2018 23:01:03 +0000 (16:01 -0700)]
Allow recovery-dtbo in recovery.img to be signed
Non-A/B devices need to include the DTBO image
within the recovery partition to be self-sufficient
and prevent OTA failures. The CL includes the size
of recovery DTBO in the size of the boot image to be
signed to prevent image truncation.
Test: Verified that recovery.img was not getting truncated.
Bug:
74763691
Change-Id: Id56928129dfea167e2451aa5f4609fef77e00ff4
Treehugger Robot [Wed, 28 Mar 2018 17:18:17 +0000 (17:18 +0000)]
Merge "Perfprofd: Enable sanitizers in debug build"
Treehugger Robot [Wed, 28 Mar 2018 01:32:37 +0000 (01:32 +0000)]
Merge "Perfprofd: Implement symbolization over quipper data"
Treehugger Robot [Tue, 27 Mar 2018 22:12:16 +0000 (22:12 +0000)]
Merge "Suppress clang 7.0 warnings."
Andreas Gampe [Wed, 21 Mar 2018 23:05:26 +0000 (16:05 -0700)]
Perfprofd: Implement symbolization over quipper data
Reimplement the symbolization post-process step to walk quipper
protobufs, looking for mapped files without build ID data.
Bug:
73175642
Test: mmma system/extras/perfprofd
Test: perfprofd_test
Change-Id: I7c27b09b6a7f9c743472837962021845b2f4db7f
Andreas Gampe [Tue, 27 Mar 2018 18:33:25 +0000 (11:33 -0700)]
Perfprofd: Enable sanitizers in debug build
Test enable sanitizers for debug build to aid in bug diagnostics.
Bug:
73175642
Test: mmma system/extras/perfprofd
Test: perfprofd_test
Change-Id: Iba9351e11592940e3ceff06d5cad32f5aed38388
Treehugger Robot [Mon, 26 Mar 2018 22:56:48 +0000 (22:56 +0000)]
Merge "simpleperf: Minor code readability change"
Greg Kaiser [Mon, 26 Mar 2018 21:13:17 +0000 (14:13 -0700)]
simpleperf: Minor code readability change
In
11017687d6, we switched ApkInspector::FindOffsetInApkByName()
to return bool. We were a little overly aggressive switching
things to 'false', and now switch an integral comparison back
to comparing against '0' instead of 'false'.
This has no runtime change for the code, and is just for
readability.
Test: Treehugger
Change-Id: I8704ff9d99d266e18aa8a3e43fce1c519902c3b0
Treehugger Robot [Sat, 24 Mar 2018 00:51:52 +0000 (00:51 +0000)]
Merge "Perfprofd: Add debug version of libperfprofdcore"
Andreas Gampe [Fri, 23 Mar 2018 03:25:33 +0000 (20:25 -0700)]
Perfprofd: Add debug version of libperfprofdcore
Add libperfprofdcored for the tests.
Bug:
73175642
Test: mmma system/extras/perfprofd
Test: perfprofd_tests
Change-Id: I5e7047d80495f6ce832892d3d488104da318fe02
Treehugger Robot [Fri, 23 Mar 2018 17:43:59 +0000 (17:43 +0000)]
Merge "Perfprofd: Add GZIP compression"
Yabin Cui [Fri, 23 Mar 2018 17:27:58 +0000 (17:27 +0000)]
Merge "simpleperf: support profiling jited java code."
Treehugger Robot [Fri, 23 Mar 2018 17:18:29 +0000 (17:18 +0000)]
Merge "Perfprofd: Use a stream to serialize"
Treehugger Robot [Fri, 23 Mar 2018 17:17:02 +0000 (17:17 +0000)]
Merge "Perfprofd: Refactor protobuf I/O"
Andreas Gampe [Fri, 23 Mar 2018 02:48:48 +0000 (19:48 -0700)]
Perfprofd: Add GZIP compression
Add support for output compression with libz.
Bug:
73175642
Test: mmma system/extras/perfprofd
Test: perfprofd_test
Change-Id: I4e38040fa197fd67c4e844199e980520887e6258
Andreas Gampe [Fri, 23 Mar 2018 02:42:30 +0000 (19:42 -0700)]
Perfprofd: Use a stream to serialize
Move from a memory buffer to streaming to file.
Bug:
73175642
Test: mmma system/extras/perfprofd
Test: perfprofd_test
Change-Id: Ibb37b8942e7dbf3c5ff9bf69c00473c57f7d2a7c
Andreas Gampe [Thu, 22 Mar 2018 15:20:08 +0000 (08:20 -0700)]
Perfprofd: Refactor protobuf I/O
Move to its own compilation unit.
Bug:
73175642
Test: mmma system/extras/perfprofd
Change-Id: Iad9ddfe5ea84df9fa1fe27a367ec19aa37162c00
Treehugger Robot [Fri, 23 Mar 2018 00:03:07 +0000 (00:03 +0000)]
Merge changes Id3a9ce45,I4eddd1a3
* changes:
Perfprofd: Factor out quipper iterator helpers
Perfprofd: Add explicit build dependency to simpleperf
Yabin Cui [Thu, 22 Mar 2018 17:37:20 +0000 (17:37 +0000)]
Merge "simpleperf: add SIMPLE_PERF_RECORD_TRACE_DATA record type."
Andreas Gampe [Wed, 21 Mar 2018 23:02:02 +0000 (16:02 -0700)]
Perfprofd: Factor out quipper iterator helpers
Bug:
73175642
Test: mmma system/extras/perfprofd
Change-Id: Id3a9ce457917b5453e1bebff274601320e3ca40d
Andreas Gampe [Wed, 21 Mar 2018 23:04:15 +0000 (16:04 -0700)]
Perfprofd: Add explicit build dependency to simpleperf
It doesn't really make sense to deploy perfprofd without simpleperf.
Bug:
73175642
Test: mmma system/extras/perfprofd
Change-Id: I4eddd1a3c3f6613ba2c6216103dcbfe62fcda2b3
Yabin Cui [Wed, 21 Mar 2018 21:34:29 +0000 (14:34 -0700)]
simpleperf: add SIMPLE_PERF_RECORD_TRACE_DATA record type.
PERF_RECORD_TRACE_DATA can't have record size >= 64K. This causes
some aborts when recording tracepoint events, as in
https://github.com/android-ndk/ndk/issues/493.
So fix this by adding a custom type SIMPLE_PERF_RECORD_TRACING_DATA,
which isn't limited by 64K.
Also fix an error parsing formats of tracepoing events.
Bug: http://b/
75278602
Test: run simpleperf_unit_test.
Change-Id: Ib5ebd0b6f981b00c2a256d17cdfd0e725d75a272
Yabin Cui [Tue, 20 Mar 2018 22:29:03 +0000 (15:29 -0700)]
simpleperf: support profiling jited java code.
1. For each jit symfile, generate a Mmap2Record with a special flag
PROT_JIT_SYMFILE_MAP.
2. Call ReadMmapEventData() before dumping jit Mmap2Records, to keep
the order of samples and mmap records.
3. Handle finding symbols from maps with PROT_JIT_SYMFILE_MAP flags.
4. Pass PROT_JIT_SYMFILE_MAP flag to libunwindstack, to unwind
through jited methods.
Bug: http://b/
73127105
Test: run simpleperf manually.
Test: run simpleperf_unit_test.
Change-Id: I2b2f77ff457f7eb2f10193e987a181e4791a29ee
Chih-Hung Hsieh [Tue, 16 Jan 2018 18:28:43 +0000 (10:28 -0800)]
Suppress clang 7.0 warnings.
* Remove unrecognized -Wno-extended-offsetof.
Test: make checkbuild
Change-Id: I271ec44cfe947ed77e645b2bd619fdf739c16b0e
Yabin Cui [Wed, 21 Mar 2018 01:34:00 +0000 (01:34 +0000)]
Merge "simpleperf: Add trace-sched command."
Yabin Cui [Mon, 19 Mar 2018 20:58:51 +0000 (13:58 -0700)]
simpleperf: Add trace-sched command.
trace-sched command traces system-wide process runtime events,
and reports potential spin loops.
Bug: http://b/
74443296
Test: run simpleperf_unit_test.
Test: run `simpleperf trace-sched` manually.
Change-Id: I6d5205442fe17019f214e9966f93636b1db9f1ef
Treehugger Robot [Tue, 20 Mar 2018 22:14:11 +0000 (22:14 +0000)]
Merge "Perfprofd: Use temporary file for large dropbox drops"
Andreas Gampe [Mon, 19 Mar 2018 23:24:14 +0000 (16:24 -0700)]
Perfprofd: Use temporary file for large dropbox drops
A large buffer may not be sent over a binder transaction directly.
Bug:
73175642
Test: mmma system/extras/perfprofd
Test: perfprofd_tests
Test: manual
Change-Id: I821ee2a0b3015c765c64be13b2d0101bec05a96b
Yabin Cui [Tue, 20 Mar 2018 19:22:24 +0000 (19:22 +0000)]
Merge "simpleperf: Add JITDebugReader."
Treehugger Robot [Tue, 20 Mar 2018 19:02:35 +0000 (19:02 +0000)]
Merge "Remove verify_boot_signature."
Treehugger Robot [Tue, 20 Mar 2018 18:08:39 +0000 (18:08 +0000)]
Merge "Timetest: Clean up"
Andreas Gampe [Tue, 20 Mar 2018 16:40:12 +0000 (09:40 -0700)]
Timetest: Clean up
Clean up the code a little.
The removed TEMP_FAILURE_RETRY is actually wrong. The others are either
superfluous or needed.
Be more direct with error returns.
For EBUSY, loop at most ten times, with sleep.
Use unique_fd for descriptor tracking/close.
Bug:
76008092
Test: atest time-unit-tests
Change-Id: Id7176e0237a416a4bb19d72c47b8e1a2f6b57ca5
David Benjamin [Tue, 20 Mar 2018 17:28:30 +0000 (13:28 -0400)]
Remove verify_boot_signature.
The immediate motivation is to trim away uses of the <openssl/asn1t.h>
header. Per email with samitolvanen@, this verified boot scheme has been
deprecated for a while, and this target isn't actually used anywhere. It
is only a rough example for OEMs. Accordingly, remove it.
Test: mma
Change-Id: Ie3b6d2c3fb0a6873b81a1a048945ef8258521f16
Yabin Cui [Fri, 9 Mar 2018 23:57:13 +0000 (15:57 -0800)]
simpleperf: Add JITDebugReader.
When profiling an app on Android >= P, simpleperf reads new JIT/dex
symfiles exported by the app's __jit_debug_descriptor and
__dex_debug_descriptor every 100ms. It also saves new JIT symfiles
in temporary files for unwinding/symbolization later. This is a
preparation to support profiling JITed/interpreted Java code.
Bug: http://b/
73127105
Test: run simpleperf_unit_test.
Test: run simpleperf manually.
Change-Id: I0a3a483a61e7388e51627a7779547016b0b268a0
Treehugger Robot [Sun, 18 Mar 2018 01:14:31 +0000 (01:14 +0000)]
Merge "Perfprofd: Disable darwin build"
Andreas Gampe [Sat, 17 Mar 2018 23:38:54 +0000 (16:38 -0700)]
Perfprofd: Disable darwin build
Do not attempt to build for host on darwin.
Bug:
73175642
Test: none
Change-Id: I35d2f4a30499382a84c9298972d0c039a7a0e51a
Treehugger Robot [Fri, 16 Mar 2018 23:00:14 +0000 (23:00 +0000)]
Merge changes If56a3eb6,I01dc7c54
* changes:
Perfprofd: Support host tests
Perfprofd: Use external quipper
Andreas Gampe [Wed, 14 Mar 2018 03:55:56 +0000 (20:55 -0700)]
Perfprofd: Support host tests
Support host gtests where it makes sense.
Bug:
73175642
Test: mmma system/extras/perfprofd
Test: perfprofd_test (host, target)
Change-Id: If56a3eb6addc81b0287ce984d4e2284f28bc675b
Andreas Gampe [Tue, 13 Mar 2018 23:04:01 +0000 (16:04 -0700)]
Perfprofd: Use external quipper
Switch to using external/perf_data_converter. This removes
on-device symbolization for the moment.
Bug:
73175642
Test: mmma system/extras/perfprofd
Test: perfprofd_test
Change-Id: I01dc7c54299c295b29475632d5b6cf7ce68c236c
Yabin Cui [Thu, 15 Mar 2018 23:53:36 +0000 (23:53 +0000)]
Merge "Simpleperf: Fix perf_data_path config"
Stefan Zager [Thu, 15 Mar 2018 21:15:25 +0000 (14:15 -0700)]
Simpleperf: Fix perf_data_path config
Change-Id: Iad8620b39f95dd3ffebf17cb95f232a8a54b1dac
Dan Willemsen [Mon, 12 Mar 2018 21:26:03 +0000 (21:26 +0000)]
Merge "Remove obsolete BRILLO variable"
Dan Willemsen [Sat, 10 Mar 2018 23:37:23 +0000 (15:37 -0800)]
Remove obsolete BRILLO variable
Test: none
Change-Id: I1b15b23061b9130045b9da5114db6cfc71167bde
Yabin Cui [Fri, 9 Mar 2018 19:10:47 +0000 (19:10 +0000)]
Merge "simpleperf: improve managing temp files."
Treehugger Robot [Fri, 9 Mar 2018 02:32:23 +0000 (02:32 +0000)]
Merge "Simpleperf: Add host version of libsimpleperf_elf_read"
Yabin Cui [Wed, 7 Mar 2018 23:47:15 +0000 (15:47 -0800)]
simpleperf: improve managing temp files.
Instead of relying on callers to delete temp files, support managing
all temp files in ScopedTempFiles.
Bug: http://b/
73127105
Test: run simpleperf_unit_test and simpleperf manually.
Change-Id: Ib73065754657320ebd244f676e3f851544ff2718
Andreas Gampe [Thu, 8 Mar 2018 21:49:27 +0000 (13:49 -0800)]
Simpleperf: Add host version of libsimpleperf_elf_read
Bug:
73175642
Test: mmma system/extras/simpleperf
Change-Id: Ie72000d73e914df32bd481f29d42b0f1198bfc78
Yabin Cui [Thu, 8 Mar 2018 19:46:56 +0000 (19:46 +0000)]
Merge "simpleperf: Fix cached map in OfflineUnwinder."
Yabin Cui [Thu, 8 Mar 2018 02:53:54 +0000 (02:53 +0000)]
Merge "simpleperf: fix an error using std::string."
Yabin Cui [Thu, 8 Mar 2018 00:06:17 +0000 (16:06 -0800)]
simpleperf: fix an error using std::string.
Bug: none
Test: run simpleperf_unit_test.
Change-Id: I7d1332f36780303bb3f14adedb5b049aefbb523c
Yabin Cui [Wed, 7 Mar 2018 23:55:48 +0000 (15:55 -0800)]
simpleperf: Fix cached map in OfflineUnwinder.
In system wide profiling, sometimes a sample record goes before all
mmap records of a process. Then thread.maps->version = 0 and
cached_map.map isn't created.
This is caught by simpleperf_unit_test.
Bug: none
Test: run simpleperf_unit_test.
Change-Id: I99254396d0fb22531f735ff3193b8d3b1f9641dd
Yabin Cui [Tue, 6 Mar 2018 22:03:32 +0000 (22:03 +0000)]
Merge "simpleperf: fix calculating cpu frequency."
Yabin Cui [Tue, 6 Mar 2018 19:35:22 +0000 (11:35 -0800)]
simpleperf: fix calculating cpu frequency.
When calculating cpu frequency and other frequencies, use time
running on cpu instead of total passed time. This is to be
consistent with linux-tools-perf.
This is reported in https://github.com/android-ndk/ndk/issues/644.
Bug: none
Test: run simpleperf_unit_test.
Change-Id: Ic385939c189fb86c6b3c648d2c0a4e9636c13c93
Yabin Cui [Mon, 26 Feb 2018 21:32:55 +0000 (21:32 +0000)]
Merge "simpleperf: flush output before quick_exit."
Yabin Cui [Mon, 26 Feb 2018 20:12:44 +0000 (12:12 -0800)]
simpleperf: flush output before quick_exit.
Bug: http://b/
73875722
Test: run simpleperf manually.
Change-Id: I010c8612b18cd4034199440cb178d9d9cc8f0ff4
Yabin Cui [Fri, 23 Feb 2018 23:36:30 +0000 (23:36 +0000)]
Merge "simpleperf: use quick_exit."
David Srbecky [Fri, 23 Feb 2018 19:25:02 +0000 (19:25 +0000)]
Merge "Create maps for libunwind only if they changed."
Yabin Cui [Fri, 23 Feb 2018 19:03:35 +0000 (11:03 -0800)]
simpleperf: use quick_exit.
Bug: none
Test: run simpleperf_unit_test.
Test: run simpleperf manually.
Change-Id: I5e7229c8d5bfc4d47a6b7e403e627137c7f36b55
Christopher Ferris [Fri, 23 Feb 2018 03:06:42 +0000 (19:06 -0800)]
Create maps for libunwind only if they changed.
Increases speed (unwinds per second) by 50%.
Bug: None
Test: manual - took a profile
Test: run simpleperf_unit_test.
Change-Id: I254f70a011c1b3d31bbd4e9e4bb9e85fbf2ffbdf
Treehugger Robot [Thu, 22 Feb 2018 19:37:04 +0000 (19:37 +0000)]
Merge "Fix the build failure for iot targets in master-iot-dev"
Nan Zhang [Thu, 22 Feb 2018 17:48:12 +0000 (09:48 -0800)]
Fix the build failure for iot targets in master-iot-dev
Fix:
system/extras/brillo_config/Android.mk:83: error: $(file ...)
is not supported in rules.
Test: m -j32
Bug: b/
73753971
Change-Id: I96099be887f404042c28d3fa1c9f4a2e12ce1222
Treehugger Robot [Thu, 22 Feb 2018 02:07:15 +0000 (02:07 +0000)]
Merge "Use HAS_BUILD_NUMBER to check engineering build"
Christopher Ferris [Wed, 21 Feb 2018 20:13:24 +0000 (20:13 +0000)]
Merge "Skips symbolization."
Nan Zhang [Tue, 20 Feb 2018 21:11:27 +0000 (13:11 -0800)]
Use HAS_BUILD_NUMBER to check engineering build
And use BUILD_NUMBER_FROM_FILE instead of BUILD_NUMBER to reduce build
reruns.
Test: m -j32
Bug: b/
70351683
Change-Id: Ic2a6e2095712828c8314fdd5fca7669f2fb88bc3
Christopher Ferris [Tue, 20 Feb 2018 21:59:50 +0000 (13:59 -0800)]
Skips symbolization.
Bug:
73558129
Test: Passes unit tests.
Change-Id: I7cbe618f622b540abf486777f0d40a18f890dbef
Treehugger Robot [Thu, 15 Feb 2018 22:30:49 +0000 (22:30 +0000)]
Merge "Use BUILD_DATETIME_FROM_FILE instead of BUILD_DATETIME in brillo_config"
Yabin Cui [Thu, 15 Feb 2018 18:13:12 +0000 (18:13 +0000)]
Merge "simpleperf: fix cmd_debug_unwind tests."
Yabin Cui [Wed, 14 Feb 2018 23:38:31 +0000 (23:38 +0000)]
Merge "simpleperf: fix --interval option in system wide stating."
Yabin Cui [Wed, 14 Feb 2018 23:28:59 +0000 (15:28 -0800)]
simpleperf: fix cmd_debug_unwind tests.
Without flushing stdout, the tests may fail when
running `adb shell simpleperf_unit_test`.
Bug: none
Test: run `adb shell simpleperf_unit_test`.
Change-Id: I8bcf739e7672e8affc71df0a3f11264c0bd7f745
Nan Zhang [Wed, 14 Feb 2018 21:29:12 +0000 (13:29 -0800)]
Use BUILD_DATETIME_FROM_FILE instead of BUILD_DATETIME in brillo_config
Soong_UI will handle build timestamp and export date file to Make.
Test: m -j32
Bug: b/
70351683
Change-Id: I09ac0117c899afadf28e562d83e95f3132a47e20
Yabin Cui [Wed, 14 Feb 2018 21:41:03 +0000 (13:41 -0800)]
simpleperf: fix --interval option in system wide stating.
Bug: none
Test: run simpleperf_unit_test.
Change-Id: Ida90ecd465e5c63f0f813cde63d70acfeb1281da
Chih-hung Hsieh [Wed, 14 Feb 2018 20:57:14 +0000 (20:57 +0000)]
Merge "Declare explicitly thumb mode."
Yabin Cui [Wed, 14 Feb 2018 18:36:49 +0000 (18:36 +0000)]
Merge "simpleperf: Use cross-arch unwinding."
Chih-Hung Hsieh [Wed, 14 Feb 2018 18:10:35 +0000 (10:10 -0800)]
Declare explicitly thumb mode.
* bandwidth.h contains thumb mode only instructions.
Test: normal build.
Change-Id: Ib40dfda63f668949370405e7ec53f5f9828200e6
Logan Chien [Wed, 14 Feb 2018 02:11:54 +0000 (02:11 +0000)]
Merge "Fix PDK build"
Yabin Cui [Tue, 6 Feb 2018 21:42:16 +0000 (13:42 -0800)]
simpleperf: Use cross-arch unwinding.
Enables cross-arch unwinding since the new unwinder supports cross-arch
unwinding.
Also change tests accordingly.
Bug: http://b/
73127000
Test: run simpleperf_unit_test.
Change-Id: I3ca3f7a81b40e9f7ea2b39b9fdc951f9e7a6acc7
Logan Chien [Tue, 13 Feb 2018 10:27:17 +0000 (18:27 +0800)]
Fix PDK build
This commit disables "perfporfd" in PDK builds because "perfporfd"
depends on "libservices" (from "frameworks/base") which is not in PDK
builds as well.
Test: Build a target (described in http://b/
72961456) with
`platform.zip` built from master FSK source tree.
Bug:
72961456
Change-Id: Ia4913435642cd09a321afb9f583331ca24a8e4be
Yabin Cui [Thu, 8 Feb 2018 21:35:11 +0000 (21:35 +0000)]
Merge "simpleperf: improve debug-unwind cmd."
Yabin Cui [Wed, 7 Feb 2018 01:49:06 +0000 (17:49 -0800)]
simpleperf: improve debug-unwind cmd.
In debug-unwind cmd:
1. Add --symfs option.
2. Add meta_info section when there isn't one.
3. Add file section when there isn't one.
Rename unwinding_result_reporter.py to debug_unwind_reporter.py,
and fix a small error in it.
Bug: http://b/
72556486
Test: run simpleperf_unit_test.
Test: run debug_unwind_reporter.py manually.
Change-Id: Ibc66b7bfdc91a17f6f1c2c0e84f4769d2bcaa1e7
Treehugger Robot [Wed, 7 Feb 2018 01:24:16 +0000 (01:24 +0000)]
Merge "Simpleperf: Support record --"
Andreas Gampe [Tue, 6 Feb 2018 02:53:25 +0000 (18:53 -0800)]
Simpleperf: Support record --
Support optional "--" to be compatible with linux-perf.
Test: mmma system/extras/simpleperf
Test: simpleperf_unit_test
Change-Id: I4c2627625bb97514d86c8972ef5a0a31bf518b76
Yabin Cui [Tue, 6 Feb 2018 02:54:18 +0000 (02:54 +0000)]
Merge "simpleperf: add debug-unwind cmd."
Yabin Cui [Fri, 2 Feb 2018 22:18:40 +0000 (14:18 -0800)]
simpleperf: add debug-unwind cmd.
Currently, we use --log debug option in record cmd to debug offline unwinding.
However, it has below disadvantages:
1. It adds extra complexity in record cmd.
2. It doesn't keep reg/stack data of samples.
3. It isn't convenient to reproduce samples in problem. Because each time
recording gets different samples.
4. It isn't very suitable for performance test of unwinding, for the same
reason as item 3.
So instead, this CL adds debug-unwind cmd focusing on debugging and testing
offline unwinding. It solves problems mentioned above.
Also change unwinding_result_reporter.py to make it work with perf.data
generated by debug-unwind cmd.
Bug: http://b/
72556486
Test: run simpleperf_unit_test.
Test: run unwinding_result_reporter.py manually.
Change-Id: I11cdf1eba993f48d61ef9891ad1be54d29679fdb
Yabin Cui [Thu, 1 Feb 2018 02:12:02 +0000 (02:12 +0000)]
Merge "simpleperf: Switch to use post-unwind by default in record cmd."
Yabin Cui [Tue, 30 Jan 2018 00:02:16 +0000 (16:02 -0800)]
simpleperf: Switch to use post-unwind by default in record cmd.
When recording google.sample.tunnel app for 30s:
It took 3s to unwind samples and write unwound samples to file.
It took 0.3s to write samples containing stack/reg data to file.
The result shows recording with post unwinding consumes much
less time than unwinding samples immediately. This means we can
record with higher freq and get smaller lose rate when using
post unwinding. So make below changes:
1. Make post unwinding by default.
2. Replace --post-unwind with --no-post-unwind option.
3. Make --trace-offcpu and callchain joiner work with post unwinding.
4. Remove special operations in --log debug mode. Those will be
supported in a new command.
Bug: http://b/
72556486
Test: run simpleperf_unit_test.
Test: run python test.py.
Change-Id: I9a5a5defda9d040985e674c43db19ee68e7aa305
Yabin Cui [Wed, 31 Jan 2018 01:42:47 +0000 (01:42 +0000)]
Merge "inferno: support --one-flamegraph option."
Yabin Cui [Tue, 30 Jan 2018 23:05:15 +0000 (23:05 +0000)]
Merge "simpleperf: fix mac build."
Yabin Cui [Tue, 30 Jan 2018 23:02:39 +0000 (15:02 -0800)]
simpleperf: fix mac build.
Bug: none
Test: none
Change-Id: Ia4e6dd0e44e19379d79a08a8555ad413ba879bf2
Yabin Cui [Tue, 30 Jan 2018 19:14:45 +0000 (11:14 -0800)]
inferno: support --one-flamegraph option.
Also split options into groups.
Bug: http://b/
72495881
Test: manually.
Change-Id: Iec322fc1f1afb74ee5ee0fb19145d16926064332
Christopher Ferris [Tue, 30 Jan 2018 15:33:56 +0000 (15:33 +0000)]
Merge "Change to new libbacktrace offline functions."
Christopher Ferris [Thu, 14 Dec 2017 23:53:37 +0000 (15:53 -0800)]
Change to new libbacktrace offline functions.
Changes:
- Removes references to libunwind.
- Add enabling of global Elf cache.
- Add new ApkInspector function to get the offset from an apk by name.
- When a map name contains a '!' convert back to a name and offset.
- Initialize global elf cache in OfflineUnwinder constructor.
Bug:
65682279
Test: All unit tests pass.
Change-Id: I303b4beab8270ed2097cd17d91253c321cdc97f1