* [Qemu-devel] [PATCH v2] tracetool: Add optional argument to specify dtrace probe names
@ 2011-02-15 12:34 Jes.Sorensen
2011-02-15 13:01 ` Stefan Hajnoczi
2011-02-17 12:16 ` [Qemu-devel] " Paolo Bonzini
0 siblings, 2 replies; 6+ messages in thread
From: Jes.Sorensen @ 2011-02-15 12:34 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 | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/scripts/tracetool b/scripts/tracetool
index e046683..b4d74ec 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -30,9 +30,11 @@ Output formats:
--stap Generate .stp file (DTrace with SystemTAP only)
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')
+ --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-prefix [prefix] Prefix for dtrace probe names
+ (default: qemu-\$targettype-\$targetarch)
EOF
exit 1
@@ -472,7 +474,7 @@ linetostap_dtrace()
# Define prototype for probe arguments
cat <<EOF
-probe qemu.$targettype.$targetarch.$name = process("$binary").mark("$name")
+probe $probeprefix.$name = process("$binary").mark("$name")
{
EOF
@@ -570,18 +572,21 @@ tracetostap()
echo "SystemTAP tapset generator not applicable to $backend backend"
exit 1
fi
- if [ -z "$binary" ]; then
+ if [ -z "$probeprefix" -a -z "$binary" ]; then
echo "--binary is required for SystemTAP tapset generator"
exit 1
fi
- if [ -z "$targettype" ]; then
+ if [ -z "$probeprefix" -a -z "$targettype" ]; then
echo "--target-type is required for SystemTAP tapset generator"
exit 1
fi
- if [ -z "$targetarch" ]; then
+ if [ -z "$probeprefix" -a -z "$targetarch" ]; then
echo "--target-arch is required for SystemTAP tapset generator"
exit 1
fi
+ if [ -z "$probeprefix" ]; then
+ probeprefix="qemu.$targettype.$targetarch";
+ fi
echo "/* This file is autogenerated by tracetool, do not edit. */"
convert stap
}
@@ -592,6 +597,7 @@ output=
binary=
targettype=
targetarch=
+probeprefix=
until [ -z "$1" ]
@@ -602,6 +608,7 @@ do
"--binary") shift ; binary="$1" ;;
"--target-arch") shift ; targetarch="$1" ;;
"--target-type") shift ; targettype="$1" ;;
+ "--probe-prefix") shift ; probeprefix="$1" ;;
"-h" | "-c" | "-d") output="${1#-}" ;;
"--stap") output="${1#--}" ;;
--
1.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] tracetool: Add optional argument to specify dtrace probe names
2011-02-15 12:34 [Qemu-devel] [PATCH v2] tracetool: Add optional argument to specify dtrace probe names Jes.Sorensen
@ 2011-02-15 13:01 ` Stefan Hajnoczi
2011-02-17 12:16 ` [Qemu-devel] " Paolo Bonzini
1 sibling, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-02-15 13:01 UTC (permalink / raw)
To: Jes.Sorensen; +Cc: qemu-devel, stefanha
On Tue, Feb 15, 2011 at 12:34 PM, <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 | 21 ++++++++++++++-------
> 1 files changed, 14 insertions(+), 7 deletions(-)
Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH v2] tracetool: Add optional argument to specify dtrace probe names
2011-02-15 12:34 [Qemu-devel] [PATCH v2] tracetool: Add optional argument to specify dtrace probe names Jes.Sorensen
2011-02-15 13:01 ` Stefan Hajnoczi
@ 2011-02-17 12:16 ` Paolo Bonzini
2011-02-17 12:19 ` Jes Sorensen
1 sibling, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2011-02-17 12:16 UTC (permalink / raw)
To: Jes.Sorensen; +Cc: qemu-devel, stefanha
On 02/15/2011 01:34 PM, Jes.Sorensen@redhat.com wrote:
> - if [ -z "$binary" ]; then
> + if [ -z "$probeprefix" -a -z "$binary" ]; then
> echo "--binary is required for SystemTAP tapset generator"
> exit 1
> fi
--binary is always required, even with --probe-prefix, since it is used for
+probe $probeprefix.$name = process("$binary").mark("$name")
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH v2] tracetool: Add optional argument to specify dtrace probe names
2011-02-17 12:16 ` [Qemu-devel] " Paolo Bonzini
@ 2011-02-17 12:19 ` Jes Sorensen
2011-02-17 12:29 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Jes Sorensen @ 2011-02-17 12:19 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, stefanha
On 02/17/11 13:16, Paolo Bonzini wrote:
> On 02/15/2011 01:34 PM, Jes.Sorensen@redhat.com wrote:
>> - if [ -z "$binary" ]; then
>> + if [ -z "$probeprefix" -a -z "$binary" ]; then
>> echo "--binary is required for SystemTAP tapset generator"
>> exit 1
>> fi
>
> --binary is always required, even with --probe-prefix, since it is used for
>
> +probe $probeprefix.$name = process("$binary").mark("$name")
>
> Paolo
The patch was acked like this upstream, so if I broke something with
this, please note it there too.
I didn't think it was necessary, but I'll check.
Thanks,
Jes
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH v2] tracetool: Add optional argument to specify dtrace probe names
2011-02-17 12:19 ` Jes Sorensen
@ 2011-02-17 12:29 ` Paolo Bonzini
2011-02-17 12:30 ` Jes Sorensen
0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2011-02-17 12:29 UTC (permalink / raw)
To: Jes Sorensen; +Cc: qemu-devel, stefanha
On 02/17/2011 01:19 PM, Jes Sorensen wrote:
> On 02/17/11 13:16, Paolo Bonzini wrote:
>> On 02/15/2011 01:34 PM, Jes.Sorensen@redhat.com wrote:
>>> - if [ -z "$binary" ]; then
>>> + if [ -z "$probeprefix" -a -z "$binary" ]; then
>>> echo "--binary is required for SystemTAP tapset generator"
>>> exit 1
>>> fi
>>
>> --binary is always required, even with --probe-prefix, since it is used for
>>
>> +probe $probeprefix.$name = process("$binary").mark("$name")
>
> if I broke something with this
No, you didn't break anything. It's just that someone patching the
Makefile like you did in 2/2 might.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH v2] tracetool: Add optional argument to specify dtrace probe names
2011-02-17 12:29 ` Paolo Bonzini
@ 2011-02-17 12:30 ` Jes Sorensen
0 siblings, 0 replies; 6+ messages in thread
From: Jes Sorensen @ 2011-02-17 12:30 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, stefanha
On 02/17/11 13:29, Paolo Bonzini wrote:
> On 02/17/2011 01:19 PM, Jes Sorensen wrote:
>> On 02/17/11 13:16, Paolo Bonzini wrote:
>>> On 02/15/2011 01:34 PM, Jes.Sorensen@redhat.com wrote:
>>>> - if [ -z "$binary" ]; then
>>>> + if [ -z "$probeprefix" -a -z "$binary" ]; then
>>>> echo "--binary is required for SystemTAP tapset generator"
>>>> exit 1
>>>> fi
>>>
>>> --binary is always required, even with --probe-prefix, since it is
>>> used for
>>>
>>> +probe $probeprefix.$name = process("$binary").mark("$name")
>>
>> if I broke something with this
>
> No, you didn't break anything. It's just that someone patching the
> Makefile like you did in 2/2 might.
>
> Paolo
Sorry for the confusion everybody, I thought I was replying to an
internal email - where I mangled a Makefile.
Please ignore the noise and consider v3 of the patch.
Thanks,
Jes
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-02-17 12:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-15 12:34 [Qemu-devel] [PATCH v2] tracetool: Add optional argument to specify dtrace probe names Jes.Sorensen
2011-02-15 13:01 ` Stefan Hajnoczi
2011-02-17 12:16 ` [Qemu-devel] " Paolo Bonzini
2011-02-17 12:19 ` Jes Sorensen
2011-02-17 12:29 ` Paolo Bonzini
2011-02-17 12:30 ` Jes Sorensen
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).