This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: How does stap execute probe aliases?
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: Nan Xiao <xiaonan830818 at gmail dot com>
- Cc: systemtap at sourceware dot org
- Date: Sat, 21 Nov 2015 07:55:27 -0500
- 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>
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