[dmd-internals] Backtraces under Linux

Sean Kelly sean at invisibleduck.org
Fri Aug 6 12:17:09 PDT 2010


Yeah, it would be done lazily.  There's only one additional allocation when an exception is thrown if tracing is turned on.

On Aug 6, 2010, at 4:47 AM, Steve Schveighoffer wrote:

> Can the demangling be done lazily?  That is, you only demangle when the 
> stack-trace is printed?
> 
> If stack traces must be constructed at throw time and that involves heavy GC 
> usage, this is a non-starter, because exceptions can be used for flow control, 
> not just printing.
> 
> -Steve
> 
> 
> 
>> 
>> From: Sean Kelly <sean at invisibleduck.org>
>> To: Discuss the internals of DMD  <dmd-internals at puremagic.com>
>> Sent: Thu, August 5, 2010 7:11:35 PM
>> Subject: Re: [dmd-internals] Backtraces under Linux
>> 
>> 
>> The blocker for adopting this code as-is is that it depends on Phobos. 
>> -L--export-dynamic still has to be added to linux/bin/dmd.conf in the install 
>> package, and I'm working on a demangler.  I'd just copy the one from Phobos, but 
>> 
>> it works purely with strings using array concatenation and I want to avoid 
>> hitting the GC so hard when an exception is thrown.  I've discovered that 
>> writing such a demangler is kind of a pain because things have to be reordered 
>> during demangling (where the qualified name is for function vs. non-function 
>> types, for example).  Anyway, almost done, but it's taking the backseat to other 
>> 
>> work ATM.  Thanks for the reminder!
>> 
>> On Aug 4, 2010, at 5:43 AM, Jason House wrote:
>> 
>> I just want to ensure this post to digitalmars.D doesn't get  lost.
> 
> 
> 
> 
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals



More information about the dmd-internals mailing list