Question on Casey's Debugging code

I've been watching some of the debug/profiling videos and in the beginning Casey was using static array's for each translation unit with the __COUTNER___ macro specifying the size of the arrays. At some point Casey had a bug with this setup and he talked about switching this to a different method. I've watched a few more of the debugging videos but he hasn't mentioned this again. Does he end up changing this scheme to something else? If so, just curious as to what he ends up doing instead (or if you know the video where he does actually end up refactoring this). I ask because I want to try and create a system of my own

Edited by Jason on
I think he is generating unique strings as "DEBUG_NAME" (concatinating file and line).
Then he just writes every event atomically into a buffer. At the end of every frame he goes through the buffer and "CollateDebugRecords", to figure out whatever he is interested in.

If you haven't, I recommend buying the source and looking at it yourself.