Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot specify both -c/--config and any of --time, --size, --buffer, --app, ATRACE_CAT, FTRACE_EVENT Error #1045

Closed
gkj17 opened this issue Mar 18, 2025 · 1 comment

Comments

@gkj17
Copy link

gkj17 commented Mar 18, 2025

I followed the [https://ui.perfetto.dev/#! /record/cmdline] generated to execute it, and it reported an error [perfeto_cmd.cc:558 Cannot specify both -c/--config and any of --time, --size, --buffer, --app, ATRACE_CAT, FTRACE_EVENT]

I have already run : adb root and adb remount

detail pbtx file content is:

buffers {
size_kb: 65536
fill_policy: RING_BUFFER
}
buffers {
size_kb: 4096
fill_policy: RING_BUFFER
}
data_sources {
config {
name: "linux.ftrace"
ftrace_config {
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"
atrace_apps: "lmkd"
}
}
}
data_sources {
config {
name: "linux.process_stats"
process_stats_config {
scan_all_processes_on_start: true
}
}
}
data_sources {
config {
name: "linux.sys_stats"
sys_stats_config {
stat_period_ms: 2500
stat_counters: STAT_CPU_TIMES
stat_counters: STAT_FORK_COUNT
}
}
}
data_sources {
config {
name: "android.heapprofd"
heapprofd_config {
sampling_interval_bytes: 4096
shmem_size_bytes: 8388608
block_client: true
all_heaps: false
}
}
}
data_sources {
config {
name: "android.java_hprof"
java_hprof_config {
}
}
}
duration_ms: 10000

Image
Image

@LalitMaganti
Copy link
Collaborator

The problem is almost certainly that you are using mingw64/cygwin and --txt is being interpreted as -t.

We don't support any of our tools/commands on Cygwin. I would suggest instead following the guidance at https://perfetto.dev/docs/quickstart/android-tracing#recording-a-trace-through-the-cmdline and using the record_android_trace script which I believe should work on Cygwin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants