Parse transformery (Was: Re: Calling internal functions - foo::bar() ?)

Kostis Sagonas kostis@REDACTED
Tue Mar 8 16:51:16 CET 2005

Luke Gorrie wrote:
 > If you want a lot of real people to benefit from compiler
 > optimizations then please finish HiPE so that we can actually use it.
 > Lack of backtraces, memory leaks in code reloading, unclear limit on
 > volume of native code that can be loaded -- these are limitations
 > imposed for your convenience that prohibit actual use by most of the
 > user community.

Seems that you are somehow misinformed.  None of these limitations
is imposed for "our convenience".  On the contrary I would say.

 - "Lack of backtraces"
	This is directly related to what I was describing in my
	previous mails.
	For performance reasons, optimized code cannot be polluted
	by debugging code / considerations. (There is a reason why
	eg. GCC has a -g option that at least till some time ago
	could not be used in conjunction with -O3.)
        Stack backtraces CANNOT be as accurate as those of BEAM
	without a performance penalty (in time, code space, or both).
	For example, HiPE passes many arguments in machine registers.
	If an exception occurs later on, their values are lost and
	cannot appear in the backtrace. Automatic inlining disturbs
	the calling sequence, etc.
	Bottomline: This is not out of convenience, it is done for

 - "Memory leaks in code reloading" +
   "limit on volume of native code that can be loaded"
	Both these are limitations imposed to HiPE by BEAM, which
	actually *complicate* our life rather than making it
	"more convenient".
	We have been begging the OTP team to address these issues
	for at least the last four/five years.  Doing so is not
	straightforward, but all of us are working on this.  Once
	BEAM's runtime system is ready for it, we will do this.

Hope this clarifies things.


 > (sad that Richard C. has moved on to new and exciting things and
 >  all my years of nagging him for HiPE backtraces were wasted :-)

FYI, Richard C. is actually the guy who took OUT the quite minimal
backtrace information that earlier versions of HiPE were generating.
(This was done to accomodate the new try-based exceptions of BEAM,
 again not done for HiPE's "convenience".)

More information about the erlang-questions mailing list