On Mon, May 17, 2010 at 11:30 AM, St�phane Ducasse
<stephane.ducasse@inria.fr> wrote:
On Ma
>
> bytes 28 to 31: image flags, conventional VMs use only bit 0, Cog also uses bits 1 through 4
> � � � � � � � bit 0: 1 => open full screen, 0 => open using width & height
> � � � � � � � bit 1: 1 => image floats are in little-endian format, 0=> image floats are in big-endian format
> � � � � � � � bit 2: 1 => Process's 4th inst var (after myList) is threadId to be used by the VM for overlapped calls
>
> � � � � � � � bit 3: 1 => set the flag bit on methods that the VM will only interpret (because they're considered too big to JIT)
> � � � � � � � bit 4: 1 => preempting a process does not put it to the back of its run queue
I was not clear how to read
� � � �bit 3: 1
this information is not in the compiledMethods?
For the Cog JIT I want to measure which methods get interpreted to determine the threshold at which to decide to JIT methods. �It makes little sense to JIT methods that are large and only executed once, typically class initialization methods. A simple criterion is to set a limit on the number of literals in a method. �But I still need to know whether my threshold is affecting frequently used methods. �So I added the option of setting the flag bit in any method which the JIT refuses to compile because it has too many literals. �Since I need to see which methods are interpreted on start-up putting a flag in the image header was convenient. �The effect is that the JIT will set the flag bit on any method it refuses to JIT. �I can then browse these in the image and decide whether any are important and adjust the threshold accordingly. �Arguably this should be a command line argument, not an image header flag.