From: Nan Xiao <xiaonan830818@gmail.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: How does stap execute probe aliases?
Date: Mon, 23 Nov 2015 01:49:00 -0000 [thread overview]
Message-ID: <CA+MhoaN2v23BMW1fqVk+EYpoZV=Kp4P81P1+B8DeWn3edkEWZA@mail.gmail.com> (raw)
In-Reply-To: <20151121125527.GB8832@redhat.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
next prev parent reply other threads:[~2015-11-23 1:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 9:59 Nan Xiao
2015-11-20 16:12 ` Frank Ch. Eigler
2015-11-21 9:06 ` Nan Xiao
2015-11-21 12:55 ` Frank Ch. Eigler
2015-11-23 1:49 ` Nan Xiao [this message]
2015-11-23 1:51 ` Frank Ch. Eigler
2015-11-23 2:01 ` Nan Xiao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+MhoaN2v23BMW1fqVk+EYpoZV=Kp4P81P1+B8DeWn3edkEWZA@mail.gmail.com' \
--to=xiaonan830818@gmail.com \
--cc=fche@redhat.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).