You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by David Griffiths <da...@gmail.com> on 2005/05/23 13:59:28 UTC

Java bytecode metrics?

I've been wondering about the cost of adding gc points to every backwards 
branch in LLVM (as would need to be done to make it multithreaded). A paper 
here http://research.sun.com/techrep/1998/abstract-70.html suggests the cost 
is around 5% of total running time (compared to code patching). What I was 
wondering was, does anyone know of any code metrics for large collections of 
Java bytecode? Eg what is the average number of bytecodes in a method, what 
is the average ratio of backward branches per bytecode and so on.

Is code patching a technique that has been widely employed in JIT compilers? 
(I liked the idea of using an access to a write-protected page to reduce the 
cost of polling!)

Cheers,

Dave