public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/6921] New: tracepoint support
@ 2008-09-29 20:12 fche at redhat dot com
  2008-09-29 23:36 ` [Bug translator/6921] " fche at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: fche at redhat dot com @ 2008-09-29 20:12 UTC (permalink / raw)
  To: systemtap

2.6.26+ have something called tracepoints.  See include/linux/tracepoint.h,
DEFINE_TRACE() macro.  It's desirable to let systemtap hook up to these things
directly, without marker intermediaries.  Thanks to a tip from roland, here's
how it might be done ...

 so ... we have DEFINE_TRACE declaring the static inline fn that should have the
same prototype as the final tracepoint callback function
 so we could do a dwarf search on the putative tracepoint name "foo" to find a
inline function "trace_foo"
 and/or use the tracepoint string section table to validate the "foo" name
 then look up its formal parameters in dwarf
 then save any particular inlined instance pc for later $param resolution
 then emit a tracepoint callback api thing with the same signature

$param resolution is tricky, since we wouldn't be using dwarf location list
data in a real tracepoint callback function.  we'd emit the callback function.
So for mapping $expr->field1->field2, we may *validate* the expression using
dwarf type data (including "alternatives" listing), but we'd just emit C code
that transcribes $expr->field1->field2 to "expr->field1->field2". ... Except
for pointer value checking .. so we may need to expand it to kread() chains
as for dwarf/pt_regs based probes.

The end result would be a generic tracepoint attachment mechanism that gives
good performance and good access to parameters.

-- 
           Summary: tracepoint support
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: fche at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6921

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-21 15:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-29 20:12 [Bug translator/6921] New: tracepoint support fche at redhat dot com
2008-09-29 23:36 ` [Bug translator/6921] " fche at redhat dot com
2009-01-05 15:43 ` tytso at mit dot edu
2009-02-21 14:48 ` jistone at redhat dot com
2009-02-21 16:09 ` fche at redhat dot com

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).