public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Yunchih Chen <yunchih.cat@gmail.com>
To: Yun-Chih Chen <b03902074@ntu.edu.tw>
Cc: systemtap@sourceware.org
Subject: Re: Retrieving filename / inode from page fault probe
Date: Sun, 28 May 2017 15:40:00 -0000	[thread overview]
Message-ID: <CADV1cNigcvOR1k84eNPdfLOKsX5wApbK0EL_yTT40pqu8u8q-A@mail.gmail.com> (raw)
In-Reply-To: <CANeCTtQnRr6BQ6T2_ySopO831Ky0a1AmMVavoe8NhCcD9OBfxw@mail.gmail.com>

Well, I have managed to make it work with the following script:

probe kernel.trace("mm_filemap_add_to_page_cache") {
  if($page->mapping->host->i_ino){
        f = inode_path($page->mapping->host)
        printf("%s Added %s \n", tz_ctime(gettimeofday_s()), f);
  }
}

Some inode turn out to be 0 and causes the read fault!

      reply	other threads:[~2017-05-28 15:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28 14:05 Yun-Chih Chen
2017-05-28 15:40 ` Yunchih Chen [this message]

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=CADV1cNigcvOR1k84eNPdfLOKsX5wApbK0EL_yTT40pqu8u8q-A@mail.gmail.com \
    --to=yunchih.cat@gmail.com \
    --cc=b03902074@ntu.edu.tw \
    --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).