[Mono-list] Re: dynamic optimizations in Mono JIT

Dietmar Maurer dietmar@ximian.com
07 Oct 2002 10:27:26 +0200

Hi James,

I will send the reply also to mono-list@ximian.com. There are many
people with great ideas on that list ;-)

On Sun, 2002-10-06 at 01:29, James Roberts wrote:
> Hello,
> I have a few questions regarding the Mono JIT; From the 
> source code and the newsgroup activity, I gather that you are 
> the person to talk to.
> I am a graduate computer science student at the University of 
> Illinois, Urbana-Champain.  My classmates and I interested in 
> doing some expermentation on the Mono JIT in relation to a 
> course that we are taking in dynamic translation and 
> optimization (http://www-courses.cs.uiuc.edu/~cs497cz/).  
> Specifically, I am interested using feedback-directed 
> optimizations to improve the performance of the Mono JIT.  
> The ideal goal of the project would be to continuously 
> improve application performance using a lightweight profiler 
> in conjunction with on-line translator/optimizer.  However, 
> since this is only a semester project, it would be sufficient 
> to persue only a subset of those goals (e.g. a novel 
> lightweight profiling technique, or simply an interesting 
> feedback directed optimization for byte code translation).
> I was wondering if you had any pending problems or project 
> ideas in the Mono JIT which fell into this category and which 
> would be feasible for a medium-sized class project.  
> Likewise, I would greatly appreciate any pointers that you 
> could give me regarding the high-level implementation of the 
> Mono JIT.

We already have a profiler, its in mono/mono/metdata/profiler*, but i am
unsure if that is suitable for feedback directed optimizations (i assume
its too slow). I would start measuring simple things like usage count,
and find some additional metrics from IL code analysis.

Our plan is to implement a 2 phase jit, but so far we have no code. So
we are also interested in gathering some statistics about usage count,
time spent in those methods, ...

AFAIK ORP (the intel java jit) uses a 2 phase compilation technique, 
maybe its interesting to look at there code.

- Dietmar