[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory
From: |
Alon Levy |
Subject: |
Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory |
Date: |
Tue, 28 May 2013 08:33:05 -0400 |
On Tue, 2013-05-28 at 14:18 +0200, Paolo Bonzini wrote:
> Il 28/05/2013 14:09, Alon Levy ha scritto:
> >>> + --probe-prefix=qemu.local \
> >>
> >> Why change the prefix?
> >
> > It was one way to verify I was using the correct file. I'll change it
> > back.
> >
> > But in general does it make sense for you to have this in addition to
> > the existing stp file?
>
> I think it does (with the same prefix so that you can share the
> scripts). But I'm not sure how you'd use it. :) Can you show an
> example and also put it in the commit message?
I though it would be useful to have a bunch of scripts for developers. I
have the following (didn't fix yet to use the same prefix):
diff --git a/scripts/stap-qxl-generic b/scripts/stap-qxl-generic
new file mode 100755
index 0000000..1c21911
--- /dev/null
+++ b/scripts/stap-qxl-generic
@@ -0,0 +1,4 @@
+#!/bin/bash -x
+STP=$0.stp
+ROOT=`dirname $0`/../
+sudo stap -v -I $ROOT/x86_64-softmmu $STP
diff --git a/scripts/stap-qxl-generic.stp b/scripts/stap-qxl-generic.stp
new file mode 100644
index 0000000..e201e69
--- /dev/null
+++ b/scripts/stap-qxl-generic.stp
@@ -0,0 +1,24 @@
+probe begin { printf("starting qxl generic probe\n") }
+
+global call, threads
+
+probe qemu.local.qxl* {
+ //printf("%d: %s: %s\n", tid(), pp(), $$vars)
+ //print_ubacktrace()
+ call[tid(), probefunc()] <<< 1
+ threads[tid()] <<< 1
+}
+
+probe timer.s(%( $# > 0 %? $1 %: 5 %)) {
+ ansi_clear_screen()
+ printf("%10s %45s %s\n", "TID", "", "HITS");
+ foreach([t] in threads-) {
+ printf("%10d %45s %d\n", t, "", @count(threads[t]));
+ }
+ printf("%10s %45s %s\n",
+ "TID", "CALL", "HITS")
+ foreach([tid, name] in call-) {
+ printf("%10d %45s %d\n", tid, name,
+ @count(call[tid, name]))
+ }
+}
>
> Paolo
>
>
- [Qemu-devel] [RFC] Add a stp file for usage from build directory, Alon Levy, 2013/05/26
- Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory, Paolo Bonzini, 2013/05/27
- Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory, Alon Levy, 2013/05/28
- Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory, Paolo Bonzini, 2013/05/28
- Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory,
Alon Levy <=
- Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory, Paolo Bonzini, 2013/05/28
- Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory, Alon Levy, 2013/05/28
- Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory, Alon Levy, 2013/05/28
- Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory, Paolo Bonzini, 2013/05/28
- Re: [Qemu-devel] [RFC] Add a stp file for usage from build directory, Stefan Hajnoczi, 2013/05/28