diff options
author | Alon Levy <alevy@redhat.com> | 2012-09-12 21:05:52 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-09-12 21:05:52 +0300 |
commit | ff7d86319d92e823dc6085605d9e67f9b899c699 (patch) | |
tree | 1163757c8231fa4027588810b6c4e22dc6017432 | |
parent | 3cf4f742012bd534b91ccc1136fc61d81119af1a (diff) |
qxl_monitors_config.stp: add io log, use string functions
-rwxr-xr-x | stp/qxl_monitors_config.sh | 4 | ||||
-rw-r--r-- | stp/qxl_monitors_config.stp | 42 |
2 files changed, 20 insertions, 26 deletions
diff --git a/stp/qxl_monitors_config.sh b/stp/qxl_monitors_config.sh index 1ab005a..f27cea8 100755 --- a/stp/qxl_monitors_config.sh +++ b/stp/qxl_monitors_config.sh @@ -2,4 +2,6 @@ # /home/alon/spice/rhel6/share/systemtap/tapset/qemu-system-x86_64.stp -sudo stap -v -s1 -I/home/alon/spice/upstream/share/systemtap/tapset -I/home/alon/spice/rhel6/share/systemtap/tapset/ qxl_monitors_config.stp +OUTPUT=/tmp/qxl_monitors_config.log + +sudo stap -v -s1 -I/home/alon/spice/upstream/share/systemtap/tapset -I/home/alon/spice/rhel6/share/systemtap/tapset/ qxl_monitors_config.stp 2>&1 | tee $OUTPUT diff --git a/stp/qxl_monitors_config.stp b/stp/qxl_monitors_config.stp index 6cac565..bd13d7f 100644 --- a/stp/qxl_monitors_config.stp +++ b/stp/qxl_monitors_config.stp @@ -1,14 +1,6 @@ /* by expected order of events */ -function printcaps(caps_size, caps) -{ - for (i = 0 ; i < caps_size; ++i) { - printf("%02x ", @cast(caps, "uint8_t")[i]); - } - printf("\n"); -} - -probe process("/home/alon/spice/upstream/lib/libspice-server.so.1.4.0").function("red_dispatcher_client_monitors_config") { +probe process("/home/alon/spice/upstream/lib/libspice-server.so.1.5.0").function("red_dispatcher_client_monitors_config") { printf("[%d]red_dispatcher_client_monitors_config\n", pid()); for (i = 0 ; i < $monitors_config->num_of_monitors ; ++i) { printf(" %dx%d+%d+%d\n", @@ -19,21 +11,28 @@ probe process("/home/alon/spice/upstream/lib/libspice-server.so.1.4.0").function } } -probe qemu.system.x86_64.qxl_io_capabilities_set +probe qemu.system.x86_64.qxl_client_monitors_config_crc { - printf("[%d]%s(%d) ", pid(), $$name, qid); - printcaps(caps_size, caps); + printf("[%d]%s(%d): %X (%d)\n", pid(), $$name, qid, crc32, size); } -probe qemu.system.x86_64.qxl_spice_monitors_config, - qemu.system.x86_64.qxl_io_client_monitors_config_done +probe qemu.system.x86_64.qxl_io_log +{ + s = user_string(log_buf); + if (!isinstr(s, "crc")) { + //next; + } + printf("[%d]%s(%d): %s\n", pid(), $$name, qid, s); +} + +probe qemu.system.x86_64.qxl_spice_monitors_config { printf("[%d]%s(%d)\n", pid(), $$name, qid); } -probe qemu.system.x86_64.qxl_clients_monitors_config_unsupported_by_guest +probe qemu.system.x86_64.qxl_client_monitors_config_unsupported_by_guest { - printf("[%d]%s %p", pid(), $$name, client_monitors_config); + printf("[%d]%s int_mask=%X", pid(), $$name, int_mask); } probe qemu.system.x86_64.qxl_interrupt_client_monitors_config @@ -55,12 +54,12 @@ probe qemu.system.x86_64.qxl_io_unexpected_vga_mode probe qemu.system.x86_64.qxl_io_write { - if (addr != 4) { + if (addr != 4 && addr != 7 && addr != 3) { printf("[%d]%s %lx=%lu\n", pid(), $$name, addr, val); } } -probe process("/home/alon/spice/upstream/lib/libspice-server.so.1.4.0").function("red_marshall_monitors_config") +probe process("/home/alon/spice/upstream/lib/libspice-server.so.1.5.0").function("red_marshall_monitors_config") { printf("[%d]spice red_marshall_monitors_config: %d\n", pid(), $monitors_config->count); @@ -72,10 +71,3 @@ probe process("/home/alon/spice/upstream/lib/libspice-server.so.1.4.0").function $monitors_config->heads[i]->y); } } - -probe process("/home/alon/spice/upstream/lib/libspice-server.so.1.4.0").function("spice_qxl_guest_capabilities_set") -{ - printf("[%d]spice_qxl_guest_capabilities_set: \n", pid()); - //printcaps($dispatcher->guest_capabilities_size, $dispatcher->guest_capabilities); - printcaps($caps_length, $new_caps); -} |