I set a number of break points in my code (self break.). Had no problems for a while BUT then I got the emergency debugger in the upper left corner (Object>>primitiveError:). Looking at the call stack showed a number of problems:
1) CompiledMethod>>asString does NOT exist!
2) DebuggerMethodMap>>cacheDebugMap:forMethod: appears to be deleting the most recent (not oldest) entry from MapCache?
3) DebuggerMethodMap>>cacheDebugMap:forMethod: seems to loose entries in MapCache? After getting the keys for MapCache and trying to index into MapCache, an errorKeyNotFound occurs. I re-initialized the class variables (MapCache, MapCacheEntries) by executing: DebuggerMethodMap class>>voidMapCache. This seemed to cure the problem BUT I did notice the comment in DebuggerMethodMap>>cacheDebugMap:forMethod: "There be race conditions and reentrancy issues here". What's the deal with this?
---John
|
On Mon, 23 Aug 2010, John Chludzinski wrote:
> I set a number of break points in my code (self break.). Had no problems > for a while BUT then I got the emergency debugger in the upper left corner > (Object>>primitiveError:). Looking at the call stack showed a number of > problems: > > 1) CompiledMethod>>asString does NOT exist! #asString is defined in ByteArray, the superclass of CompiledMethod, but if you send it to a CompiledMethod, it will raise an error. > > 2) DebuggerMethodMap>>cacheDebugMap:forMethod: appears to be deleting the > most recent (not oldest) entry from MapCache? You're right. That method has several other issues, it should be rewritten. Levente > > 3) DebuggerMethodMap>>cacheDebugMap:forMethod: seems to loose entries in > MapCache? After getting the keys for MapCache and trying to index > into MapCache, an errorKeyNotFound occurs. I re-initialized the class > variables (MapCache, MapCacheEntries) by executing: DebuggerMethodMap > class>>voidMapCache. This seemed to cure the problem BUT I did notice the > comment in DebuggerMethodMap>>cacheDebugMap:forMethod: "There be race > conditions and reentrancy issues here". What's the deal with this? > > ---John > |
In reply to this post by John Chludzinski
Still not certain what problem,
(in DebuggerMethodMap class>>voidMapCache) solves?
On Mon, Aug 23, 2010, Levente Uzonyi [hidden email] wrote: On Mon, 23 Aug 2010, John Chludzinski wrote: > I set a number of break points in my code (self break.). Had no problems > for a while BUT then I got the emergency debugger in the upper left corner > (Object>>primitiveError:). Looking at the call stack showed a number of > problems: > > 1) CompiledMethod>>asString does NOT exist! #asString is defined in ByteArray, the superclass of CompiledMethod, but if you send it to a CompiledMethod, it will raise an error. > > 2) DebuggerMethodMap>>cacheDebugMap:forMethod: appears to be deleting the > most recent (not oldest) entry from MapCache? You're right. That method has several other issues, it should be rewritten. Levente |
On Tue, Aug 24, 2010 at 1:00 PM, John Chludzinski <[hidden email]> wrote: Still not certain what problem, The use of a WeakIdentityKeyDictionary stops the debugger from holding onto obsolete methods, which in turn stops it form holding onto obsolete classes.
The map cache itself speeds up the debugger, avoiding running the compiler for the most recent N debugged methods. does that help? Eliot
|
Free forum by Nabble | Edit this page |