This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How does stap execute probe aliases?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]