Re: [RFA/PATCH] PR/9711: quadratic slowdown for deep stack traces

Tom Tromey
2009-09-03T20:27:22Z

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Joel> My only complaint with this patch is that it introduces a slight
Joel> confusion: The current code says we "cache" all the frames when it
Joel> talks about the frame chain corresponding to the backtrace. My patch
Joel> introduces a "frame cache". I'm OK with renaming my cache into
Joel> something else, but couldn't find a better name.

Joel> I'll also attach a couple of files that move the new frame cache
Joel> to a different file (frame-cache.c). I think it's cleaner, but the issue
Joel> is that we cannot access the frame ID from the frame since struct frame
Joel> is opaque.

I actually prefer the version where the code is in frame.c, because I
think of this cache as an implementation detail of the frame code.
But, 6 of one, I'd support either version.

Joel> Any suggestion of a new name for my frame_cache?

The word "memoize" came to mind.

Joel> Any objection to me checking in this patch?

Not from me, it seems like a good idea.

Tom