summaryrefslogtreecommitdiff
path: root/stp
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-09-03 21:10:32 +0300
committerAlon Levy <alevy@redhat.com>2012-09-03 21:10:32 +0300
commit720738f07ca11465519dcce266e70c173642763f (patch)
treeacc2196cd7e1669987fb51f5e141a3b6be6a91ec /stp
parent21e3219d8d6707a135820465e2ec434398bad061 (diff)
add systam tap tests; ccid.stp, rhel6_qxl_monitors_config.sh actually tested
Diffstat (limited to 'stp')
-rw-r--r--stp/ccid.stp70
-rw-r--r--stp/qxl.stp3
-rw-r--r--stp/qxl_io_write.stp8
-rw-r--r--stp/qxl_monitors_config.stp9
-rw-r--r--stp/qxl_ring_command_check.stp3
-rwxr-xr-xstp/rhel6_qxl_monitors_config.sh5
-rw-r--r--stp/spice.stp3
-rw-r--r--stp/test.stp3
8 files changed, 104 insertions, 0 deletions
diff --git a/stp/ccid.stp b/stp/ccid.stp
new file mode 100644
index 0000000..1d06061
--- /dev/null
+++ b/stp/ccid.stp
@@ -0,0 +1,70 @@
+/*
+// This leads to unreadable probles = single_name arg1=a arg2=b
+probe process("/home/alon/spice/upstream/bin/qemu-system-x86_64").mark("ccid_*") {
+ printf("%d %s\n", pid(), $$parms);
+}
+*/
+
+/*
+probe qemu.system.x86_64.ccid_control {
+}
+
+probe qemu.system.x86_64.ccid_bulk_out {
+}
+*/
+
+probe qemu.system.x86_64.ccid_xfr_block {
+ printf("[%d]%s: %d:%d %d ", pid(), $$name, slot, seq, len);
+ for (i = 0 ; i < len ; ++i)
+ printf("%M", data + i);
+ printf("\n");
+}
+
+global ignored_81 = 0;
+
+probe qemu.system.x86_64.ccid_bulk_in_ret {
+ // ignore RDR_to_PC_SlotStatus (0x81)
+ if (type == 0x81) {
+ ignored_81++;
+ next;
+ }
+ if (ignored_81 > 0) {
+ printf("[%d]%s: ignored %d RDR_to_PC_SlotStatus\n", pid(), $$name, ignored_81);
+ ignored_81 = 0;
+ }
+ printf("[%d]%s: %d, %d, %d:%d,%d (%d..|%d|..%d/%d) ", pid(), $$name, pid, id, slot, seq, type, pos, ret, len, size);
+ for (i = 0 ; i < ret ; ++i) {
+ printf("%M", data + i);
+ }
+ printf("\n");
+}
+
+probe qemu.system.x86_64.ccid_int_in {
+ printf("[%d]%s: %d\n", pid(), $$name, slot_icc_state);
+}
+
+probe qemu.system.x86_64.ccid_icc_power_on {
+ printf("[%d]%s: %d\n", pid(), $$name, inserted);
+}
+
+probe qemu.system.x86_64.ccid_icc_power_off {
+ printf("[%d]%s: %d\n", pid(), $$name, inserted);
+}
+
+probe qemu.system.x86_64.ccid_migrate_with_bulk_in {
+ printf("[%d]%s: %d, %d\n", pid(), $$name, bulk_in_pending_start, bulk_in_pending_end);
+}
+
+probe process("/home/alon/spice/upstream/lib/libspice-server.so.1").function("spice_char_device_write_to_device") {
+ printf("[%d]spice_char_device_write_to_device\n", pid());
+}
+
+probe process("/home/alon/spice/upstream/lib/libspice-server.so.1").function("spice_char_device_read_from_device") {
+ printf("[%d]spice_char_device_read_from_device\n", pid());
+}
+
+/*
+probe qemu.system.x86_64.ccid* {
+ printf("%s %s\n", $$name, $$vars);
+}
+*/
diff --git a/stp/qxl.stp b/stp/qxl.stp
new file mode 100644
index 0000000..3e98661
--- /dev/null
+++ b/stp/qxl.stp
@@ -0,0 +1,3 @@
+probe qemu.system.x86_64.qxl* {
+ printf("%s\n", pp());
+}
diff --git a/stp/qxl_io_write.stp b/stp/qxl_io_write.stp
new file mode 100644
index 0000000..7e79d48
--- /dev/null
+++ b/stp/qxl_io_write.stp
@@ -0,0 +1,8 @@
+probe qemu.system.x86_64.qxl_io_write {
+ //printf("qid %d addr %d val %d size %d async %d\n",
+ // qid, addr, val, size, async);
+ // mode
+ printf("qid %d mode %s addr %d val %d size %d async %d\n",
+ mode,
+ qid, addr, val, size, async);
+}
diff --git a/stp/qxl_monitors_config.stp b/stp/qxl_monitors_config.stp
new file mode 100644
index 0000000..627739e
--- /dev/null
+++ b/stp/qxl_monitors_config.stp
@@ -0,0 +1,9 @@
+/*
+probe qemu.system.x86_64.qxl* {
+ printf("%s\n", pp());
+}
+*/
+
+probe qemu.kvm.qxl_spice_monitors_config {
+ printf("[%d]%s(%d): %p\n", pid(), $$name, id, monitors_config);
+}
diff --git a/stp/qxl_ring_command_check.stp b/stp/qxl_ring_command_check.stp
new file mode 100644
index 0000000..2c5805d
--- /dev/null
+++ b/stp/qxl_ring_command_check.stp
@@ -0,0 +1,3 @@
+probe qemu.system.x86_64.qxl_ring_command_check {
+ printf("qid %d mode %s", qid, mode);
+}
diff --git a/stp/rhel6_qxl_monitors_config.sh b/stp/rhel6_qxl_monitors_config.sh
new file mode 100755
index 0000000..a61d919
--- /dev/null
+++ b/stp/rhel6_qxl_monitors_config.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# /home/alon/spice/rhel6/share/systemtap/tapset/qemu-system-x86_64.stp
+
+sudo stap -I/home/alon/spice/rhel6/share/systemtap/tapset/ qxl_monitors_config.stp
diff --git a/stp/spice.stp b/stp/spice.stp
new file mode 100644
index 0000000..5a6414d
--- /dev/null
+++ b/stp/spice.stp
@@ -0,0 +1,3 @@
+probe process("/store/upstream/bin/spicec").function("*@red_channel.c") {
+ printf("%s %d %s\n", execname(), pid(), pp());
+}
diff --git a/stp/test.stp b/stp/test.stp
new file mode 100644
index 0000000..4021121
--- /dev/null
+++ b/stp/test.stp
@@ -0,0 +1,3 @@
+probe process("/home/alon/upstream/bin/qemu-system-x86_64").function("ioport_write@qxl.c") {
+ printf("%s %d %s\n", execname(), pid(), pp());
+}