qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tracetool: Add optional argument to specify dtrace probe names
@ 2011-02-15 10:10 Jes.Sorensen
  2011-02-15 11:33 ` [Qemu-devel] " Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Jes.Sorensen @ 2011-02-15 10:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Optional feature allowing a user to generate the probe list to match
the name of the binary, in case they wish to install qemu under a
different name than qemu-{system,user},<arch>

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 scripts/tracetool |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/scripts/tracetool b/scripts/tracetool
index e046683..0200afa 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -33,6 +33,7 @@ Options:
   --binary      [path]  Full path to QEMU binary
   --target-arch [arch]  QEMU emulator target arch
   --target-type [type]  QEMU emulator target type ('system' or 'user')
+  --probe-name  [name]  Specify alternative name for dtrace probes
 
 EOF
     exit 1
@@ -472,7 +473,7 @@ linetostap_dtrace()
 
     # Define prototype for probe arguments
     cat <<EOF
-probe qemu.$targettype.$targetarch.$name = process("$binary").mark("$name")
+probe $probename.$name = process("$binary").mark("$name")
 {
 EOF
 
@@ -570,18 +571,21 @@ tracetostap()
        echo "SystemTAP tapset generator not applicable to $backend backend"
        exit 1
     fi
-    if [ -z "$binary" ]; then
+    if [ -z "$probename" -a -z "$binary" ]; then
        echo "--binary is required for SystemTAP tapset generator"
        exit 1
     fi
-    if [ -z "$targettype" ]; then
+    if [ -z "$probename" -a -z "$targettype" ]; then
        echo "--target-type is required for SystemTAP tapset generator"
        exit 1
     fi
-    if [ -z "$targetarch" ]; then
+    if [ -z "$probename" -a -z "$targetarch" ]; then
        echo "--target-arch is required for SystemTAP tapset generator"
        exit 1
     fi
+    if [ -z "$probename" ]; then
+	probename="qemu.$targettype.$targetarch";
+    fi
     echo "/* This file is autogenerated by tracetool, do not edit. */"
     convert stap
 }
@@ -592,6 +596,7 @@ output=
 binary=
 targettype=
 targetarch=
+probename=
 
 
 until [ -z "$1" ]
@@ -602,6 +607,7 @@ do
     "--binary") shift ; binary="$1" ;;
     "--target-arch") shift ; targetarch="$1" ;;
     "--target-type") shift ; targettype="$1" ;;
+    "--probe-name") shift ; probename="$1" ;;
 
     "-h" | "-c" | "-d") output="${1#-}" ;;
     "--stap") output="${1#--}" ;;
-- 
1.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Qemu-devel] Re: [PATCH] tracetool: Add optional argument to specify dtrace probe names
  2011-02-15 10:10 [Qemu-devel] [PATCH] tracetool: Add optional argument to specify dtrace probe names Jes.Sorensen
@ 2011-02-15 11:33 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2011-02-15 11:33 UTC (permalink / raw)
  To: Jes.Sorensen; +Cc: qemu-devel

On Tue, Feb 15, 2011 at 11:10:22AM +0100, Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen <Jes.Sorensen@redhat.com>
> 
> Optional feature allowing a user to generate the probe list to match
> the name of the binary, in case they wish to install qemu under a
> different name than qemu-{system,user},<arch>
> 
> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
> ---
>  scripts/tracetool |   14 ++++++++++----
>  1 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/tracetool b/scripts/tracetool
> index e046683..0200afa 100755
> --- a/scripts/tracetool
> +++ b/scripts/tracetool
> @@ -33,6 +33,7 @@ Options:
>    --binary      [path]  Full path to QEMU binary
>    --target-arch [arch]  QEMU emulator target arch
>    --target-type [type]  QEMU emulator target type ('system' or 'user')
> +  --probe-name  [name]  Specify alternative name for dtrace probes

It's not obvious to me what --probe-name does given this description.
How about:

--probe-prefix [prefix]  Prefix for dtrace probe names (default: qemu-$targettype-$targetarch)

Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-15 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-15 10:10 [Qemu-devel] [PATCH] tracetool: Add optional argument to specify dtrace probe names Jes.Sorensen
2011-02-15 11:33 ` [Qemu-devel] " Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).