On 6/4/08, Arun Sharma <[EMAIL PROTECTED]> wrote: > When we were analyzing the performance of stack unwinding (especially > compared to a much simpler unwinder based on frame pointers), one > thing that stood out is the cost of the sigprocmask(2) system call > which is invoked from the getcontext() in libc. It appears to me that > this is necessary only if the caller wants to unw_resume() at some > point. > > However, for callers who just want to examine the stack, this could > potentially be eliminated. Currently there is no way for the caller to > express the intent at unw_getcontext() time. Looking at some of the > other archs which have a hand coded getcontext.S (ia64, arm etc) - I > don't see any calls to sigprocmask. Does this mean that > Ltest-resume-sig is failing on those archs?
I don't know about ARM, but I have never seen Ltest-resume-sig fail on ia64 and I don't think it should. > If we must restore signals state on unw_resume(), I was thinking > something along the lines of: > > /* For users who want to unw_resume */ > unw_getcontext(&uc); > > /* For users who want to just examine the stack */ > unw_get_mcontext(&uc); > > Comments? I don't particularly like making the API more complicated (and error-prone to use) for such reasons. Maybe not using the libc getcontext() would be better? --david _______________________________________________ Libunwind-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/libunwind-devel
