Re: jit patches

Date view Thread view Subject view Author view

From: Godmar Back (gback@marker.cs.utah.edu)
Date: Thu Dec 10 1998 - 22:35:23 EST


Archie wrote:
> Random comment: I don't know exactly what codeInfo contains,
> but carrying it around is good in the sense that it may make
> future optimizations that depend on bytecode structure, etc.
> easier.. I remember somebody was trying to do something and
> was complaining about all the good information that was
> thrown away after JIT'ing the method.

Alexandre wrote:
>
> I think I've found a simple fix for all these global variables
> problems: we could define a struct containing all those former
> globals, and a single global pointer to such a struct. translate and
> Kaffe_JNI_Wrapper would save the previous value of the pointer and
> make it point to an automatic variable, and restore the original
> value when translation finished. We could then provide #defines so
> that the original names would keep working.
>

That's almost what I had in mind. The struct would be codeinfo,
which would contain all the information the jit needs for a given method.

However, using a global pointer and pushing and popping in the way you
describe will still require a jitter lock, which is why I think it's not
the best solution. Ideally, the jitter would not need to be protected
by a lock as a whole. This is important because of the upcall issue
(threads may start looping infinitely in loadClass), but it's also
a resource consumption issue (which is important for my research.)

The problem is not just these few globals: it's also other stuff the
jitter uses, such as these sequences. I have to figure out how they're
allocated and how to protect them. I'll see what I can come up with.

I think Archie has a good point, too.

I apologize if I check in stuff too fast, or maybe even break things:
since we're right after a release, I consider the CVS a means to ensure
we stay in sync and that everybody gets feedback quickly.

        - Godmar


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:11 EDT