Added a useful dtrace script for listing all GLK calls made
authorMarijn van Vliet <w.m.vanvliet@student.utwente.nl>
Wed, 27 Apr 2011 11:59:50 +0000 (13:59 +0200)
committerMarijn van Vliet <w.m.vanvliet@student.utwente.nl>
Wed, 27 Apr 2011 11:59:50 +0000 (13:59 +0200)
tests/dtrace/list_glk_calls.d [new file with mode: 0644]
tests/dtrace/readme.txt [new file with mode: 0644]

diff --git a/tests/dtrace/list_glk_calls.d b/tests/dtrace/list_glk_calls.d
new file mode 100644 (file)
index 0000000..a25378a
--- /dev/null
@@ -0,0 +1,5 @@
+pid$target:libchimara:glk*:entry
+/probefunc != "glk_tick" && stackdepth == 0/
+{
+       printf("%d %s(0x%X, 0x%X, 0x%X)\t\t\n",stackdepth,probefunc,arg0,arg1,arg2);
+}
diff --git a/tests/dtrace/readme.txt b/tests/dtrace/readme.txt
new file mode 100644 (file)
index 0000000..ad5b4cf
--- /dev/null
@@ -0,0 +1,6 @@
+This directory contains some useful dtrace scripts to help with debugging.
+
+Example usage:
+sudo dtrace -s <script_name> -c <program_name>
+
+list_glk_calls.d       Lists all calls make to the chimara GLK library and their arguments.