summaryrefslogtreecommitdiff
path: root/profcollectd
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2021-08-07 03:08:57 +0800
committerYi Kong <yikong@google.com>2021-08-10 00:42:20 +0000
commitd206a1f24f616201c7317f781d6542849dcc3544 (patch)
tree45f562572fcad155c64c8fc4ce597bebeb7883ff /profcollectd
parent09384d5b0be7bbc49c2539b7663bdf79b05c64fb (diff)
downloadextras-d206a1f24f616201c7317f781d6542849dcc3544.tar.gz
profcollect: Add docs for profcollect
Test: N/A Change-Id: I8c9adfd37db3d8d5badf4c142f7f0943c54da722
Diffstat (limited to 'profcollectd')
-rw-r--r--profcollectd/README.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/profcollectd/README.md b/profcollectd/README.md
new file mode 100644
index 00000000..a0ce4024
--- /dev/null
+++ b/profcollectd/README.md
@@ -0,0 +1,41 @@
+# Profcollect
+
+Profcollect is a system daemon that facilitates sampling profile collection and reporting for native
+platform applications.
+
+Profcollect can only be enabled on `userdebug` or `eng` builds.
+
+## Supported platforms
+
+Currently Profcollect only supports collecting profiles from Coresight ETM enabled ARM devices.
+
+Instructions to enable Coresight ETM can be found from the
+[simpleperf manual](https://android.googlesource.com/platform/system/extras/+/refs/heads/master/simpleperf/doc/collect_etm_data_for_autofdo.md).
+
+## Usage
+
+Profcollect has two components: `profcollectd`, the system daemon, and `profcollectctl`, the command
+line interface.
+
+### Collection
+
+`profcollectd` can be started from `adb` directly (under root), or automatically on system boot by
+setting system property through:
+
+```
+adb shell device_config put profcollect_native_boot enabled true
+```
+
+Profcollect collects profiles periodically, as well as through triggers like app launch events. Only
+a percentage of these events result in a profile collection to avoid using too much resource, these
+are controlled by the following configurations:
+
+| Event | Config |
+|------------|------------------------|
+| App launch | applaunch\_trace\_freq |
+
+Setting the frequency value to `0` disables collection for the corresponding event.
+
+### Reporting
+
+*In development*