summaryrefslogtreecommitdiff
path: root/profcollectd
AgeCommit message (Collapse)Author
10 daysprofcollectd: Add kernel release in configYabin Cui
It makes us easier to locate kernel prebuilts in the build server. Bug: 323054107 Test: run profcollectd Change-Id: I3f42ca89e76335b16397b57fdc616d4096c78fea
11 daysMerge "Replace impl ToString with impl Display" into mainTreehugger Robot
11 daysReplace impl ToString with impl DisplayChris Wailes
If the Display interface is implemented the compiler will automatically derive an implementation of ToString. Test: m rust Bug: 333887339 Change-Id: Ib07011b5004bdc42b60eff7405528b72e77b9496
2024-05-01Automatically delete trace files after generating reportAbhishek Gadewar
Summary: After switching to a time-based approach for report generation, we want to ensure that we don't accidentally include repeated trace files. Thus, after creating a zip file for the report, we delete the originals. Test: Ran adb shell device_config put profcollect_native_boot enabled true and rebooted the device to enable profcollectd. Ranprofcollectctl once to collect trace files, profcollectctl process to process them, and then profcollectctl report to generate the report. Verified that the processed trace files were removed after profcollectctl report was run & that the config.json file remained. Tags: Change-Id: Ic6ab934f52c7af277817ce992faebd96fcde223f Signed-off-by: Abhishek Gadewar <abhishekgadewar@meta.com>
2024-04-17profcollect: Change config namespace to aconfig_flags.profcollect_native_bootYi Kong
Trunk stable now puts flags under aconfig_flags. Change-Id: I16f7c84b2f56793f10134e82e9a5c66f49425725 Test: manual
2024-04-08Do not reset profcollectd on sampling_period changeYi Kong
Read the config every time we trigger trace, so that server configured value is instantly reflected rather than requiring a reboot. Test: presubmit Bug: 329547258 Change-Id: I378a8ac0f971143385994bb4e30434da5b6bde91
2024-03-06profcollectd: Update binary_filter to include kernel codeYabin Cui
Bug: 323054107 Test: run profcollectd Change-Id: I7fabeadaec9fbf08d617ea3c769afab19ae06ca2
2024-02-09Merge "Replace lazy_static with once_cell" into mainTreehugger Robot
2024-01-31Replace use of deprecated function with_min_levelJeff Vander Stoep
This is needed to upgrade the android_logger crate from 0.12.0 to 0.13.3. with_max_level provides the same functionality as with_min_level. The renaming is admittedly confusing, but the new name is accurate and it makes sense that they deprecated and then removed the previously poorly named with_min_level. See crate documentation [1] and code [2]. [1]: https://docs.rs/android_logger/0.12.0/android_logger/struct.Config.html#method.with_min_level [2]: https://docs.rs/android_logger/0.12.0/src/android_logger/lib.rs.html#227 Bug: 322718401 Test: build and run CF with the change. Test: m aosp_cf_x86_64_phone Change-Id: I3296e815daeef318ed66cd132ad96b23cc4ee2e1
2024-01-22Replace lazy_static with once_cellLuca Stefani
Using lazy_static is now discouraged as unmaintained and once_cell is the recommended replacement. On top of that a similar implementation found in once_cell is being tracked for inclusion under the `lazy_cell` feature gate [0] Also there's no need to lazy init the Timestamp Context as it's const. [0] https://github.com/rust-lang/rust/issues/109736 Test: m libprofcollectd Change-Id: I6314a47519b87e027005ccb6173a742a18050305
2024-01-17Merge "Fix build with logging_trace_provider" into mainYi Kong
2024-01-16Update OWNERSYi Kong
Test: N/A Change-Id: Icecad9ee45a8c5444d49055e81261bb7738de692
2024-01-16Fix build with logging_trace_providerYi Kong
Update to the new interface signature. Test: n/a Change-Id: Iff45a5b484d95fd6942ebd1a563301308f71c6d4
2023-12-13profcollectd: Don't dump symbols in recording filesYabin Cui
The symbols are not needed when processing recording files. Bug: 293953824 Test: run profcollectd manually Change-Id: Ic9b9fe35f2118f1202b224f75f013d786ef9b92e
2023-12-13profcollectd: Support collecting LBR dataYabin Cui
Modify simpleperf interface and add simpleperf_lbr_trace_provider to record LBR data. Bug: 293953824 Test: run profcollectd manually Change-Id: I8586a4a2a0b15d51badc34ef0011f519735a4836
2023-06-01remove libprofcollect_libflags_rust and replace with libflags_rustDennis Shen
Bug: b/284096062 Test: m libprofcollectd Change-Id: Ibe0f92cc93cdc5cd505ceb6fe282482c2ea223e1
2023-05-12profcollectd: Put usage setting in the report zip fileYabin Cui
Bug: 282060259 Test: run am broadcast -a com.android.server.profcollect.UPLOAD_PROFILES (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1a2601f23f3b60901bbc5f4577a84469ab27d751) Merged-In: I7ea32d6b840ce99f3290a725d095e960b2870b77 Change-Id: I7ea32d6b840ce99f3290a725d095e960b2870b77
2023-05-02profcollectd: Control record scope by binary filterYabin Cui
Record ETM data for kernel space only when it's not filtered out by binary_filter. Bug: 279094308 Test: run profcollectd manually Change-Id: I3debd97798aac0756dfeb829f60104a41076d140
2023-05-02profcollectd: Use --decode-etm when recordingYabin Cui
Also use --binary to filter binaries, use --exclude-perf to exclude ETM data for profcollectd. Bug: 279094308 Test: run profcollectd manually Change-Id: I6d74ebab932ae576599f7435bab9824b7d3c1d57
2023-05-01profcollectd: Add a log file in the reportYabin Cui
This is to detect possible errors while collecting ETM data. 1. Create a trace.log file in the output directory. It will be put in the report zip file. 2. Register a custom log function writing to the log file via SetLogger. So both rust and c++ code can log to the file. 3. Add log messages when calling simpleperf functions. 4. The log file is cleared after config change (e.g. after a device update). Bug: 272547391 Test: run profcollectd manually Change-Id: I1f0d5e5209eab46f1b9893406ba365da43dd77c2
2023-03-30Merge "Update usage of uuid crate"Chris Wailes
2023-01-19Update usage of uuid crateChris Wailes
The API provided by the uuid crate has changed in the most recent release. Bug: 229895468 Test: m libprofcollectd Change-Id: I3d374030b35194b7a9ef9a8fac866977a2b09058
2023-01-19Fix warnings from Rust 1.65.0Chris Wailes
Bug: 250026064 Test: m rust Change-Id: Ib632cfeb0d38324314e1a90e6a25ea8d8291310a
2023-01-10Disable profcollectd for riscv64Colin Cross
profcollectd depends on libprofcollectd from simplerperf, which is not compiled for riscv64 due to the dependency on an old version of LLVM. Disable profcollectd too. Test: lunch aosp_riscv64-userdebug && m Change-Id: I4cf07492530d10fd372f9df752441e85d6720d67
2022-11-16Fix warnings from rustc 1.65.0Chris Wailes
Bug: 250026064 Test: m rust Change-Id: I7cbefca61dd002561f2e26040afe87defc702a10
2022-02-28Merge "profcollectd: add doc for testing custom configurations."Treehugger Robot
2022-02-24profcollectd: add doc for testing custom configurations.Yabin Cui
Bug: none Test: none Change-Id: I2a8ea114d44b5fe9dc122a7360d5655eaa4cf832
2022-02-23profcollectd: Log to System rather than MainYi Kong
This allows logging early in the boot sequence. Test: presubmit Bug: 215419883 Change-Id: I276c3becfbba00d39402d5bdd14492532eb95cf7
2022-02-09Merge "profcollectd: add interface to wait for ETM after boot."android-t-preview-2android-t-preview-1android-t-beta-3android-s-v2-beta-3android-s-qpr3-beta-1android-t-preview-1android-s-v2-beta-3android-s-qpr3-beta-1Yabin Cui
2022-02-07profcollectd: add interface to wait for ETM after boot.Yabin Cui
ETM device may not be ready when profcollectd is started. So this CL adds interface to wait for ETM after boot: 1. In simpleperf_profcollect, split has_support() into has_driver_support() and has_device_support(). 2. In ProfcollectdBinderService and Scheduler, add interface to register ProviderStatusCallback, which is called when the trace provider is ready. 3. In profcollectd, register ProviderStatusCallback after boot. Then record boot profile and schedule periodic recording in the callback. Bug: 213519191 Test: on oriole EVT and DVT devices, profcollectd can record boot Test: profile and periodic profiles. Test: run simpleperf_unit_test. Change-Id: I87befcd372ad85a0131116a7925f303b4990ec47
2022-02-07Update to improved system_properties API.Andrew Walbran
Bug: 217728265 Test: mm Change-Id: I795877d506d79c42d31c308a823058ac305e4a79
2022-01-19Revert^2 "[libprofcollectd] Fix binder import path"Stephen Crane
Import from the binder crate root instead of binder::public_api for compatibility with the new crate structure. Re-landing change: I773767a3ae1cd797fe937a4f72f9588d63119e4c Test: m Bug: 196056781 Change-Id: Ida3e7a8a230df87a3e00f291086b11fa0be67af6
2022-01-19Revert "[libprofcollectd] Fix binder import path"Stephen Crane
Revert submission 1797473-binder_rs-public_api Reason for revert: Build breakage Reverted Changes: Ia37ec9d1e:[binder_common] Update binder import path Ie6b4a40d7:Update Rust binder import paths Ia9695e549:[keystore2] Fix binder import path I811426fa7:[binder] Expose public Rust API at crate top level... I773767a3a:[libprofcollectd] Fix binder import path Change-Id: I0a4ccf69a60b661e4a574d2144db285deba14943
2022-01-12[libprofcollectd] Fix binder import pathStephen Crane
Import from the binder crate root instead of binder::public_api for compatibility with the new crate structure. Test: m Bug: 196056781 Change-Id: I773767a3ae1cd797fe937a4f72f9588d63119e4c
2021-12-14profcollectd: Refactor for better code clarityYi Kong
NFCI. Test: presubmit Change-Id: Iec62d8118cd5508626c0f1021ce8d20195d8f061
2021-12-08profcollectd: include apex binaries in binary filterYi Kong
Also make binary filter controlled by device config. Test: manual Bug: 79161490 Change-Id: I9fbb393eb7c46fbef9640ccb8b31e22c498254ef
2021-12-05profcollectd: process reports on the main threadYi Kong
It was a leftover from the old implementation. There is no point to create a thread and immediately joins it. Test: presubmit Change-Id: Id0f095f4ed231cf822a449b53cb2b05f0649a7fa
2021-11-30profcollectd: Clean up dead codeYi Kong
We moved away from directly copying reports to internal storage for report uploading, remove the unused methods. Test: build Change-Id: I5071e28c20cf1f4b9588da4b51495e160ef3170f
2021-11-30profcollectd: Remove local files once disabledYi Kong
This saves storage space on users' devices if profcollect is no longer enabled. Test: manual Change-Id: I04f19ba7ddbf9d9f977bb40ac4bc74a09369350f
2021-11-24profcollectd: Limit storage space usedYi Kong
This prevents profcollect from exhausting all the device storage. We don't count space used by packed reports or processed data since they are much smaller (~30KB per trace). Test: manual Bug: 207426233 Bug: 207417653 Change-Id: I54c77bf7d5af57b5ab8d3a696b486c951fe79aa8
2021-11-17profcollectd: only produce profiles for /system/{bin,lib,lib64}/*Yi Kong
For now, all the PGO enabled libraries are in these directories. Filtering the profiles saves us some processing time. We can add more paths if needed in the future. Test: manual Bug: 79161490 Change-Id: Ibb992f63990deacd8dbfa8c88e6e6098b9e22ccf
2021-11-15profcollectd: Move threading to framework sideYi Kong
Previously trace processing's threading is handled on the native side while the report creation's threading is on the framework side. Move them all to the frameworks side to reduce complexity. Test: build Bug: 183487233 Change-Id: I48e6b40676b5dd90954b53a463d8ae36ad031210
2021-11-08Add profcollectd to the shell groupYi Kong
Reports are now owned by the shell group. Add profcollectd to the group to please SELinux. Test: manual Bug: 183487233 Change-Id: I8066e56ac9ced4a04594b2b4038219044722bc02
2021-08-17profcollect: Docs for processing tracesYi Kong
Test: N/A Change-Id: I9c932e0d87b5f378d16ae100fa37365fe1b625ed
2021-08-10profcollect: Add docs for profcollectYi Kong
Test: N/A Change-Id: I8c9adfd37db3d8d5badf4c142f7f0943c54da722
2021-08-03Merge "Migrate to the librustutils system property bindings."Joel Galenson
2021-07-29Fix warnings in preparation for Rust 1.54.0Chris Wailes
This CL fixes several new warnings generated by rustc 1.54.0. Bug: 194812675 Test: m rust Change-Id: I5877371b85ca3c447dc1fe53986827266b1b79c8
2021-07-29Migrate to the librustutils system property bindings.Joel Galenson
Bug: 182498247 Test: Build Change-Id: I2097a765f7ca8fceae50ed9a877272296694f622
2021-07-29profcollect: Change data directory ownership to shellYi Kong
The shell package now owns the content provider to the profcollect reports, change directory ACL groups accordingly. Test: manual Bug: 183487233 Bug: 194155753 Change-Id: I9d327a2f9e139a6d0d998284e4d7b2cdd9ea5dfc
2021-07-28Merge "Migrate profcollectd's libflags bindings from bindgen to cxx."Joel Galenson