public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/16553] New: unwind stack code shouldn't need pragma:uprobes if it isn't used for user space probing
@ 2014-02-10 19:01 mjw at redhat dot com
  0 siblings, 0 replies; only message in thread
From: mjw at redhat dot com @ 2014-02-10 19:01 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=16553

            Bug ID: 16553
           Summary: unwind stack code shouldn't need pragma:uprobes if it
                    isn't used for user space probing
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: mjw at redhat dot com

The following commit introduced a dependency on uprobes for the stack/unwind
code:

commit 6a80494e753367b7096a928705312dfdfa437201
Author: Frank Ch. Eigler <fche@elastic.org>
Date:   Fri May 7 12:57:50 2010 -0400

    PR11573: infer need for uprobes from special embedded-c markup tag

    * tapset/ucontext-unwind.stp: Mark up these babies with /* pragma:uprobes
*/
    * elaborate.cxx (typeresolution_info::visit_embeddedcode): Look for that
      and activate session.need_uprobes if found.

This was introduced to solve Bug 11573 - uprobe_get_pc, sayonara.

See specifically runtime/stack.c (_stp_stack_unwind_one_user) which does:

#ifdef STAPCONF_UPROBE_GET_PC
        maybe_pc = 0;
        if (ri) {
                maybe_pc = uprobe_get_pc(ri, UNW_PC(info), UNW_SP(info));
                if (!maybe_pc)
                        printk("SYSTEMTAP ERROR: uprobe_get_return returned
0\n");
                else
                        UNW_PC(info) = maybe_pc;
        }
#endif

Which is needed whenever there might be any uretprobes installed to fix up any
addresses which might point to trampoline code instead of the original pc.

To make sure that code can be executed all unwinding/ubacktrace tapset
functions now have a pragma:uprobes. But if uprobes wasn't actually used to set
u[ret]probes then this is too strict a requirement.

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-10 19:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-10 19:01 [Bug runtime/16553] New: unwind stack code shouldn't need pragma:uprobes if it isn't used for user space probing mjw 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).