This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: How does stap execute probe aliases?
- From: Nan Xiao <xiaonan830818 at gmail dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Mon, 23 Nov 2015 09:49:12 +0800
- Subject: Re: How does stap execute probe aliases?
- Authentication-results: sourceware.org; auth=none
- References: <CA+MhoaPAiF2zf6J=3bCP=5Dtc=60T0+_igCSZk7028kTua0y8g at mail dot gmail dot com> <y0mh9kgodj3 dot fsf at fche dot csb> <CA+MhoaN0Wc4S5r1pf+Pv-Wf8K0EdGo_F5=soK74GbRkJfXkLuA at mail dot gmail dot com> <20151121125527 dot GB8832 at redhat dot com>
Hi Frank,
Yes, the cause is that "__handle_mm_fault" probe doesn't provide $write_access
and $address.
BTW, when you mention "context variable", is it equal to "target variable"?
Thanks!
Best Regards
Nan Xiao
On Sat, Nov 21, 2015 at 8:55 PM, Frank Ch. Eigler <fche@redhat.com> wrote:
> Hi -
>
>
>> [...]
>> But executing it outputs the following error:
>>
>> # ./page_fault.stp
>> semantic error: unable to find local 'write_access', [man
>> error::dwarf] [...]
>> semantic error: failed to retrieve location attribute for 'address'
>> [man error::dwarf] (dieoffset: 0xe3b744): identifier '$address' at
>> :8:13
>> [...]
>
> It means those context variables are not available for this
> version/build of your kernel.
>
>
>> Checking the probes:
>> # stap -L 'kernel.function("__handle_mm_fault@mm/memory.c")'
>> kernel.function("__handle_mm_fault@../mm/memory.c:3752")
>> # stap -L 'kernel.function("handle_mm_fault@mm/memory.c")'
>> kernel.function("handle_mm_fault@../mm/memory.c:3832") $mm:struct
>> mm_struct* $vma:struct vm_area_struct* $address:long unsigned int
>> $flags:unsigned int
>>
>> It seems the probes all exist and OK.
>
> Yes.
>
>
>> Could you give some clues about this error? Thanks in advance!
>
> The error messages give the clue [man error::dwarf] means to run
> % man error::dwarf
> to see a man page about the issue.
>
> The basic difficulty is that writing portable, long-lived script code
> is difficult when it closely targets a rapidly moving target. This is
> mainly why the systemtap tapset exists. The community does the work
> of providing a higher level, more fixed interface (aliases, functions,
> etc.) that embody the porting logic.
>
> The part of the documentation you were looking at were related to
> learning how to write such portable tapsets. They are not meant for
> verbatim copying by end-users.
>
> If you wish to trace page faults, search through the functional examples
> first: https://sourceware.org/systemtap/examples/ - for example
> https://sourceware.org/systemtap/examples/#memory/pfaults.stp
>
>
> - FChE