[gclist] GC & profiling
Tue, 24 Apr 2001 12:03:55 +0000
At 2001-04-23 21:08:33+0000, Dave Berry writes:
> The profiler was definitely one of the good parts of the system. We found
> it invaluable in improving the performance of the system, and of customers'
> programs. The only downside was that it increased the work involved in
> porting the system, as the profiler had to be aware of the stack layout on
> each architecture.
Yes. Because the profiler tick might come at any time, the profiler
didn't have the luxury, afforded to the GC, of cooperation from the
code generator in finding stack frames etc. There is a gnarly piece
of code for the x86 profiler which scans the code for the currently
executing function looking for stack-related instructions to work out
where the next frame begins on the stack. This could also have been
done with instruction maps (similar to those used by some GCs to find
RISC architectures were much easier.