profiling the native backend

Stephen Weeks MLton@sourcelight.com
Fri, 3 Nov 2000 11:44:46 -0800 (PST)


> Since the native backend is compiled with ChunkPerFunc, will it be
> sufficient to correlate instruction addresses and which chunk it belongs
> to?  If so, it seems that it would be fairly easy to wrap each emitted
> chunk in the following:
> 
> FunctionName_begin:
> <normal emitted instructions here>
> FunctionName_end:
> 
> From the object file, we can get the addresses of the beginning and end of
> each chunk and recover the chunk name.

This sounds fine to me.

You also need something similar for the -b option, which does stuff at the level 
of local functions in CPS.  -b is useful when CPS function granularity is too
large.  Actually, it's probably useful to have three levels of granularity
	CPS toplevel function
	CPS local function
	assembler basic block