diff options
author | 2022-10-27 12:46:17 +0200 | |
---|---|---|
committer | 2022-10-29 11:21:15 +0200 | |
commit | a6a1932afdd62b64d7f61a0caa25f31df641e357 (patch) | |
tree | 1b3155ef9349e40fa3cdb6db687f0b2d79e05d9c /perfetto_config.pbtx | |
parent | a98e6c7cff4c6f50b9dc5dbe3014a302d751255e (diff) |
Refresh MediaProvider's ATrace events
Add new ATrace events to PickerDataLayer, PickerSyncController and
PickerDbFacade.
Add prefixes to existing ATrace events on MediaProvider, MediaService,
DatabaseUtils, ModernMediaScanner etc.
Update trance.sh script to use Perfetto instead of de facto deprecated
systrace tool (Perfetto is recommended for devices running Android 10
and higher).
Add Perfetto tracing config file perfetto_config.pbtx.
Bug: 253186784
Test: m and install MediaProvider APEX
Test: ./trace.sh
Change-Id: Ib043068378ac3f85bb55a765b57c4eed7e4a8f31
Diffstat (limited to 'perfetto_config.pbtx')
-rw-r--r-- | perfetto_config.pbtx | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/perfetto_config.pbtx b/perfetto_config.pbtx new file mode 100644 index 000000000..ee6395d7d --- /dev/null +++ b/perfetto_config.pbtx @@ -0,0 +1,87 @@ +buffers: { + size_kb: 63488 + fill_policy: DISCARD +} +buffers: { + size_kb: 2048 + fill_policy: DISCARD +} + +data_sources: { + config { + name: "linux.ftrace" + + # See: https://perfetto.dev/docs/data-sources/atrace#traceconfig + ftrace_config { + ftrace_events: "ftrace/print" + + # Trace all ContentProvider commands and SQLite queries. + # See: https://source.corp.google.com/android-internal/frameworks/base/core/java/android/os/Trace.java?q=TRACE_TAG_DATABASE + # See: https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/android/database/sqlite/SQLiteConnection.java + # Uncomment to enable. Note: on a userdebug build it will add a trace for every SQLite + # command any application runs, which will make a trace very "noisy". + # atrace_categories: "database" + + # Trace Binder IPC transactions. + # Uncomment to enable. Note: on a userdebug build it will add a trace for every Binder + # transaction for every application, which will make a trace very "noisy". + # atrace_categories: "binder_driver" + + # ActivityManager, WindowManager, Graphics, View System. + # Uncomment to enable. Note: on a userdebug build it will traces form corresponding + # category for every application, which will make a trace very "noisy". + # atrace_categories: "wm" + # atrace_categories: "am" + # atrace_categories: "gfx" + # atrace_categories: "view" + + # Trace MediaProviders' events. + atrace_apps: "com.android.providers.media.module" + atrace_apps: "com.google.android.providers.media.module" + + # Trace Google Photos' events. + # Uncomment to enable. + # atrace_apps: "com.google.android.apps.photos" + + # Trace all apps' events. + # Uncomment to enable. + # atrace_apps: "*" + } + } +} + +# Android Logcat +data_sources: { + config { + name: "android.log" + android_log_config { + min_prio: PRIO_VERBOSE # Default: PRIO_DEBUG + + # If filter_tags non-empty ignores all log messages whose tag doesn't match one of the + # specified values. + # filter_tags: "MediaProvider" + # filter_tags: "PickerDataLayer" + # filter_tags: "PickerDbFacade" + # filter_tags: "PickerSyncController" + + log_ids: LID_EVENTS + log_ids: LID_CRASH + log_ids: LID_KERNEL + log_ids: LID_DEFAULT + log_ids: LID_RADIO + log_ids: LID_SECURITY + log_ids: LID_STATS + log_ids: LID_SYSTEM + } + } +} + +# This is for getting Thread<>Process associations and full process names. +data_sources: { + config { + name: "linux.process_stats" + } +} + +# Max duration: 1 min +duration_ms: 60000 |