-
-
Save x2c3z4/2e1eedc06c8550fa5498f84fa6163428 to your computer and use it in GitHub Desktop.
How to run a daemon and collect ftrace from it. (The example is mm-qcamera-daemon)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/system/bin/sh | |
echo 'function_graph' >/sys/kernel/debug/tracing/current_tracer | |
echo 96000 > /d/tracing/buffer_size_kb | |
echo $$ > /sys/kernel/debug/tracing/set_ftrace_pid | |
echo 1 > /sys/kernel/debug/tracing/tracing_on | |
( | |
sleep 10 # stop tracing after this second. | |
echo 0 > /sys/kernel/debug/tracing/tracing_on | |
cat /sys/kernel/debug/tracing/trace >/data/local/tmp/strace/qcamerasvr.ftrace | |
echo 'nop' >/sys/kernel/debug/tracing/current_tracer | |
) & | |
exec /system/bin/mm-qcamera-daemon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment