Re: Disable debug logging
Posted by
Sven Gothel on
Oct 11, 2010; 4:52am
URL: https://forum.jogamp.org/Disable-debug-logging-tp1672600p1678270.html
On Sunday, October 10, 2010 19:20:49 spectual [via jogamp] wrote:
>
> Hi Michael
>
> I've might previously have misinterpreted the profiler, because it not quite
> the spot I thought.
>
> The allocations seems to come from
> com.jogamp.nativewindow.impl.RecursiveToolkitLock line 112 (at least in my
> version).
>
> The line is:
>
> lockedStack = new Exception("Previously locked by "+owner+", lock: "+this);
>
> So actually it is the Exception class which is making StringBuffer
> allocations, however that line is executed for each frame, which profiler
> also confirms since a lot of Exception objects is allocated too.
Let me answer this, since this was my decision to add this code.
Reason: Better managed code, ie in case a timeout happens while waiting for a lock,
we have the convenience to see the culprit.
If these objects really allocate a lot of resources (time/memory),
we may change this to an optional behavior.
I may earmark this .. do you have numbers ?
Cheers, Sven