This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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: backtrace() vs. _Unwind_Backtrace()


>>>>> On Fri, 5 Dec 2003 17:27:58 +0000, Andrew Haley <aph@redhat.com> said:

  Andrew> Given that we have to maintain such a mechanism, we should
  Andrew> default to the fastest working backtrace on each system.

  Andrew> In the case of the ia64, the fastest working backtrace is
  Andrew> _Unwind_Backtrace().

Actually, if you're going that route, the preference for ia64 linux
should be:

	(1) backtrace() if its working fine
	(2) _Unwind_Backtrace() otherwise

The reason is because:

 - libc's backtrace() is either broken or calls into _Unwind_Backtrace()
 - libunwind provides a correct and performance-optimal backtrace() and
   will be the one that gets picked up by newer versions of GCC
 - the _Unwind_Backtrace() interface is less efficient by design than
   backtrace() (since it requires a callback per frame)

I hope this isn't too confusing.  But my point is that if you need to
support both backtrace() and _Unwind_Backtrace() anyhow, for ia64
linux we should be using backtrace(), if it works correctly (which
should be easy to check via autoconf).

On the topic of backtrace performance: I'm always looking for good
test-cases that stress performance.  Can you suggest a good artificial
or real-world Java test-program that is sensitive to backtrace()
performance?

Thanks,

	--david


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