From: fche@redhat.com (Frank Ch. Eigler)
To: David Smith <dsmith@redhat.com>
Cc: "Stone, Joshua I" <joshua.i.stone@intel.com>,
Systemtap List <systemtap@sources.redhat.com>
Subject: Re: Accessing target variables in return probes (was Re: src ChangeLog tapsets.cxx)
Date: Thu, 14 Dec 2006 23:17:00 -0000 [thread overview]
Message-ID: <y0m1wn2kzoc.fsf@ton.toronto.redhat.com> (raw)
In-Reply-To: <458186C8.7010208@redhat.com>
dsmith wrote:
> [...] There is no way to know if a return probe has been skipped,
> so in the case of probing a recursive kernel function, the cached
> values can get out of sync. [...]
In case I didn't put this idea on paper already: one way may be to
also store the thread's current stack pointer somewhere in the
tracking data stream. If we realize that our "current" stack
pointer is higher than that of the highest-nesting-numbered
saved data record, we could unroll to recover synchronization.
In other words, for each synthetic entry point, also save
n = (nesting[tid()] ++)
thread_entry_sp[tid(), n] = regs_sp() # add to tapset if needed
saved_data_value[tid(), n] = $data
and in the return probe handler,
first=1
while (first || (thread_entry_sp[tid(), n] < current_sp) {
first=0 # a candidate for do/while, n'est ce pas?
n = (-- nesting[tid()])
current_sp = regs_sp()
restored_data = saved_data_value[tid(), n];
delete saved_data_value[...]
delete thread_entry_sp[...]
}
Anyway, just a sketch. Do you get the idea?
- FChE
next prev parent reply other threads:[~2006-12-14 20:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-22 7:40 Stone, Joshua I
2006-12-14 18:27 ` David Smith
2006-12-14 23:17 ` Frank Ch. Eigler [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-12-15 0:41 Stone, Joshua I
2006-12-18 13:20 ` Frank Ch. Eigler
[not found] <C56DB814FAA30B418C75310AC4BB279DF731A9@scsmsx413.amr.corp.intel.com>
2006-11-21 21:28 ` David Smith
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=y0m1wn2kzoc.fsf@ton.toronto.redhat.com \
--to=fche@redhat.com \
--cc=dsmith@redhat.com \
--cc=joshua.i.stone@intel.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).