Hi Thierry,
there's an unadvertised primitive called Context>>#xRay (or ContextPart>>#xRay) that answers these questions for tests. I'm away from the system right now but I'll get you the source soon. Also, the limit on jutting methods, 60 literals, is a default. There's a command line option -maxcoglits (IIRC) that you can change. Eliot (phone) On Feb 23, 2015, at 5:05 AM, Thierry Goubier <[hidden email]> wrote: > Hi All, > > anybody knows how to check if a method is jitted or not? > > I remember (maybe wrongly) that the Jit in Cog has a configurable limit on the number of bytecodes for a method to be jitted or not; I'm looking into the performance of generated code where I can, more or less, control the length of methods (SmaCC) and I'd like to find the optimum point. > > Thanks, > > Thierry |
On Feb 23, 2015, at 7:50 AM, Thierry Goubier <[hidden email]> wrote:
Another thing that affects the number of literals is the compiler's decision to include selectors for optimized methods such as ifTrue: et al (which I think is a very good thing). If you could ask the back end which literal would be encoded as a literal (and if course the question is asked when bytecode is generated) you could get a more accurate count. HTH
|
Another thing that we use the literal array for is (will be) meta object… if you annotate an AST node or variable with a MetaLink, it stores that in the literal array. For example: link := MetaLink new metaObject: Halt; selector: #now. then installing this on some AST node (or Slot) will lead to bytecode like ... pushLiteral: Halt send: #now ... This means that the meta object is stored in the literal frame of the compiledMethod (the Link itself is just an annotation on the structural element). Marcus |
Free forum by Nabble | Edit this page |