summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-08-07simpleperf: Speed up disassembling many functions in a binaryYabin Cui
report_html.py disassembles each function separately. This is slow when there are thousands of functions, and we run llvm-objdump for each of them. So change to disassemble the whole binary and parse the result when needing to disassemble many functions in it. Bug: 294296070 Test: run test.py Test: run report_html.py disassembling libmonochrome_64.so Change-Id: I9fa05dc5ce11ac95ba71a82d5ceecb919ea90630
2023-08-03Merge "Remove references to the pdk product variable" into main am: ce002f9153Cole Faust
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2693009 Change-Id: I2cad979041891653b121e9fd31730a80ff7250d1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-03Merge "Remove references to the pdk product variable" into mainCole Faust
2023-08-03Remove references to the pdk product variableCole Faust
pdk is deprecated and has no effect as of aosp/1319667. Test: Presubmits Change-Id: I19db5793fb3e53590405685107a48e99af5f5267
2023-08-01Merge "lpdumpd: Link to libsnapshot dynamically." into main am: f0b091a8b2David Anderson
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2670014 Change-Id: I603e620fac05d56d630243bf8d4f091227f4065b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01Merge "lpdumpd: Link to libsnapshot dynamically." into mainDavid Anderson
2023-08-01Merge "Add safety comments." into main am: cddabac71fTreehugger Robot
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2682930 Change-Id: I0602a3da51910cc9a875ba4d47b02b18d07705aa Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01Merge "Add safety comments." into mainTreehugger Robot
2023-07-31Merge changes Ibb1f2b72,I96e19758 into main am: 5361fbef34Yabin Cui
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2680157 Change-Id: I69f7ff2adf9e8330ed1200a35cc60f793bcc1fc3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-31Merge changes Ibb1f2b72,I96e19758 into mainYabin Cui
* changes: simpleperf: fix parsing tracing format for fuzzer simpleperf: Fix libsimpleperf_report_fuzzer
2023-07-31Add safety comments.Andrew Walbran
These will soon be required by a lint. Bug: 290018030 Test: m rust Change-Id: I4a2c338909c8f25e3727edc9a8ce61ae1a7e7ea3
2023-07-27simpleperf: fix parsing tracing format for fuzzerYabin Cui
Let ParseTracingField return std::nullopt when having parsing errors. Let GetTracingFormatHavingId return std::nullopt instead of aborting when can't find a matching one. Bug: 291895810 Test: run libsimpleperf_report_fuzzer Test: run simpleperf_unit_test Test: run test.py Change-Id: Ibb1f2b72c9113a5e529b948d488f3efe8045564b
2023-07-27simpleperf: Fix libsimpleperf_report_fuzzerYabin Cui
After aosp/2667698, we need to register commands explicitly. Bug: 291895810 Test: run libsimpleperf_report_fuzzer Change-Id: I96e197585693dc56f5476a401166a22af9ca1d69
2023-07-27Merge "simpleperf: check errors in CanSampleRegsFor32BitABI()" into main am: ↵Yabin Cui
5f69572f99 Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2678038 Change-Id: Idfbfbd519e5354d7be8141a48dd5abe4b87a04aa Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27Merge "simpleperf: check errors in CanSampleRegsFor32BitABI()" into mainYabin Cui
2023-07-26Merge "simpleperf: use libsimpleperf_readelf in host builds" into main am: ↵Yabin Cui
3aa529b42a Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2667360 Change-Id: Icb38befa65a1c481eadd9da66bd32eaeb4529d94 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26simpleperf: check errors in CanSampleRegsFor32BitABI()Yabin Cui
CanSampleRegsFor32BitABI() returns nullopt when having an error. Currently the caller ignores the error. But it's better to check. So this patch checks the error in OMIT_TEST_ON_NON_NATIVE_ABIS. Bug: 291717595 Test: run CtsSimpleperfTestCases Change-Id: I210fbb5ca2f426936cefd0ae717ff50f4549f2ae
2023-07-26Merge "simpleperf: use libsimpleperf_readelf in host builds" into mainYabin Cui
2023-07-26Merge "simpleperf: Disable failed tests when running with a 32-bit ↵Yabin Cui
translator" into main am: 55152ee43f Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2675896 Change-Id: I6d6442c628d3c5e239139d378a56a514c2be7641 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26Merge "simpleperf: Disable failed tests when running with a 32-bit ↵Yabin Cui
translator" into main
2023-07-26Merge changes I0186bbff,I821cd5a2 into main am: e6d571292cNikita Putikhin
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2675336 Change-Id: I271b47b9f2403e7617c8234df077fb69935be6bb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26Merge changes I0186bbff,I821cd5a2 into mainNikita Putikhin
* changes: Add readme and owners, improve comments Add a macro to instrument the calling method
2023-07-26Add readme and owners, improve commentsNikita Putikhin
Finishing touches before the library is more or less ready to use. Bug: 289989828 Test: atrace Test: Manually collected trace Change-Id: I0186bbff1417fefde8056a9e8e39055988d1875a
2023-07-25simpleperf: Disable failed tests when running with a 32-bit translatorYabin Cui
The CtsSimpleperfTestCases built for ARM may run with a 32-bit translator on a 64-bit only CPU. In this situation, tests about recording apps can fail because of the limiation of translation. So detect this situation and diable failed tests. Bug: 291717595 Test: run CtsSimpleperfTestCases Change-Id: Icd9f3736d5dd84c2c502e6b733a3688b0a3de2bb
2023-07-25Merge "Add missing <functional> includes for std::function" into main am: ↵Ryan Prichard
f330930be2 Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2673532 Change-Id: Ie08bbaa1c3f8ba82842ac998118f18ed6aa41f68 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25Merge "Add missing <functional> includes for std::function" into mainRyan Prichard
2023-07-25Add a macro to instrument the calling methodNikita Putikhin
Bug: 289989828 Test: atest Test: Manually collected trace Change-Id: I821cd5a2cb4f19c7519085dd74f359095a1cb052
2023-07-24Add missing <functional> includes for std::functionRyan Prichard
Bug: b/175635923 Test: treehugger Change-Id: I334456522a40a9d281b6517b5b9630582ae23ae9
2023-07-24Merge changes I9078e326,I95a1494a,I69e609d4,Ie893ae8c into main am: ca4dc3e384Nikita Putikhin
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2673116 Change-Id: I562ef764e2f1c1e7383437c52fbb958287fc1ae2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-24Merge changes I9078e326,I95a1494a,I69e609d4,Ie893ae8c into mainNikita Putikhin
* changes: Add scoped event Wrap instant events and counters Wrap async ATrace events Wrap atrace utility methods
2023-07-24Add scoped eventNikita Putikhin
Scoped events are more convenient and less error-prone than beginning and ending events manually. Bug: 289989828 Test: atest Test: Manually collected trace Change-Id: I9078e326c7868af30f1a2b60eedcdb82778dc653
2023-07-24Wrap instant events and countersNikita Putikhin
These are the last remaining methods from ATrace to add. Bug: 289989828 Test: atest Test: Manually collected trace Change-Id: I95a1494a0109c84ef20fccc5c565332f5698c912
2023-07-24Wrap async ATrace eventsNikita Putikhin
Bug: 289989828 Test: atest Test: Manually collected trace Change-Id: I69e609d45c67a9a7e07e98f282339a1759577751
2023-07-24Wrap atrace utility methodsNikita Putikhin
Bug: 289989828 Test: atest Test: Manually collected trace Change-Id: Ie893ae8c3c82a3020a752e4a2fbfeac0dd018e87
2023-07-24Merge changes Id73cdfa8,I08951eec into main am: bd41370cd7Nikita Putikhin
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2671555 Change-Id: I60a39b3ca8426e4cb673cee7978b2d536f852d1f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-24Merge changes Id73cdfa8,I08951eec into mainNikita Putikhin
* changes: Don't call wrapped atrace_begin if tag is disabled Add the rest of static inline function wrappers
2023-07-23lpdumpd: Link to libsnapshot dynamically.David Anderson
This fixes a ~1.5MB regression in binary size. Bug: 291688516 Test: treehugger Change-Id: I70ddb7f74fe251a45e068779deb9729a3ae6fbf0
2023-07-21Don't call wrapped atrace_begin if tag is disabledNikita Putikhin
Gating the binding call on tag status lets us avoid constructing CString and spending a lot of time when tracing is disabled. We'll use this optimization when adding other wrapper methods that accept strings. Change of atrace_begin time with tracing off: 100 ns -> 6 ns Test: atest Test: Manually run libatrace_rust_benchmark Test: Manually run libatrace_rust_example and collect a trace with Perfetto. Bug: 289989828 Change-Id: Id73cdfa887da9b5d2142154d3be5f88872108675
2023-07-21Add the rest of static inline function wrappersNikita Putikhin
Will be used for Rust bindings. Test: Manually run libatrace_rust_example and collect a trace with Perfetto. Bug: 289989828 Change-Id: I08951eec445b91a4e451164957a5e6bd2f00bb6c
2023-07-20simpleperf: use libsimpleperf_readelf in host buildsYabin Cui
Bug: 267670561 Test: run simpleperf_unit_test Change-Id: Ia697f2415f4f0e565932fce2280cd00c6e39b18e
2023-07-20Merge changes I43d482c6,I9eae1a09 into main am: 00355dd348Yabin Cui
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2667698 Change-Id: I8882348ad10e8b45f84c9116108dab75f0f51a61 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20Merge changes I43d482c6,I9eae1a09 into mainYabin Cui
* changes: simpleperf: Only register needed commands in libsimpleperf_profcollect simpleperf: Reduce size introduced from libsimpleperf_readelf
2023-07-20simpleperf: Only register needed commands in libsimpleperf_profcollectYabin Cui
With this change, the size of libsimpleperf_profcollect.so decreases from 2.2M to 1.8M. Bug: 291157586 Test: run simpleperf_unit_test Change-Id: I43d482c685b7ea19a2cda4f9b756e89267f7a973
2023-07-20simpleperf: Reduce size introduced from libsimpleperf_readelfYabin Cui
After static linking libsimpleperf_readelf, the size of simpleperf and libsimpleperf_profcollect.so increases a lot: simpleperf: 1.7M -> 5.4M libsimpleperf_profcollect.so: 2.1M -> 9.4M To reduce the size increased: 1. Use createObjectFile instead of createBinary, to reduce involving unrelated code. 2. Use --exclude-libs=libsimpleperf_readelf.a to remove unused functions in shared libraries. Use --exclude-libs=ALL to further remove other unused functions from libsimpleperf_profcollect.so. After the changes: simpleperf: 5.4M -> 2.3M libsimpleperf_profcollect.so: 9.4M -> 2.2M Bug: 291157586 Test: run simpleperf_unit_test Change-Id: I9eae1a092b5fff04f907b49c33c261cdb6a629aa
2023-07-20Merge "Add a benchmark for libatrace_rust" into main am: 26fbe94303Nikita Putikhin
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2662098 Change-Id: Ie9ad1b379f9fa68c20feb89454e885b26e9f3fc1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20Merge "Add a benchmark for libatrace_rust" into mainNikita Putikhin
2023-07-19Add a benchmark for libatrace_rustNikita Putikhin
The benchmark gives us data on relative performance of API wrappers vs calling the API directly. Right now it shows big overhead on atrace_begin with tracing disabled. This is expected - we always allocate a CString which is ignored if tracing is off. The perf issue will be fixed in the next commit. Bug: 289989828 Test: Run benchmarks on aosp_cf_x86_64_phone Change-Id: I25868b7724f70ac875ec1e8cbfb192e16cc7087c
2023-07-18Merge "Add more tests for mtectrl override" into main am: bd015a64bdTreehugger Robot
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2657931 Change-Id: I6c1b1c6fc535aab5a860744b3a0cb993e417481b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-18Merge "Add more tests for mtectrl override" into mainTreehugger Robot
2023-07-17Merge "simpleperf: Implement __libcpp_verbose_abort" into main am: 01c69f9fbcYabin Cui
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2657285 Change-Id: I0d1f6fe78236c8cb846fa684941589313d9f61f0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>