public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Rajasekhar Duddu <rajduddu@linux.vnet.ibm.com>
Cc: systemtap@sources.redhat.com
Subject: Re: [PATCH v3] Tracepoint Tapset for Memory Subsystem
Date: Fri, 09 Oct 2009 17:38:00 -0000	[thread overview]
Message-ID: <20091009173806.GA3061@redhat.com> (raw)
In-Reply-To: <20091009170805.GA7769@rajduddu>

Hi -

On Fri, Oct 09, 2009 at 10:38:05PM +0530, Rajasekhar Duddu wrote:
> [...]
> > > Fallback kprobe is not available for other memory functions because
> > > the variables exported by them are will be modified.
> > 
> > Could you elaborate?  Do you mean that the same values may not be
> > available from a kprobe context?

> 	 Yes, the same values may not be available from a kprobe
> context, for example if we take "ret" variable as it is populated mid-way in
> the  function and it is also the return value of a function which can
> be captured only by a return probe. But by a return probe we cannot
> capture the formal parameters of the memory function.

Actually, we often can.  $variables accessed in .function().return context 
are exactly snapshots of the incoming actual arguments.

So for example the trace_kmalloc() case, we could have a
k(ret)probes-based fallback based upon inspection of the sources,
and unwinding through the "__always_inline" stuff:

probe __vm.kmalloc.kp = kernel.function("__kmalloc").return {
    name = "kmalloc"
    call_size = 0
    caller_function = ""
    bytes_req = $size
    bytes_alloc = bytes_req # unavailable
    gfp_flags = gfp_flag_str($flags)
    ptr = $return
}

Based on CONFIG_NUMA (which we can now express preprocessor
conditionals on), there may be a _node variant, plus _track_caller
variants.  All this can be expressed with some effort.


- FChE

  reply	other threads:[~2009-10-09 17:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-19  5:01 [PATCH] " Rajasekhar Duddu
2009-09-22 17:39 ` David Smith
2009-09-22 21:23   ` Frank Ch. Eigler
2009-09-22 22:05     ` David Smith
2009-09-24 18:08       ` [PATCH v2] " Rajasekhar Duddu
2009-09-25 19:19         ` David Smith
2009-09-25 20:07           ` Frank Ch. Eigler
2009-09-28 18:12           ` Jim Keniston
2009-09-29  8:58             ` K.Prasad
2009-09-25 21:50         ` Josh Stone
2009-09-30 10:12           ` Rajasekhar Duddu
2009-10-02 15:14             ` [PATCH v3] " Rajasekhar Duddu
2009-10-06 19:01               ` Frank Ch. Eigler
2009-10-07 13:07                 ` Rajasekhar Duddu
2009-10-07 19:51                   ` Frank Ch. Eigler
2009-10-09 17:08                     ` Rajasekhar Duddu
2009-10-09 17:38                       ` Frank Ch. Eigler [this message]
2009-10-14  8:32                         ` Rajasekhar Duddu
2009-11-09  7:10 [PATCH V3] " Rajasekhar Duddu
2009-11-09 17:02 ` Frank Ch. Eigler

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=20091009173806.GA3061@redhat.com \
    --to=fche@redhat.com \
    --cc=rajduddu@linux.vnet.ibm.com \
    --cc=systemtap@sources.redhat.com \
    /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).