summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGopinath Elanchezhian <gelanchezhian@google.com>2024-03-12 16:55:08 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-03-12 16:55:08 +0000
commita9c43c7adbcb1f2016d80e933071d509b5e51cbf (patch)
treebc13f8e9d13d8049a6a8743668d2816cbc130622
parentc58fcbf01223e1f6aec99fe7ee896f699f15520a (diff)
parent12eb3007aa7aa4b53c0e0c6539aaa116898c6d34 (diff)
downloadtools-a9c43c7adbcb1f2016d80e933071d509b5e51cbf.tar.gz
Merge "Add boot trace configs." into main
-rw-r--r--linux-x86_64/perfetto/Android.bp3
-rw-r--r--linux-x86_64/perfetto/configs/trace_config_boot_time.textproto109
-rw-r--r--linux-x86_64/perfetto/configs/trace_config_boot_time_stop.textproto15
-rw-r--r--linux-x86_64/perfetto/configs/trace_config_post_boot.textproto102
4 files changed, 229 insertions, 0 deletions
diff --git a/linux-x86_64/perfetto/Android.bp b/linux-x86_64/perfetto/Android.bp
index 0db5a0323..ef42303a6 100644
--- a/linux-x86_64/perfetto/Android.bp
+++ b/linux-x86_64/perfetto/Android.bp
@@ -22,6 +22,9 @@ filegroup {
srcs: ["trace_processor_shell",
"configs/trace_config_detailed.textproto",
"configs/trace_config_detailed_heapdump.textproto",
+ "configs/trace_config_post_boot.textproto",
+ "configs/trace_config_boot_time.textproto",
+ "configs/trace_config_boot_time_stop.textproto",
"configs/long_trace_config.textproto",
"configs/long_trace_binder_config.textproto"],
}
diff --git a/linux-x86_64/perfetto/configs/trace_config_boot_time.textproto b/linux-x86_64/perfetto/configs/trace_config_boot_time.textproto
new file mode 100644
index 000000000..9fd277f16
--- /dev/null
+++ b/linux-x86_64/perfetto/configs/trace_config_boot_time.textproto
@@ -0,0 +1,109 @@
+# Copyright (C) 2024 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+buffers: {
+ size_kb: 204800
+ fill_policy: RING_BUFFER
+}
+buffers: {
+ size_kb: 204800
+ fill_policy: RING_BUFFER
+}
+data_sources: {
+ config {
+ name: "linux.process_stats"
+ target_buffer: 1
+ process_stats_config {
+ scan_all_processes_on_start: true
+ }
+ }
+}
+data_sources: {
+ config {
+ name: "android.surfaceflinger.frametimeline"
+ }
+}
+data_sources: {
+ config {
+ name: "linux.ftrace"
+ ftrace_config {
+ ftrace_events: "sched/sched_switch"
+ ftrace_events: "power/suspend_resume"
+ ftrace_events: "sched/sched_wakeup"
+ ftrace_events: "sched/sched_wakeup_new"
+ ftrace_events: "sched/sched_waking"
+ ftrace_events: "power/cpu_frequency"
+ ftrace_events: "power/cpu_idle"
+ ftrace_events: "mm_event/mm_event_record"
+ ftrace_events: "kmem/rss_stat"
+ ftrace_events: "ion/ion_stat"
+ ftrace_events: "dmabuf_heap/dma_heap_stat"
+ ftrace_events: "kmem/ion_heap_grow"
+ ftrace_events: "kmem/ion_heap_shrink"
+ ftrace_events: "sched/sched_process_exit"
+ ftrace_events: "sched/sched_process_free"
+ ftrace_events: "task/task_newtask"
+ ftrace_events: "task/task_rename"
+ ftrace_events: "lowmemorykiller/lowmemory_kill"
+ ftrace_events: "oom/oom_score_adj_update"
+ ftrace_events: "sched/sched_blocked_reason"
+ ftrace_events: "workqueue/*"
+ ftrace_events: "f2fs/f2fs_iostat"
+ ftrace_events: "vmscan/*"
+ ftrace_events: "ftrace/print"
+ ftrace_events: "power/wakeup_source_activate"
+ ftrace_events: "power/wakeup_source_deactivate"
+ atrace_categories: "aidl"
+ atrace_categories: "am"
+ atrace_categories: "dalvik"
+ atrace_categories: "binder_driver"
+ atrace_categories: "bionic"
+ atrace_categories: "camera"
+ atrace_categories: "gfx"
+ atrace_categories: "hal"
+ atrace_categories: "input"
+ atrace_categories: "network"
+ atrace_categories: "pm"
+ atrace_categories: "power"
+ atrace_categories: "res"
+ atrace_categories: "sm"
+ atrace_categories: "ss"
+ atrace_categories: "video"
+ atrace_categories: "view"
+ atrace_categories: "wm"
+ atrace_apps: "lmkd"
+ atrace_apps: "*"
+ buffer_size_kb: 16384
+ drain_period_ms: 250
+ symbolize_ksyms: true
+ preserve_ftrace_buffer: true
+ }
+ }
+}
+# 40s trace, but can be stopped prematurely via `adb shell pkill perfetto`.
+file_write_period_ms: 5000
+max_file_size_bytes: 1000000000
+flush_period_ms: 30000
+incremental_state_config {
+ clear_period_ms: 5000
+}
+
+trigger_config {
+ trigger_mode: STOP_TRACING
+ triggers {
+ name: "boottrace_boot_completed"
+ stop_delay_ms: 15000
+ }
+ trigger_timeout_ms: 100000
+}
diff --git a/linux-x86_64/perfetto/configs/trace_config_boot_time_stop.textproto b/linux-x86_64/perfetto/configs/trace_config_boot_time_stop.textproto
new file mode 100644
index 000000000..c96e78149
--- /dev/null
+++ b/linux-x86_64/perfetto/configs/trace_config_boot_time_stop.textproto
@@ -0,0 +1,15 @@
+# Copyright (C) 2024 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+activate_triggers: "boottrace_boot_completed"
diff --git a/linux-x86_64/perfetto/configs/trace_config_post_boot.textproto b/linux-x86_64/perfetto/configs/trace_config_post_boot.textproto
new file mode 100644
index 000000000..77536cfec
--- /dev/null
+++ b/linux-x86_64/perfetto/configs/trace_config_post_boot.textproto
@@ -0,0 +1,102 @@
+# Copyright (C) 2024 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+buffers: {
+ size_kb: 204800
+ fill_policy: RING_BUFFER
+}
+buffers: {
+ size_kb: 204800
+ fill_policy: RING_BUFFER
+}
+data_sources: {
+ config {
+ name: "linux.process_stats"
+ target_buffer: 1
+ process_stats_config {
+ scan_all_processes_on_start: true
+ }
+ }
+}
+data_sources: {
+ config {
+ name: "android.surfaceflinger.frametimeline"
+ }
+}
+data_sources: {
+ config {
+ name: "linux.ftrace"
+ ftrace_config {
+ ftrace_events: "sched/sched_switch"
+ ftrace_events: "power/suspend_resume"
+ ftrace_events: "sched/sched_wakeup"
+ ftrace_events: "sched/sched_wakeup_new"
+ ftrace_events: "sched/sched_waking"
+ ftrace_events: "power/cpu_frequency"
+ ftrace_events: "power/cpu_idle"
+ ftrace_events: "mm_event/mm_event_record"
+ ftrace_events: "kmem/rss_stat"
+ ftrace_events: "ion/ion_stat"
+ ftrace_events: "dmabuf_heap/dma_heap_stat"
+ ftrace_events: "kmem/ion_heap_grow"
+ ftrace_events: "kmem/ion_heap_shrink"
+ ftrace_events: "sched/sched_process_exit"
+ ftrace_events: "sched/sched_process_free"
+ ftrace_events: "task/task_newtask"
+ ftrace_events: "task/task_rename"
+ ftrace_events: "lowmemorykiller/lowmemory_kill"
+ ftrace_events: "oom/oom_score_adj_update"
+ ftrace_events: "sched/sched_blocked_reason"
+ ftrace_events: "workqueue/*"
+ ftrace_events: "f2fs/f2fs_iostat"
+ ftrace_events: "vmscan/*"
+ ftrace_events: "ftrace/print"
+ ftrace_events: "power/wakeup_source_activate"
+ ftrace_events: "power/wakeup_source_deactivate"
+ atrace_categories: "aidl"
+ atrace_categories: "am"
+ atrace_categories: "dalvik"
+ atrace_categories: "binder_driver"
+ atrace_categories: "bionic"
+ atrace_categories: "camera"
+ atrace_categories: "gfx"
+ atrace_categories: "hal"
+ atrace_categories: "input"
+ atrace_categories: "network"
+ atrace_categories: "pm"
+ atrace_categories: "power"
+ atrace_categories: "res"
+ atrace_categories: "sm"
+ atrace_categories: "ss"
+ atrace_categories: "video"
+ atrace_categories: "view"
+ atrace_categories: "wm"
+ atrace_apps: "lmkd"
+ atrace_apps: "*"
+ buffer_size_kb: 16384
+ drain_period_ms: 250
+ symbolize_ksyms: true
+ preserve_ftrace_buffer: true
+ }
+ }
+}
+# 40s trace, but can be stopped prematurely via `adb shell pkill perfetto`.
+write_into_file: true
+duration_ms: 241000
+file_write_period_ms: 5000
+max_file_size_bytes: 1000000000
+flush_period_ms: 30000
+incremental_state_config {
+ clear_period_ms: 5000
+}