Re: [drlvm] Helper inlining in JIT

2006-09-07 Thread Weldon Washburn
On 9/7/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote: On 9/7/06, Rana Dasgupta <[EMAIL PROTECTED]> wrote: > > Hi Mikhail, > Sorry I left this thread for a while. Are you implementing VMMagic > support in .OPT currently, and prototyping with bump allocation? I am > just > trying to understand

Re: [drlvm] Helper inlining in JIT

2006-09-07 Thread Mikhail Fursov
On 9/7/06, Rana Dasgupta <[EMAIL PROTECTED]> wrote: Hi Mikhail, Sorry I left this thread for a while. Are you implementing VMMagic support in .OPT currently, and prototyping with bump allocation? I am just trying to understand in what order we are doing this. I'm implementing VMMagics an

Re: [drlvm] Helper inlining in JIT

2006-09-07 Thread Mikhail Fursov
Hi Xiao-Feng, I think that MMTk unboxed package + native call support + tls access magics are enought for the all helpers I know. Do you know any examples to extend this list? On 8/29/06, Xiao-Feng Li <[EMAIL PROTECTED]> wrote: Fursov, what are the intrinsics supports you want to implement? The

Re: [drlvm] Helper inlining in JIT

2006-09-06 Thread Rana Dasgupta
Hi Mikhail, Sorry I left this thread for a while. Are you implementing VMMagic support in .OPT currently, and prototyping with bump allocation? I am just trying to understand in what order we are doing this. Would it be possible to list the fastpath helpers so that the java interfaces to acc

Re: [drlvm] Helper inlining in JIT

2006-08-28 Thread Xiao-Feng Li
Fursov, what are the intrinsics supports you want to implement? The code below you gave has only a few examples. I think it would be a good idea to well define the instrinsics before code them. Thanks, xiaofeng On 8/28/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote: Folks, Here is the example of

Re: [drlvm] Helper inlining in JIT

2006-08-28 Thread Weldon Washburn
On 8/28/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote: Folks, Here is the example of fast allocation helper written in Java with the help of VMMagic If nobody objects I'm starting to implement VMMagic support in Jitrino.OPTthis week. I like it! It makes sense. No objections to what you propose

Re: [drlvm] Helper inlining in JIT

2006-08-28 Thread Mikhail Fursov
Folks, Here is the example of fast allocation helper written in Java with the help of VMMagic If nobody objects I'm starting to implement VMMagic support in Jitrino.OPTthis week. private static final int GC_TLS_OFFSET = 10; private static final int GC_CURRENT_OFFSET= GC_TLS_OFFSET + 0; private

Re: [drlvm] Helper inlining in JIT

2006-08-20 Thread Rana Dasgupta
Xiao Feng, Yes exactly please see below... On 8/16/06, Xiao-Feng Li <[EMAIL PROTECTED]> wrote: On 8/17/06, Rana Dasgupta <[EMAIL PROTECTED]> wrote: Adding: - We will define one or more interfaces for grouping the fastpaths. These will consist of methods that compatible VM's, GC

Re: [drlvm] Helper inlining in JIT

2006-08-16 Thread Xiao-Feng Li
On 8/17/06, Rana Dasgupta <[EMAIL PROTECTED]> wrote: - So we will write the inlinable fastpaths wherever possible in pure Java, using an annotated calling convention to call the slowpath ( to support developer freedom :-) ). - Where the fastpaths cannot be expressible in pure Java,

Re: [drlvm] Helper inlining in JIT

2006-08-16 Thread Weldon Washburn
On 8/16/06, Rana Dasgupta <[EMAIL PROTECTED]> wrote: On 8/16/06, Xiao-Feng Li <[EMAIL PROTECTED]> wrote: > On 8/16/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote: > >> > >> So why can't we optimize native (JNI) calls from Java code using > annotations > >> similar to those used to annotate helper'

Re: [drlvm] Helper inlining in JIT

2006-08-16 Thread Rana Dasgupta
On 8/16/06, Xiao-Feng Li <[EMAIL PROTECTED]> wrote: On 8/16/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote: >> >> So why can't we optimize native (JNI) calls from Java code using annotations >> similar to those used to annotate helper's slow call above? >> Once developer annotates native call with

Re: [drlvm] Helper inlining in JIT

2006-08-16 Thread Weldon Washburn
On 8/16/06, Xiao-Feng Li <[EMAIL PROTECTED]> wrote: This is off-topic now. :-) But one (crazy) idea is to compile the native code with JVM compiler as well so that both Java and native code can use same IR. Actually, its not really off-topic. It is not crazy. ECMA CLI does something very sim

Re: [drlvm] Helper inlining in JIT

2006-08-16 Thread Xiao-Feng Li
On 8/16/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote: On 8/16/06, Xiao-Feng Li <[EMAIL PROTECTED]> wrote: > > > > AFAIU it's enough to annotate JNI method with calling convention > details > > and to support it in JIT and VM. So I see no difference in > implementation > > with helper inlining

Re: [drlvm] Helper inlining in JIT

2006-08-16 Thread Mikhail Fursov
On 8/16/06, Xiao-Feng Li <[EMAIL PROTECTED]> wrote: > AFAIU it's enough to annotate JNI method with calling convention details > and to support it in JIT and VM. So I see no difference in implementation > with helper inlining here. Just an extension or another version of helper > inlining me

Re: [drlvm] Helper inlining in JIT

2006-08-16 Thread Xiao-Feng Li
Mikhail, I wrote my reply before read yours. :-) On 8/16/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote: The separation is not clean if there is a helper that we can't write in Java. Once we added TLS and native calls support to Java I can't imagine this helper today, but I'm still looking for it

Re: [drlvm] Helper inlining in JIT

2006-08-16 Thread Xiao-Feng Li
On 8/16/06, Rana Dasgupta <[EMAIL PROTECTED]> wrote: Xiaofeng, Thanks for the excellent description. My question was not whether partial inling of helpers( or fastpath inlining ) is necessary. It was more whether a generalized framework is absolutely necessary to support it. Or whether there i

Re: [drlvm] Helper inlining in JIT

2006-08-16 Thread Mikhail Fursov
Rana, On 8/16/06, Rana Dasgupta <[EMAIL PROTECTED]> wrote: Or whether there is a finite set of helpers/services fastpaths that one can teach the jit about, so that the jit knows a priori how to generate the code for these inline. As far as I know, several product implementations are OK with tea

Re: [drlvm] Helper inlining in JIT

2006-08-15 Thread Rana Dasgupta
Xiaofeng, Thanks for the excellent description. My question was not whether partial inling of helpers( or fastpath inlining ) is necessary. It was more whether a generalized framework is absolutely necessary to support it. Or whether there is a finite set of helpers/services fastpaths that one c

Re: [drlvm] Helper inlining in JIT

2006-08-13 Thread Xiao-Feng Li
Rana, good arguments. :-) Based on my experience in developing JIT and GC in Java, I think there are two issues, or two levels of issues. 1. Runtime services inlining. The word "helper" is not a widely-used term. I think the idea is to enable JIT to inline the frequently accessed routines of JVM

Re: [drlvm] Helper inlining in JIT

2006-08-11 Thread Rana Dasgupta
MIkhail, I have some questions, or just arguments :-) First, though it is nice to talk of an open helper inlining framework to call VM/GC helpers, isn't the set of helpers used in JVM's more or less well known and standardized? In other words, is a framework absolutely necessary, can't the jit j

Re: [drlvm] Helper inlining in JIT

2006-08-11 Thread Mikhail Fursov
On 8/10/06, Weldon Washburn <[EMAIL PROTECTED]> wrote: On 8/9/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote: > a) Fast access to TLS. Yes! Good idea. What you want is a "mov eax, fs[14]" intrinsic for winxp and the equivalent for Linux. It may be a stretch for vmmagic purists to add segmen

Re: [drlvm] Helper inlining in JIT

2006-08-09 Thread Xiao-Feng Li
On 8/9/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote: Does anyone have other ideas how to design 'helper inlining' to make it easy and reusable? Is there any limitation with 'magic' approach that can prevent us to use this way? I agree that to write helper fast-path code in Java is a good idea.

Re: [drlvm] Helper inlining in JIT

2006-08-09 Thread Weldon Washburn
On 8/9/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote: Folks, Once we decided that we do not want to limit Harmony with only one VM/JIT/GC instance I think it's time to start discussion how all these components will work together effectively. So the proposal is to discuss helper inlining interface.

[drlvm] Helper inlining in JIT

2006-08-09 Thread Mikhail Fursov
Folks, Once we decided that we do not want to limit Harmony with only one VM/JIT/GC instance I think it's time to start discussion how all these components will work together effectively. So the proposal is to discuss helper inlining interface. Every component we have (VM, GC : ) can have helper