可参考原生atrace service修改:
/system/etc/init/atrace.rc
on property:persist.debug.atrace.boottrace=1
start boottrace
# Run atrace with the categories written in a file
#service boottrace /system/bin/atrace --async_start -f /data/misc/boottrace/categories
service boottrace /system/bin/atrace -c -b 64000 -z gfx input view sched freq wm am workq res dalvik sync disk hal rs idle mmc -t 20 -o /data/local/tmp/boot_trace
disabled
oneshot
加载查看systrace:
https://ui.perfetto.dev/#!/record/buffers