This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH,resubmit] Add static probes to runtime linker
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: libc-alpha at sourceware dot org, Roland McGrath <roland at hack dot frob dot com>
- Date: Sat, 7 Jul 2012 22:30:09 -0700
- Subject: Re: [PATCH,resubmit] Add static probes to runtime linker
- References: <20120705093347.GA2976@redhat.com>
On Thu, Jul 5, 2012 at 2:33 AM, Gary Benson <gbenson@redhat.com> wrote:
+ map_complete:
+ The linker has finished removing objects into the specified
+ namespace. The namespace's r_debug structure is consistent and
+ may be inspected.
Typo above: should be unmap_complete.
@@ -1736,7 +1739,7 @@ open_verify (const char *name, struct filebuf
*fbp, struct link_map *loader,
name = strdupa (realname);
free (realname);
}
- lose (errval, fd, name, NULL, NULL, errstring, NULL);
+ lose (errval, fd, name, NULL, NULL, errstring, NULL, 0);
}
Shouldn't the last parameter to lose() above be nsid?
Also, a general comment. One of the reasons the current r_debug
interface is painful is that the debugger is told: "the link_map may
have changed, go figure it out". When there are 5000 shared libraries
loaded (as is routinely the case here at Google), it takes a loooong
time for GDB to figure out whether anything in fact did change, and
exactly what. IIRC, at process startup, we get one RT_CONSISTENT for
each added DSO, and GDB re-scans the entire link_map list on each one,
resulting in quadratic behavior.
Since we are now defining a brand-new interface, it would be nice to
make it possible for the debugger to be more efficient.
Lastly, could this interface be evolved? I don't know if system tap
probes already have a mechanism for versioned interface. If they do,
great. If not, the interface should probably include version number
somewhere.
--
Paul Pluzhnikov