Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea7990d0 authored by Lisa (LeeWei) Liu's avatar Lisa (LeeWei) Liu Committed by Android (Google) Code Review
Browse files

Merge "atrace: support boot trace"

parents 987d8737 ee505511
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -300,6 +300,12 @@ on late-init
    chmod 0666 /sys/kernel/debug/tracing/events/kmem/rss_stat/trigger
    chmod 0666 /sys/kernel/tracing/events/kmem/rss_stat/trigger

on late-init && property:ro.boot.fastboot.boottrace=enabled
    setprop debug.atrace.tags.enableflags 802922
    setprop persist.traced.enable 0
    write /sys/kernel/debug/tracing/tracing_on 1
    write /sys/kernel/tracing/tracing_on 1

# Only create the tracing instance if persist.mm_events.enabled
# Attempting to remove the tracing instance after it has been created
# will likely fail with EBUSY as it would be in use by traced_probes.
@@ -395,3 +401,10 @@ on property:persist.debug.atrace.boottrace=1
service boottrace /system/bin/atrace --async_start -f /data/misc/boottrace/categories
    disabled
    oneshot

on property:sys.boot_completed=1 && property:ro.boot.fastboot.boottrace=enabled
    setprop debug.atrace.tags.enableflags 0
    setprop persist.traced.enable 1
    write /sys/kernel/debug/tracing/tracing_on 0
    write /sys/kernel/tracing/tracing_on 0