Created
August 25, 2017 12:54
-
-
Save laanwj/263ca4c61c4bbbd00cc7ff33f8a92d8d to your computer and use it in GitHub Desktop.
a20x KGSL dump cmdbuf
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
#!/bin/bash | |
# enable command stream dumping, clear kernel ringbuffer, | |
# write output to a file provided on the command line | |
# this can be converted to .rd using dmesg2rd.py from | |
# https://github.com/laanwj/freedreno/blob/master/mlog/dmesg2rd.py | |
set -e | |
if [ "$(whoami)" != "root" ]; then | |
echo "This script needs to be executed as root" | |
exit 1 | |
fi | |
function ctrl_c() { | |
echo "** Trapped CTRL-C, disabling command stream dump" | |
echo "0" > /sys/kernel/debug/kgsl/dumpcmdbufs | |
} | |
trap ctrl_c INT | |
echo "1" > /sys/kernel/debug/kgsl/dumpcmdbufs | |
dmesg -C | |
dmesg -w > "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment