Bug 15540 - stapdyn wants emulated probe timer.profile support
Summary: stapdyn wants emulated probe timer.profile support
Status: NEW
Alias: None
Product: systemtap
Classification: Unclassified
Component: dyninst (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-27 14:37 UTC by Serguei Makarov
Modified: 2016-05-27 16:34 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serguei Makarov 2013-05-27 14:37:54 UTC
(related to PR14701)

It would be logical and nice to support timer.profile probes under the dyninst runtime. This requires investigation as to whether Dyninst has some kind of feature that allows triggering our handler at regular intervals proportionally to system tick, or whether we have to jury-rig the emulation in our own runtime.
Comment 1 Josh Stone 2013-05-28 18:34:27 UTC
I don't think Dyninst has anything like this, because we're talking about a "temporal" sort of instrumentation, rather than usual code locations.  As for jury-rigging, the first question is whether to drive this from stapdyn or from within the mutatee.

From within, we could possibly use posix timers in its signal mode, which will interrupt threads.  I don't know any way to read the interrupted state, though, which defeats the purpose of timer.profile in the first place.  I'm also hesitant to mess with target resources like signal handling.

From the stapdyn mutator side, we could again use posix timers and then inject calls into the mutatee with Dyninst's oneTimeCode.  We'd have to decide whether to broadcast to all mutatee threads, or just one at random.  However, I don't think this approach will allow register state either.

More brainstorming is welcome.  We need to first discover some low-level mechanism that will even provide the state we want.