#!/bin/sh

echo 0 > /sys/kernel/debug/tracing/tracing_on
echo dpm_run_callback > /sys/kernel/debug/tracing/set_graph_function
echo dpm_prepare >> /sys/kernel/debug/tracing/set_graph_function
echo dpm_complete >> /sys/kernel/debug/tracing/set_graph_function
echo 1 > /sys/kernel/debug/tracing/events/power/device_pm_callback_start/enable
echo 1 > /sys/kernel/debug/tracing/events/power/device_pm_callback_end/enable
echo 1 > /sys/kernel/debug/tracing/tracing_on
sudo rtcwake -m mem -s 15
echo 0 > /sys/kernel/debug/tracing/tracing_on
cat /sys/kernel/debug/tracing/trace > ftrace.txt
echo "" > /sys/kernel/debug/tracing/trace
