Hi,
I am trying to capture a long perfetto trace with this config file
buffers {
size_kb: 32768
fill_policy: DISCARD
}
buffers {
size_kb: 32768
fill_policy: DISCARD
}
data_sources {
config {
name: "linux.ftrace"
target_buffer: 0
ftrace_config {
symbolize_ksyms: true
atrace_categories: "res"
atrace_categories: "workq"
atrace_categories: "webview"
atrace_categories: "memory"
atrace_categories: "idle"
atrace_categories: "dalvik"
atrace_categories: "freq"
atrace_categories: "am"
atrace_categories: "sync"
atrace_categories: "network"
atrace_categories: "binder_driver"
atrace_categories: "input"
atrace_categories: "hal"
atrace_categories: "disk"
atrace_categories: "view"
atrace_categories: "sched"
atrace_categories: "wm"
atrace_categories: "thermal"
atrace_categories: "gfx"
atrace_categories: "power"
atrace_categories: "camera"
atrace_categories: "aidl"
atrace_categories: "memreclaim"
atrace_apps: "*"
compact_sched {
enabled: true
}
#buffer_size_kb: 8192
#drain_period_ms: 1000
buffer_size_kb: 16384
drain_period_ms: 250
}
}
}
data_sources {
config {
name: "android.gpu.memory"
target_buffer: 0
}
}
data_sources {
config {
name: "linux.process_stats"
target_buffer: 1
process_stats_config {
proc_stats_poll_ms: 60000
}
}
}
data_sources {
config {
name: "android.power"
target_buffer: 1
android_power_config {
battery_poll_ms: 1000
collect_power_rails: true
battery_counters: BATTERY_COUNTER_CAPACITY_PERCENT
battery_counters: BATTERY_COUNTER_CHARGE
battery_counters: BATTERY_COUNTER_CURRENT
}
}
}
data_sources {
config {
name: "android.sys_stats"
target_buffer: 1
sys_stats_config {
vmstat_period_ms: 1000
}
}
}
data_sources {
config {
name: "android.surfaceflinger.frametimeline"
}
}
data_sources {
config {
name: "android.hardware.camera"
target_buffer: 1
}
}
data_sources {
config {
name: "org.chromium.trace_event"
chrome_config {
trace_config: "{\"record_mode\":\"record-continuously\",\"included_categories\":[\"*\"]}"
}
}
}
data_sources {
config {
name: "org.chromium.trace_metadata"
chrome_config {
trace_config: "{\"record_mode\":\"record-continuously\",\"included_categories\":[\"*\"]}"
}
}
}
enable_extra_guardrails: false
statsd_metadata {
}
write_into_file: true
file_write_period_ms: 2500
flush_period_ms: 10000
notify_traceur: true
trace_uuid_msb: 771211190659565185
trace_uuid_lsb: -7906795730165107342
But when I run this with command cat android_default.pbtx | adb shell perfetto -c - --txt --background -o long on the phone and give some events, after I get this
ory_arbiter_impl.cc:192 Shared memory buffer overrun! Stalling
information log on the Logcat, no tracing after that time is recorded into the trace. The trace itself shows the full timeline (2 mins), but the trace after that log has occurred (30s in), no trace is recorded, as shown in the image below.
1. Is there a problem with my trace config setup that is causing this error?
2. I assume that increasing my shmem size would be a workaround for this issue. would changing the kDefaultShmSize in perfetto/include/perfetto/ext/tracing/core/tracing_service.h
be enough? If so, is there any other easier way to achieve this without having to rebuild perfetto?