native methods and static build
gback at cs.utah.edu
Tue Oct 27 10:53:48 PST 1998
> Senthil Kumar wrote:
> > Also, I was thinking about this findMethodFromPC() method
> > why can we not stuff in the Method * onto the stack
> > inside some JIT method,
> > eg.
> > pushl %ebp
> > movl %esp, %ebp
> > pushl SOME_MAGIC_TO_IDENTIFY_IT_IS_A_JIT_METHOD
> > pushl Method *
> > ..
> > ..
> > popl discard Method *
> > popl discard MAGIc
> > popl %ebp
> > ret
> > Then getting to some Method * would be trivial?
> > Perhaps I am missing something??
> Unfortunately what this does is introduce an extra overhead for every method
> call in order to speed up the exceptional case of looking for a method from
> the PC - I thinks this is the wrong compromise.
Yes, it of course depends on the frequency with which exceptions occur.
At this point, the general assumption is that exceptions are and will remain
However, I would like us to keep the possibility of marking the stack
in mind as there are other uses for it. For instance, there are incremental
garbage collection schemes that use stack markers to identify the portion
of the stack that must be rescanned if a given thread has interrupted
Secondly, the other use of such markers is to simply find the lower
end of the stack in threading systems that lack a method to retrieve
the stack pointer of a given thread.
Ideally, one would came up with a marking scheme that introduces minimal
overhead and has multiple benefits that outweight the overhead.
More information about the kaffe