Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[e1b024]: nouveau-pm / init-trace.sh Maximize Restore History

Download this file

init-trace.sh    26 lines (21 with data), 631 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
error() {
echo "ERROR - $1"
exit 1
}
if [ $UID -ne 0 ]; then
error "The script must be run as root"
fi
# XXX: Add a check if debugfs is already mounted if it is
# - parse the information and use it
# - or unmount/mount again at the currently selected place
mount -t debugfs debugfs /sys/kernel/debug
for TRACER in `cat /sys/kernel/debug/tracing/available_tracers`
do
if test "x$TRACER" = xmmiotrace; then
echo 128000 > /sys/kernel/debug/tracing/buffer_size_kb
echo mmiotrace > /sys/kernel/debug/tracing/current_tracer
exit 0
fi
done
error "Cannot find mmiotrace in the list of available tracers"