Re: RFR[9]:Fix java/lang/invoke/MethodHandleImpl's use of Unsafe.defineAnonymousClass()

2016-05-11 Thread Rémi Forax
yes, adding @Hidden solves the first item of my list, but nevertheless changing the behavior of defineAnonymousClass does not solve the other items. That said, i hijack this thread because i have not noticed that defineAnonymousClass behavior was changed. I should have started another thread ab

Re: JFokus VM Tech Day 2016

2015-11-12 Thread Rémi Forax
:) Do you plan to attend the VM Tech day ? Rémi Le 12 novembre 2015 02:37:04 CET, John Rose a écrit : >On Nov 11, 2015, at 12:35 AM, Marcus Lagergren >wrote: >> >> bare silicone magic > >That extra E moves the venue from Santa Clara to Las Vegas. > >--

Re: What can we improve in JSR292 for Java 9?

2015-08-26 Thread Rémi Forax
Hi John, comment inlined Le 26 août 2015 00:30:00 CEST, John Rose a écrit : >On Feb 25, 2015, at 6:29 PM, John Rose wrote: >> >> Maybe this is general enough: >> >>MHs.loop(init, predicate, body)(*a) >>=> { let i = init(*a); while (predicate(i, *a)) { i = body(i, *a); >} return i; } >>

Re: ClassValue rooting objects after it goes away?

2015-08-06 Thread Rémi Forax
No, it's not expected ! Rémi Le 6 août 2015 20:26:43 CEST, Charles Oliver Nutter a écrit : >Pardon me if this has been discussed before, but we had a bug (with >fix) reported today that seems to indicate that the JVM is rooting >objects put into a ClassValue even if the ClassValue goes away. >

Re: invokedynamic and subclasses

2015-06-24 Thread Rémi Forax
Hi Mike, i've compiled a small list of patterns, https://code.google.com/p/jsr292-cookbook/ take a look to the first inlining cache example. cheers, Rémi Le 24 juin 2015 14:19:32 CEST, Mike Jarmy a écrit : >I've been experimenting with invokedynamic in a compiler for a dynamic >language >th

Re: Backport 2.0 RC

2012-07-27 Thread Rémi Forax
On 07/27/2012 09:49 PM, Mark Roos wrote: > > Hi Remi > > How do I run with the backport? I am using OSX Lion. > > regards > mark > > download the backport, unzip the zip, in lib you have two files one is asm-4 and the other is the backport (jsr292-backport.jar) the jsr292-bkkcport.jar is a Java

Re: Backport 2.0 RC

2012-07-27 Thread Rémi Forax
On 07/27/2012 07:56 PM, Jochen Theodorou wrote: > Am 27.07.2012 18:44, schrieb Rémi Forax: >> As traditionally for the JVM Summit, >> I'm please to announce a new version of the JSR 292 backport, >> http://code.google.com/p/jvm-language-runtime/downloads/list >&g

Backport 2.0 RC

2012-07-27 Thread Rémi Forax
As traditionally for the JVM Summit, I'm please to announce a new version of the JSR 292 backport, http://code.google.com/p/jvm-language-runtime/downloads/list This version as some speed improvements and numerous bug fixes thanks to the Nashorn Team. I'm still interested by any report of your fa

Re: MethodHandle.bindTo() only for reference types?

2012-07-26 Thread Rémi Forax
On 07/26/2012 11:50 AM, Aleksey Shipilev wrote: > Hi John, > > On 07/24/2012 11:02 PM, John Rose wrote: >> On Jul 24, 2012, at 11:09 AM, Attila Szegedi wrote: >> MethodHandle.bind is a less-general primitive. The general API is >> insertArguments. >> >> Good 292 support for primitives requires a s

Re: MethodHandle.bindTo() only for reference types?

2012-07-24 Thread Rémi Forax
On 07/24/2012 09:02 PM, John Rose wrote: > On Jul 24, 2012, at 11:09 AM, Attila Szegedi wrote: > >> I don't think technically there'd be a difficulty in having it >> work on primitives, it's just that it ain't the intent; you still use >> insertArguments() for uses that are not semantically "bind"s

Re: build error on OSX

2012-07-22 Thread Rémi Forax
On 07/22/2012 07:25 PM, Henri Gomez wrote: > Hum, commited without this import ? maybe lost in the patch queue ?? Rémi > Le 22 juil. 2012 à 15:46, Rémi Forax a écrit : > >> On 07/22/2012 11:38 AM, Henri Gomez wrote: >>> Hi to all, >>> >>> Even usi

Re: build error on OSX

2012-07-22 Thread Rémi Forax
On 07/22/2012 11:38 AM, Henri Gomez wrote: > Hi to all, > > Even using Java 8 for building MLVM, using stephen scripts or my own, > build failed : > > > # Running javac: 43 files; in > /Users/henri/Downloads/mlvm/sources/jdk/make/java/invoke > /Library/Java/JavaVirtualMachines/1.8.0.jdk/Conte

Re: State of MLVM and Lambda

2012-07-20 Thread Rémi Forax
On 07/20/2012 11:25 AM, Roman Kennke wrote: > Hello, > > Maybe this is a stupid beginner question. I would like to know what is > the status of MLVM with respect to project Lambda. Is it possible to > build a JVM that has both (has lambda, or parts of it, already been > merged into hotspot-comp?)?

Re: Crash using sun.misc.Unsafe.static

2012-07-17 Thread Rémi Forax
On 07/18/2012 12:55 AM, John Rose wrote: > On Jul 16, 2012, at 4:06 PM, Krystal Mok wrote: > >> And you're right that this has to do with the PermGen removal >> project. The difference comes from [1], which is a part of CR 7017732. >> To be specific, before the 7017732, static fields are stored in

Re: Crash using sun.misc.Unsafe.static

2012-07-17 Thread Rémi Forax
On 07/17/2012 01:06 AM, Krystal Mok wrote: > Hi Remi, > > Looks like it's a trap if you're running this on JDK6's HotSpot VM. If > you're running a debug build of the same VM, you should hit an > assertion before hitting the ShouldNotReachHere() part. > > opto/type.cpp:2477 > assert(o->is_java_ob

Crash using sun.misc.Unsafe.static

2012-07-16 Thread Rémi Forax
Hi guys, the latest jdk6 (jdk6 update 33) fails hard in the compiler if I try to store the result of unsafe.staticFieldBase() in a static final field, i.e if it's considered as a constant. Neither recent jdk7 nor jdk8 crash, only jdk6 (it also failed with update 21 which is the oldest version I h

Re: review request (L): JDK changes for 7023639: JSR 292 method handle invocation needs a fast path for compiled code

2012-07-14 Thread Rémi Forax
On 07/14/2012 02:02 PM, David Schlosnagle wrote: > On Fri, Jul 13, 2012 at 5:41 AM, John Rose > wrote: >> On Jul 11, 2012, at 5:53 PM, John Rose wrote: >> >>> As some of you have noticed, Chris Thalinger, Michael Haupt, and I >>> have been working on the mlvm patches [1] for JEP-160 [2] for >>>

Re: hg: mlvm/mlvm/hotspot: meth: fix to intrinsic compilation; assembler tweaks for debugging; backtrace filtering

2012-07-12 Thread Rémi Forax
On 07/12/2012 07:14 PM, Charles Oliver Nutter wrote: > On Thu, Jul 12, 2012 at 2:11 AM, John Rose wrote: >> One problem with mixed mode systems is that a method like >> "executeMyLanguagesInterpretedMethodUntilItGetsCompiled" wants to display a >> method name based on some value inside the frame i

Re: hg: mlvm/mlvm/jdk: meth-lazy: merged BMH factory into BMH, added test for primitive parameter binding

2012-07-11 Thread Rémi Forax
On 07/12/2012 12:10 AM, Michael Haupt wrote: > Hi Remy, > > Am 11.07.2012 um 22:48 schrieb Rémi Forax: >> Hi Mickael, >> some minor comments, >> makeSignature should use a StringBuilder and not a StringBuffer. > > good point, thanks! > >> ans I don't

Re: hg: mlvm/mlvm/jdk: meth: add @Hidden annotations

2012-07-11 Thread Rémi Forax
On 07/11/2012 10:24 PM, John Rose wrote: > On Jul 11, 2012, at 2:29 AM, Rémi Forax wrote: > >> just a question, even if it's not a big deal if one is able to generate >> bytecode, >> why Hidden is not a top level type of java.lang.invoke ? > > Good question.

Re: hg: mlvm/mlvm/jdk: meth-lazy: merged BMH factory into BMH, added test for primitive parameter binding

2012-07-11 Thread Rémi Forax
On 07/11/2012 10:07 PM, michael.ha...@oracle.com wrote: > Changeset: 79c955d995f0 > Author:mhaupt > Date: 2012-07-11 22:07 +0200 > URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/79c955d995f0 > > meth-lazy: merged BMH factory into BMH, added test for primitive parameter > binding

Re: hg: mlvm/mlvm/jdk: meth: add @Hidden annotations

2012-07-11 Thread Rémi Forax
On 07/11/2012 08:19 AM, john.r.r...@oracle.com wrote: > Changeset: 77f38b00af98 > Author:jrose > Date: 2012-07-10 23:19 -0700 > URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/77f38b00af98 > > meth: add @Hidden annotations > > ! meth-lazy-7023639.patch > ! meth-lazy-7023639.xbmh.pa

Re: hg: mlvm/mlvm/hotspot: meth: fix to intrinsic compilation; assembler tweaks for debugging; backtrace filtering

2012-07-11 Thread Rémi Forax
e if you post process the groovy.jar at compile time (because Hidden is not a public annotation) :) Rémi > > On Tue, Jul 10, 2012 at 11:12 AM, Rémi Forax <mailto:fo...@univ-mlv.fr>> wrote: > > On 07/10/2012 10:42 AM, john.r.r...@oracle.com > <mailto:john.r.r...@o

Re: How to making Class.forName work in indy?

2012-07-10 Thread Rémi Forax
On 07/10/2012 10:07 PM, Jochen Theodorou wrote: > Hi all, > > assuming you have to compile code with indy that realizes this: > > Class.forName(x) > > Meaning, we want to execute forName from Class using invokedynamic. If > you then have frames in your trace looking like this: > >> java.lang.Class.

Re: hg: mlvm/mlvm/hotspot: meth: fix to intrinsic compilation; assembler tweaks for debugging; backtrace filtering

2012-07-10 Thread Rémi Forax
On 07/10/2012 10:42 AM, john.r.r...@oracle.com wrote: > Changeset: 851ca5831589 > Author:jrose > Date: 2012-07-10 01:42 -0700 > URL: http://hg.openjdk.java.net/mlvm/mlvm/hotspot/rev/851ca5831589 > > meth: fix to intrinsic compilation; assembler tweaks for debugging; backtrace > filt

Re: Improving the performance of stacktrace generation

2012-07-07 Thread Rémi Forax
On 07/08/2012 12:50 AM, Charles Oliver Nutter wrote: > On Saturday, July 7, 2012, Rémi Forax wrote: > > You can use Throwable.getStackTraceElement() > which is package visible and OpenJDK specific but at least > it will be faster for all VMs that uses OpenJDK. >

Re: Improving the performance of stacktrace generation

2012-07-07 Thread Rémi Forax
On 07/08/2012 12:03 AM, Charles Oliver Nutter wrote: > Today I have a new conundrum for you all: I need stack trace > generation on Hotspot to be considerably faster than it is now. > > In order to simulate many Ruby features, JRuby (over)uses Java stack > traces. We recently (JRuby 1.6, about a ye

Re: TaggedArrays (Proposal)

2012-07-07 Thread Rémi Forax
On 07/07/2012 07:02 PM, Dain Sundstrom wrote: > On Jul 7, 2012, at 1:56 AM, Rémi Forax wrote: > >> You have also to figure out how to get two return values from a method call, >> but exceptions are your best friend here. > Can you give an example of what you mean here

Re: TaggedArrays (Proposal)

2012-07-07 Thread Rémi Forax
On 07/07/2012 04:54 AM, Mark Roos wrote: > Hi Rémi, you mention > And now the trick, there is a nice way (several in fact) to explain to > the JIT > that even if the bytecode contains tests, if the variable contains > effectively an int, > it's a good idea to remove them. > > Ok, in Smalltalk the

Re: TaggedArrays (Proposal)

2012-07-06 Thread Rémi Forax
On 07/06/2012 08:48 PM, Mark Roos wrote: > From Rémi on static analysis for loops > > Not having such kind of analysis is almost a crime. > > For a language like Smalltalk I was thinking that having such an analysis > would be the work of the gods. > > With user overridable methods, reflect

Re: TaggedArrays (Proposal)

2012-07-05 Thread Rémi Forax
On 07/05/2012 10:42 PM, Jim Laskey wrote: > Fairly common patterns like > > var p = { > fontsize: 15, > lineheight: 22, > color: 0x000, > fontfamily: "Georgia, FreeSerif, Times, serif" > }; > > p.color = "white"; > > We need flexible slots without allocating 2x memory. > > For "for like" c

Re: TaggedArrays (Proposal)

2012-07-04 Thread Rémi Forax
On 07/04/2012 03:18 AM, Jim Laskey wrote: > Actually it's built on a modified 7. Getting it into a 7 release is a > community issue. I think tagged values comes under JSR-292, so some of > the process is covered. Not sure what the other steps involve. And of > course the API/implementation needs

Re: Working around NoClassDefFound

2012-07-04 Thread Rémi Forax
On 07/04/2012 03:01 AM, Mark Roos wrote: > From Charlie > > It also doesn't appear to happen with JRuby on the boot > classpath...it happens only when JRuby is loaded in a child > classloader. > > That was my experience as well. The only way I found to avoid it was to > put my code into the bootCl

Re: TaggedArrays (Proposal)

2012-07-02 Thread Rémi Forax
On 07/02/2012 04:11 PM, ravenex wrote: > Very cool stuff, Jim and Rickard! > I guess people are going to start missing NaN encoded tagged > value/pointers now that there's something real to play with ;-) > > @Remi The subclass suggestion sounds a lot like Maxine's Hybrid > objects, where named fi

Re: TaggedArrays (Proposal)

2012-07-02 Thread Rémi Forax
On 07/02/2012 03:05 PM, Jim Laskey wrote: > During a week in the rarefied air of Stockholm back in May, a > sleepless night got me thinking. The day after that, the thinking > became a reality. I've been sitting on the code since, not sure what > to do next. So..., why not start the month lea

Re: two things invokedynamic canbot do

2012-06-26 Thread Rémi Forax
On 06/26/2012 02:24 PM, Jochen Theodorou wrote: > Am 26.06.2012 13:37, schrieb Julien Ponge: >> You may bypass the invokespecial (…)V as a first method >> invocation within a constructor requirement by launching the JVM with >> -noverify. As long as you don't do anything stupid in the bytecode it >

Re: two things invokedynamic canbot do

2012-06-26 Thread Rémi Forax
On 06/26/2012 12:37 PM, Jochen Theodorou wrote: > Am 26.06.2012 11:59, schrieb Rémi Forax: >> On 06/26/2012 11:40 AM, Jochen Theodorou wrote: >>> Hi all, >>> >>> just to be sure I understand correctly... afaik there are two things >>> invokedynamic c

Re: two things invokedynamic canbot do

2012-06-26 Thread Rémi Forax
On 06/26/2012 11:40 AM, Jochen Theodorou wrote: > Hi all, > > just to be sure I understand correctly... afaik there are two things > invokedynamic cannot do. > > (1) calling private methods > actually I am not sure this is really true. There is a Lookup instance I > can use to get handles to privat

Re: megamorphic lambda prevention

2012-06-21 Thread Rémi Forax
On 06/21/2012 09:17 PM, Jochen Theodorou wrote: > Mark, > > can you explain what you mean with "depth"? if you mean the depth of a > call path, then more than 20 is indeed more rare, but it depends on the > circumstances. In Grails for example (web frame work in the Groovy > world) a depth of 20 sh

Re: megamorphic lambda prevention

2012-06-21 Thread Rémi Forax
On 06/21/2012 04:38 PM, Matt Fowles wrote: > All~ > > Couldn't the VM detect hot mega-morphic methods and have them bestow > some of their hotness upon the callers. Yes, that's basically the idea when I say the VM can create a path backward. > Making their callers more likely to inline them. o

Re: megamorphic lambda prevention

2012-06-21 Thread Rémi Forax
se you may have the stack so it can be easier to go backward. Rémi > > On Thu, Jun 21, 2012 at 10:30 AM, Rémi Forax <mailto:fo...@univ-mlv.fr>> wrote: > > On 06/21/2012 04:12 PM, Jochen Theodorou wrote: > > Am 21.06.2012 16 :00, schrieb Rémi Forax: > >

Re: megamorphic lambda prevention

2012-06-21 Thread Rémi Forax
se you may have the stack so it can be easier to go backward. Rémi > > On Thu, Jun 21, 2012 at 10:30 AM, Rémi Forax <mailto:fo...@univ-mlv.fr>> wrote: > > On 06/21/2012 04:12 PM, Jochen Theodorou wrote: > > Am 21.06.2012 16 :00, schrieb Rémi Forax: > >

Re: megamorphic lambda prevention

2012-06-21 Thread Rémi Forax
On 06/21/2012 04:12 PM, Jochen Theodorou wrote: > Am 21.06.2012 16:00, schrieb Rémi Forax: >> On 06/21/2012 03:52 PM, Jochen Theodorou wrote: >>> Am 21.06.2012 13:57, schrieb Krystal Mok: > [...] >>>> I wonder how well the new interpreter design in Graal would han

Re: megamorphic lambda prevention

2012-06-21 Thread Rémi Forax
On 06/21/2012 03:55 PM, Jochen Theodorou wrote: > Am 21.06.2012 13:21, schrieb MacGregor, Duncan (GE Energy): >> Yes, it is very easy for those sites to become megamorphic. We work round >> this by using exactInvokers on function invocation call sites, and caching >> on the method type of the funct

Re: megamorphic lambda prevention

2012-06-21 Thread Rémi Forax
On 06/21/2012 03:52 PM, Jochen Theodorou wrote: > Am 21.06.2012 13:57, schrieb Krystal Mok: >> That's "the inlining problem" that Cliff Click was talking about [1], right? > yes, the issue was actually mentioned more than once on this list already > >> I wonder how well the new interpreter design i

Re: megamorphic lambda prevention

2012-06-21 Thread Rémi Forax
On 06/21/2012 01:57 PM, Krystal Mok wrote: > That's "the inlining problem" that Cliff Click was talking about [1], > right? yes, > > I wonder how well the new interpreter design in Graal would handle > this kind of case, since it's supposed to have picked the good parts > from trace-based comp

Re: performance degeneration from jdk7u2 to jdk7u6?

2012-05-24 Thread Rémi Forax
On 05/24/2012 10:38 AM, Jochen Theodorou wrote: > Am 23.05.2012 23:33, schrieb Rémi Forax: >> On 05/23/2012 07:50 PM, Jochen Theodorou wrote: >>> no one helping me on the assembly analysis? >> Wow, you have generated the biggest fib function I have ever seen. >> >

Re: performance degeneration from jdk7u2 to jdk7u6?

2012-05-23 Thread Rémi Forax
On 05/23/2012 07:50 PM, Jochen Theodorou wrote: > no one helping me on the assembly analysis? Wow, you have generated the biggest fib function I have ever seen. About the bytecode you generate, as you said you have to remove $getCallSiteArray() because it seems it does some side effects so the JI

Re: using MethodHandle in place of virtual methods?

2012-05-19 Thread Rémi Forax
On 05/19/2012 08:04 AM, Per Bothner wrote: > On 05/16/2012 05:52 PM, Charles Oliver Nutter wrote: > > Thanks for a detailed and helpful response! > >> On Wed, May 16, 2012 at 12:55 PM, Per Bothner wrote: >>> The attachment ProcUsingMH.java is a sketch of an alternative implementation >>> where ea

Re: Boxing, still a limit of invokedynamic?

2012-05-13 Thread Rémi Forax
On 05/13/2012 10:21 PM, Jochen Theodorou wrote: > Am 13.05.2012 19:55, schrieb Rémi Forax: > [...] >> I think currently Groovy allows to replace + by a method >> that will return everything you want. >> But here, I think the spec of Groovy (if it means something) >>

Re: Boxing, still a limit of invokedynamic?

2012-05-13 Thread Rémi Forax
On 05/13/2012 07:21 PM, Charles Oliver Nutter wrote: > On Sun, May 13, 2012 at 11:04 AM, Jochen Theodorou wrote: >> I wanted to ask you of your opinion. If I am going to compile something >> like a+b-c and a,b,c are all primtives, but I won't know that the >> results will be really the primtives t

Re: selective inlining of MH.invokeExact() callsites

2012-05-09 Thread Rémi Forax
On 05/09/2012 08:02 PM, Christian Thalinger wrote: > On May 8, 2012, at 2:11 AM, Garcia Gutierrez Miguel Alfredo wrote: > >> What's the behavior of @ForceInlining , in particular for >> MethodHandle.invokeExact() ? > We introduced that annotation as an experiment for inlining exact invokers > for

Re: Question about inlining caching by Hotspot and classes implementing an method from an interface

2012-05-08 Thread Rémi Forax
f.foo() is a megamorphic call so the inlining cache does not work, too many possible receiver types, so the inlining cache tree is like a linked list, painfully. With a language like Java, the VM will fallback to use a vtable dispatch, you have no inlining but it's faster than either update the inl

Re: hg: mlvm/mlvm/jdk: meth-lazy: moved to ASM for bytecode generation

2012-05-02 Thread Rémi Forax
On 05/02/2012 02:37 AM, Christian Thalinger wrote: > On May 1, 2012, at 2:38 PM, Rémi Forax wrote: > >> On 05/01/2012 09:24 PM, christian.thalin...@oracle.com wrote: >>> Changeset: 5ec0f6472b4b >>> Author:twisti >>> Date: 2012-05-01 12:24 -0700 &g

Re: hg: mlvm/mlvm/jdk: meth-lazy: moved to ASM for bytecode generation

2012-05-01 Thread Rémi Forax
On 05/01/2012 09:24 PM, christian.thalin...@oracle.com wrote: > Changeset: 5ec0f6472b4b > Author:twisti > Date: 2012-05-01 12:24 -0700 > URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/5ec0f6472b4b > > meth-lazy: moved to ASM for bytecode generation > > ! meth-lazy-7023639.patch >

Re: hg: mlvm/mlvm/hotspot: annot: brought up-to-date

2012-04-26 Thread Rémi Forax
On 04/27/2012 12:54 AM, christian.thalin...@oracle.com wrote: > Changeset: 4ad86bc6f440 > Author:twisti > Date: 2012-04-26 15:53 -0700 > URL: http://hg.openjdk.java.net/mlvm/mlvm/hotspot/rev/4ad86bc6f440 > > annot: brought up-to-date > annot-inline: new patch for supporting @Inline a

Re: hg: mlvm/mlvm/hotspot: meth-lazy: renamed ConstantPoolCacheEntry vfinalMethod to f2Oop; use from_interpreted_offset instead of interpreter_entry_offset in TemplateTable::invokedynamic

2012-04-26 Thread Rémi Forax
On 04/26/2012 07:32 PM, christian.thalin...@oracle.com wrote: > Changeset: 81bd2928d85d > Author:twisti > Date: 2012-04-26 10:32 -0700 > URL: http://hg.openjdk.java.net/mlvm/mlvm/hotspot/rev/81bd2928d85d > > meth-lazy: renamed ConstantPoolCacheEntry vfinalMethod to f2Oop; use > from

Re: Boxed types and constat propagation

2012-04-25 Thread Rémi Forax
On 04/25/2012 07:23 PM, Fredrik Öhrström wrote: >>> That's a lot of optimization that I otherwise wouldn't have to do, if >>> only boxed types and constant propagation worked well, but yeah, I see >>> how it can work now. > Clearly the C1/C2 compiler needs to be improved. In the meantime > you have

Re: Boxed types and constat propagation

2012-04-25 Thread Rémi Forax
On 04/25/2012 06:38 PM, Christian Thalinger wrote: > On Apr 23, 2012, at 4:29 PM, Rémi Forax wrote: > >> On 04/24/2012 12:57 AM, Kohsuke Kawaguchi wrote: >>> On 04/23/2012 11:18 AM, Rémi Forax wrote: >>>>> So again, I don't see how shifting from method

Re: Boxed types and constat propagation

2012-04-23 Thread Rémi Forax
atic_fields(), you can add if (holder->is_in_package("java/lang")) return true; or change the flag TrustFinalNonStaticFields to true if you have build the fastdebug VM. cheers, Rémi > > On 04/23/2012 04:29 PM, Rémi Forax wrote: >> On 04/24/2012 12:57 AM, Kohsuke Kaw

Re: Boxed types and constat propagation

2012-04-23 Thread Rémi Forax
On 04/24/2012 12:57 AM, Kohsuke Kawaguchi wrote: > On 04/23/2012 11:18 AM, Rémi Forax wrote: >>> So again, I don't see how shifting from method handle tree to byte >>> code generation would somehow make this non-issue. >> >> In fact, it's easy to know t

Re: Boxed types and constat propagation

2012-04-23 Thread Rémi Forax
On 04/23/2012 06:37 PM, Kohsuke Kawaguchi wrote: > 2012/4/22 Rémi Forax: >>> So as you can see, 30 and 12 are not recognized as constants. >> You're right, 30 and 12 are not recognized as int constant >> but they are recognized as java/lang/Integer constant.

Re: Boxed types and constat propagation

2012-04-22 Thread Rémi Forax
On 04/23/2012 12:34 AM, Charles Oliver Nutter wrote: > On Sun, Apr 22, 2012 at 2:12 AM, Rémi Forax wrote: >> You are the first as far as I know to use only a tree of method handles >> to implement expressions. The rest of us generates bytecodes >> and have a compil

Re: Boxed types and constat propagation

2012-04-21 Thread Rémi Forax
See inlined comments :) On 04/22/2012 12:02 AM, Kohsuke Kawaguchi wrote: > Hi, > > I was inspired by the talk by Charles in JAX 2012 and was playing with > invokedynamic a bit. I'm observing what seems like a constant > propagation failure, which I'd imagine would affect some important use > cases

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Rémi Forax
John, I think you can remove all public methods of class WeakInternSet but ,add() i.e. tailor the implementation only for the need, at least until Doug Lea provides a weak/concurent/hashmap in java.util.concurent. Rémi On 03/29/2012 11:45 AM, Jim Laskey wrote: > What we are trying to do is inter

Re: review request (S): 7129034: VM crash with a field setter method with a filterArguments

2012-03-27 Thread Rémi Forax
On 03/27/2012 10:04 AM, John Rose wrote: > http://cr.openjdk.java.net/~jrose/7129034/webrev.00/ > > 7129034: VM crash with a field setter method with a filterArguments > Summary: add null checks before unsafe calls that take a variable base > reference; update unit tests > > This is a point fix fo

Bug in ClassValue

2012-03-11 Thread Rémi Forax
Last week, Fredrik found that I've forgotten to implement ClassValue in the backport of jsr292. While struggling to implement it, I've found a bug in the implementation of the JDK. This snippet creates an infinite loop :( java.lang.ClassValue cv = new java.lang.ClassValue() {

Re: This was very cool, adding a profiler using MH

2012-02-17 Thread Rémi Forax
On 02/17/2012 11:10 AM, Charles Oliver Nutter wrote: > On Fri, Feb 17, 2012 at 4:05 AM, Rémi Forax wrote: >>> You could also interpose on abnormal termination (exceptions), using >>> guardWithCatch. >> The try-finallly method handle combiner is one examp

Re: This was very cool, adding a profiler using MH

2012-02-17 Thread Rémi Forax
On 02/17/2012 06:29 AM, John Rose wrote: > On Feb 16, 2012, at 8:43 PM, Mark Roos wrote: > >> The key code is below and it shows the power of methodHandles is ways one >> may not expect. And it >> added almost nothing to the run time ( maybe a few %). It inserts itself >> into each callsite tar

Re: Benchmarking Smalltalk on JVM

2012-02-13 Thread Rémi Forax
On 02/02/2012 04:45 AM, Mark Roos wrote: > From Rémi > Anyway, you can optimize the last instructions, <= should > return a boolean >so the sequence should be: > >ldc 4100 >aload 1 >indy <= (ILObject;)Z >if_eq LABEL 1 > > I am not sure how to han

Re: Smalltalk and tiered compile data

2012-02-09 Thread Rémi Forax
On 02/08/2012 10:47 PM, Mark Roos wrote: > Hi Rémi Hi Mark, > > I think I am starting to get it. > > My normal fallback creates a GWT and does a getTarget + setTarget on > the root callsite to put this GWT at the > head of the chain. I assume that this use of setTarget is as expected > and cau

Re: Smalltalk and tiered compile data

2012-02-08 Thread Rémi Forax
On 02/08/2012 02:55 AM, Mark Roos wrote: > Hi Rémi > > Just a clarification on the switchpoint usage to invalidate sites. > > The switch path would still do a setTarget correct? No, SwitchPoint.invalidateAll() doesn't call setTarget(). > So I am still sending lots of > setTargets just based on sw

Re: Smalltalk and tiered compile data

2012-02-07 Thread Rémi Forax
On 02/07/2012 08:28 PM, Mark Roos wrote: > Christian asked: > > What exactly do you mean by "invalidate call sites before the > benchmark"? > Are you using MutableCallSites and call setTarget on them? > > Exactly. I am using setTarget to set each call site to its initial > fallba

Re: Benchmarking Smalltalk on JVM

2012-02-02 Thread Rémi Forax
On 02/02/2012 04:45 AM, Mark Roos wrote: > from Rémi > > if you know it will never escape,you should use an int directly. > > Well I am trying to build a Smalltalk system which has no static types so > I have to box the ints. Since the code I showed was programmer entered I > need to stay w

Re: Benchmarking Smalltalk on JVM

2012-02-02 Thread Rémi Forax
On 02/02/2012 04:45 AM, Mark Roos wrote: > From Rémi > Without the descriptors of invokedynamic and the code of the > BSM, it's >hard to tell. > > Yes but they have no invoke dynamics and I was just wondering if my > indy part was causing the > issue. Your answer told me that I s

Re: Benchmarking Smalltalk on JVM

2012-02-01 Thread Rémi Forax
On 02/01/2012 10:44 PM, Mark Roos wrote: > This may be a little much to ask but... These bytecodes take about > 20ns per cycle to run on > my 2.8 GHz mac using jdk8-B23 without TieredCompile. Does this seem > reasonable given the number of indy calls? > The GWT depth on the method sends is 1 >

Re: Benchmarking Smalltalk on JVM

2012-02-01 Thread Rémi Forax
On 02/01/2012 10:44 PM, Mark Roos wrote: > Hi Charles > > Its pretty simple. All of my integers are boxed and are by definition > immutable. However I noticed > that many uses of integer were for loop counters and indexes where the > integer never escapes from > the method. So I added two prim

Re: Benchmarking Smalltalk on JVM

2012-02-01 Thread Rémi Forax
On 02/01/2012 01:52 AM, Mark Roos wrote: > I just loaded about 250K lines of Smalltalk code into my jvm > implementation so now I can start > some real benchmarks using our application. All of this was done on a > Mac. > > My first try was a object load which takes about 20 files and creates >

Re: No way to create a no-op MethodHandle that returns void?

2012-01-24 Thread Rémi Forax
On 01/24/2012 09:40 AM, John Rose wrote: > On Jan 23, 2012, at 11:26 PM, Charles Oliver Nutter wrote: > >> Oh, that does seem to work...what an ugly hack. And actually, you can >> just use Object.class but cast the resulting return to void, and it >> works. >> >> So basically, I do this: >> >> hand

Re: hg: mlvm/mlvm/jdk: LF'ified makeAllocator; 18 MethodHandlesTests working

2012-01-04 Thread Rémi Forax
On 01/04/2012 05:28 PM, Christian Thalinger wrote: > On Dec 30, 2011, at 4:25 PM, Christian Thalinger wrote: > >> On Dec 30, 2011, at 3:45 PM, Rémi Forax wrote: >> >>> On 12/30/2011 03:26 PM, christian.thalin...@oracle.com wrote: >>>> Changeset: 700540

Re: hg: mlvm/mlvm/jdk: LF'ified makeAllocator; 18 MethodHandlesTests working

2011-12-30 Thread Rémi Forax
On 12/30/2011 03:26 PM, christian.thalin...@oracle.com wrote: > Changeset: 700540b4b52b > Author:twisti > Date: 2011-12-30 15:25 +0100 > URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/700540b4b52b > > LF'ified makeAllocator; 18 MethodHandlesTests working > > ! meth-lazy-7023639.bc

JSR 292 Goodness: Almost static final field

2011-12-17 Thread Rémi Forax
I've written a blog entry about how to write a static volatile final variable, i.e. a variable which is considered as constant by the compiler (the JIT) and if the variable changes, the JITed code is deoptimized and jump back in interpreter mode to eventually optimize it again later. http://webl

Re: How to monitor SwitchPoint's impact?

2011-12-12 Thread Rémi Forax
On 12/12/2011 05:38 PM, Charles Oliver Nutter wrote: > I'm still of the opinion that you shouldn't fix it, or at least > shouldn't demote "noisy" call sites to never optimize. It's not > common, but there are Ruby programs that may define a new class or > method at runtime even at steady state. Not

Re: The NoClassDefFoundError bug is back :(

2011-12-08 Thread Rémi Forax
/console > > On Tue, Dec 6, 2011 at 3:52 AM, Rémi Forax wrote: >> I've forget to say that a workaround is to erase the type used the callsite >> before calling dynamicInvoker(). > Can you elaborate on this? I'm not using dynamicInvoker...I bind the > site and use i

Re: The NoClassDefFoundError bug is back :(

2011-12-06 Thread Rémi Forax
On 12/06/2011 10:34 AM, Rémi Forax wrote: > On 12/05/2011 04:28 PM, Rémi Forax wrote: >> John, Christian, >> I was updating the multi-dispatch sample from the cookbook >> when the NoClassDefFoundError bug re-appear. > I've reduced the code to this

Re: The NoClassDefFoundError bug is back :(

2011-12-06 Thread Rémi Forax
On 12/05/2011 04:28 PM, Rémi Forax wrote: > John, Christian, > I was updating the multi-dispatch sample from the cookbook > when the NoClassDefFoundError bug re-appear. I've reduced the code to this simple sample: public class NoClassDefFoundSample { public void foo() {

The NoClassDefFoundError bug is back :(

2011-12-05 Thread Rémi Forax
John, Christian, I was updating the multi-dispatch sample from the cookbook when the NoClassDefFoundError bug re-appear. [forax@localhost multi-dispatch]$ java -ea -cp classes:. Main2 skip java.lang.String.contentEquals/2 skip java.lang.String.replace/3 Exception in thread "main" java.lang.NoCla

Re: review request (L): 7030453: JSR 292 ClassValue.get method is too slow

2011-12-04 Thread Rémi Forax
On 12/05/2011 01:27 AM, Joe Darcy wrote: > On 12/4/2011 2:13 PM, Rémi Forax wrote: >> On 12/04/2011 08:38 PM, Joe Darcy wrote: >>> Hi John, >>> >>> Are there alternatives to adding two new fields to java.lang.Class? >>> I assume most Class&#x

Re: review request (L): 7030453: JSR 292 ClassValue.get method is too slow

2011-12-04 Thread Rémi Forax
On 12/04/2011 08:38 PM, Joe Darcy wrote: > Hi John, > > Are there alternatives to adding two new fields to java.lang.Class? I > assume most Class'es won't have ClassValue information associated with > them. > > -Joe If you use Groovy, JRuby or Nashorn in your code, all visible classes will use

Re: Process-level fork on OpenJDK...is it madness?

2011-11-30 Thread Rémi Forax
On 11/30/2011 04:28 PM, Jochen Theodorou wrote: > Am 30.11.2011 14:02, schrieb Rémi Forax: > [...] >>>> What kind of initialization work is this? Could the result of that work >>>> be cached? >>> we have to setup the initial meta class system, which require

Re: Process-level fork on OpenJDK...is it madness?

2011-11-30 Thread Rémi Forax
On 11/30/2011 12:10 AM, Jochen Theodorou wrote: > Am 29.11.2011 23:34, schrieb Thomas Wuerthinger: >> On 11/29/11 11:22 PM, Jochen Theodorou wrote: >>> Am 29.11.2011 22:32, schrieb Mark Roos: >>> [...] I just finished a paper (link below) on JVM startup time which states that for small pr

Re: Implementing a Smalltalk debugger with JSR292

2011-11-27 Thread Rémi Forax
On 11/27/2011 07:16 AM, Mark Roos wrote: One of the key parts of Smalltalk is the 'live' debugger. Unlike the general dynamic language features which are well supported by the additions from JSR292 the debugger requires support which may not have been considered as necessary to support dynamic

Re: OpenJDK 8 + lambdas build for OS X

2011-11-17 Thread Rémi Forax
On 11/17/2011 02:50 PM, Henri Gomez wrote: >> So Lambda (& Jigsaw) are in their own Projects with their own >> hg forests. Note that Mike& Maurizio synced up the lambda forest >> with JDK 8 recently: >> http://mail.openjdk.java.net/pipermail/lambda-dev/2011-November/004128.html >> so creating suc

Re: OpenJDK 8 + lambdas build for OS X

2011-11-17 Thread Rémi Forax
Hi Behrang, the lambda workspace is not yet included in the master workspace of openjdk 8 because a lot of APIs/implementations are too young/too experimental. Rémi On 11/17/2011 01:31 PM, Behrang Saeedzadeh wrote: > Hi all, > > I just grabbed the latest version of the OpenJDK 8 build from > htt

Re: MutableCallSite + constant handle slower than field accesses?

2011-10-17 Thread Rémi Forax
On 10/17/2011 10:30 PM, Charles Oliver Nutter wrote: > It seems like the natural solution! :) Invokedynamic is nothing > without the handles wiring it up...so they should always live happily > together in the land of fairies and unicorns. no pony :( > > - Charlie Rémi __

Re: Mac+newest JDK changes?

2011-10-14 Thread Rémi Forax
On 10/14/2011 09:43 AM, Ola Bini wrote: > Hi, > > I'm finally about to get back to hacking on Seph, specifically looking > at performance - I would really like to be able to run the latest > changes (things for u2 related to invoke dynamic) in MacOS X - what is > the current status of this, and is

Re: dyn.js - invokedynamic-based js implementation

2011-10-13 Thread Rémi Forax
On 10/13/2011 04:24 PM, Douglas Campos wrote: > Remi, >>> By example, for javascript Number, it should be a j.l.Double but with >>> it's own vtable > when you talk about having a vtable, you mean the "verified-entrypoint" > recipe from jsr292 cookbook? (or something into these lines) > > So I woul

Re: Google Dart

2011-10-11 Thread Rémi Forax
On 10/10/2011 08:58 PM, Charles Oliver Nutter wrote: > I agree it would be an interesting language on the JVM. It may be the > "dynamic Java" I've wanted to make for a long time, with the added > bonus of optional static types. > > This could almost be a weekend project atop invokedynamic. The typ

Re: dyn.js - invokedynamic-based js implementation

2011-10-11 Thread Rémi Forax
On 10/11/2011 12:22 AM, John Rose wrote: > On Oct 10, 2011, at 7:12 AM, Douglas Campos wrote: > >> Hello mlvm friends, just a heads up that dyn.js is released at >> https://github.com/dynjs/dyn.js >> >> feedback is more than welcome :) > Congratulations on getting this working... > > Nice, crunchy

Re: Google Dart

2011-10-11 Thread Rémi Forax
travariant. Rémi On Mon, Oct 10, 2011 at 4:02 PM, Rémi Forax <mailto:fo...@univ-mlv.fr>> wrote: On 10/10/2011 09:51 AM, Marcus Lagergren wrote: > FYI, > > Google Dart now has a twitter account : > https://twitter.com/#!/dart_lang <https://twitte

  1   2   3   4   5   6   7   >