This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Problem reading sys_write arguments
- From: "Akshay Shah" <aksh24 at gmail dot com>
- To: "Mike Mason" <mmlnx at us dot ibm dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Fri, 14 Sep 2007 17:38:44 -0700
- Subject: Re: Problem reading sys_write arguments
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=HEKUL/Ia8IiORm6nmu6EaWIanS/8gXhFsUcGjDhk6OQ=; b=BxMY0UXMPHJizDh9XZzkeXzTve2hMQ9r8fQFzm3DdcnbF1WhJ9Km2NvrJaXYrBscTuyK9HPEpJacznqFWF9D7BYkKk2fT1yIw+Qf+SAqhdd/NeCApZ8fA34bMfiWo55fYLBfrii+5SQEDg8RmtypGv6XMwHIgytzR6TUrJxNrlI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GW9Eeve8tq4Mi45Qg8G4rxu0Q2b7aaHzrLP8kn6bsktOnr81McfMno5oMz9js0vVWbVdKANJFE5ytVhno1ZPCYpCw4sspETXON1GpYbK3tBAl8vSWjRlw7fE6wo7yiKPFz60VfaZ+i+N9IPeh2HCGAPB3n7WaByr1RRKxOSrwF0=
- References: <db33fb320709141527v3b18f82fo9fbf645988e7ef62@mail.gmail.com> <46EB2478.2030201@us.ibm.com>
Hi Mike,
The systemtap version is systemtap-0.5.14-1 on kernel 2.6.9-34.0.1.0.11.EL.
Since you asked about architecture, it is possible that this might be
a hosted VM.
I guess it wouldn't work on VM's, would it?
The script with the sample output is pasted below.
Thanks,
Akshay
********************SCRIPT****************************
probe kernel.function("vfs_write") {
printf("write size is = %d\n", $count);
exit()
}
probe kernel.function("sys_write") {
printf("write size is = %d\n", $count);
}
************************OUTPUT***********************
Pass 1: parsed user script and 54 library script(s) in 100usr/380sys/498real ms.
Pass 2: analyzed script: 2 probe(s), 3 function(s), 0 embed(s), 0
global(s) in 80usr/330sys/407real ms.
Pass 3: translated to C into
"/tmp/stapqdE3Vs/stap_37033f56c261a739dd23bd247f347569_1168.c" in
0usr/0sys/0real ms.
Pass 4: compiled C into
"stap_37033f56c261a739dd23bd247f347569_1168.ko" in
950usr/1330sys/2364real ms.
Pass 5: starting run.
write size is = 4
write size is = 204
Pass 5: run completed in 20usr/1360sys/1533real ms.
On 9/14/07, Mike Mason <mmlnx@us.ibm.com> wrote:
> I don't see this problem when I run a script that probes sys_write and vfs_write. What systemtap version, kernel version and architecture are you using? Also, please post your script.
>
> Thanks,
> Mike
>
> Akshay Shah wrote:
> > I could not read the correct value for certain syscall arguments.
> >
> > When I tried to print the count field for a "sys_write" call, the
> > value returned is always 4. However, it prints the correct value of
> > count for a probe on "vfs_write".
> >
> > I am not sure whether I am doing something wrong in the script. It
> > just probes both functions and prints the $count value to stdout.
> >
> > Am I missing something which could result in the incorrect value? Has
> > someone seen something similar?
> >
> > Thanks,
> > Akshay
>
>