This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: generate DWARF2 unwind information for epilogues


At 10:44 PM +0100 2/14/06, Richard Guenther wrote:
On 2/14/06, Nathan Froyd <froydnj@cs.rice.edu> wrote:
 This patch adds epilogue handling capabilities to the DWARF2 unwind
 information emission.  It also contains tweaks to the x86/x86-64
 backend to smooth out the generation of such information.

 Background: here at Rice, we have developed a low-overhead callstack
 profiler for optimized code that can also record edge count information
 at low cost (see our ICS'05 paper for details).  The basic idea is to
 take callstack samples at timer interrupts; massaging the return address
 at sample times ensures that the amount of unwinding is small and
 provides edge count data as a bonus.

Ah, a userspace oprofile clone?

Our call stack profiler does more than oprofile's unwinding. We associate frequency counts with call edges as well as counts with PCs within particular contexts. That enables us to distinguish "A calls B and B takes lots of time" from "A calls B 100K times and each instance of B is short".


Our profiler is different from Gprof in three ways:
1. our profiler does not need compiler-based instrumentation whereas Gprof does; this enables us to work with fully-optimized, inlined, framepointer-less code (once compilers have sufficient support for epilogues - the problem addressed by our changes to GCC)
2. Gprof assumes all calls to a function take equal time, whereas we accumulate time separately per calling context,
3. our overhead can be scaled arbitrarily low by reducing sampling frequency, whereas Gprof incurs overhead at every function entry.


 Sounds interesting - where can we get
our hands on it for experimenting?

I'd like to see our profiler released as part of binutils (like gprof is) so it sees wide use. We'll talk to the intellectual property office at Rice and see if they agree with this plan.


Regards,

John Mellor-Crummey


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]