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

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

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 john.r.r...@oracle.com a écrit : On Feb 25, 2015, at 6:29 PM, John Rose john.r.r...@oracle.com wrote: Maybe this is general enough: MHs.loop(init, predicate, body)(*a) = { let i = init(*a); while (predicate(i, *a)) { 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 head...@headius.com 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

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 mja...@gmail.com a écrit : I've been experimenting with invokedynamic in a compiler for a

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

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 This version as some speed improvements

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 agent

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

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 binds.

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

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 fo...@univ-mlv.fr a écrit : On 07/22/2012 11:38 AM, Henri Gomez wrote: Hi to all, Even using Java 8 for building MLVM, using stephen

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?)? Is

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_object(),

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 the

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

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 john.r.r...@oracle.com 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

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 john.r.r...@oracle.com wrote: One problem with mixed mode systems is that a method like executeMyLanguagesInterpretedMethodUntilItGetsCompiled wants to display a method name based on some value

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

2012-07-11 Thread Rémi Forax
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 fo...@univ-mlv.fr mailto:fo...@univ-mlv.fr wrote: On 07/10/2012 10:42 AM, john.r.r...@oracle.com mailto:john.r.r...@oracle.com wrote

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.patch

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. The answer is that hiding of stack frames

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 think generateConcreteBMHClass needs to return a 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 filtering

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:

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 there are

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? Also, from all the presentations

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 year

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. I'll certainly explore

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, reflection and

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

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 to

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 cannot do. (1) calling private methods actually I am not sure

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

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 in Graal

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 functions

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 handle this kind of case, since it's supposed

Re: megamorphic lambda prevention

2012-06-21 Thread Rémi Forax
be easier to go backward. Rémi On Thu, Jun 21, 2012 at 10:30 AM, Rémi Forax fo...@univ-mlv.fr mailto:fo...@univ-mlv.fr wrote: On 06/21/2012 04:12 PM, Jochen Theodorou wrote: Am 21.06.2012 16 tel:21.06.2012%2016:00, schrieb Rémi Forax: On 06/21/2012 03:52 PM, Jochen Theodorou

Re: megamorphic lambda prevention

2012-06-21 Thread Rémi Forax
be easier to go backward. Rémi On Thu, Jun 21, 2012 at 10:30 AM, Rémi Forax fo...@univ-mlv.fr mailto:fo...@univ-mlv.fr wrote: On 06/21/2012 04:12 PM, Jochen Theodorou wrote: Am 21.06.2012 16 tel:21.06.2012%2016:00, schrieb Rémi Forax: On 06/21/2012 03:52 PM, Jochen Theodorou

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. only

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 should be

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. About the bytecode you generate, as you said

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

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 Bothnerp...@bothner.com wrote: The attachment ProcUsingMH.java is a sketch of an alternative implementation

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 Theodoroublackd...@gmx.org 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

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: 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

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

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 handle tree to byte code generation would somehow make

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 Foraxfo...@univ-mlv.fr: 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. 0x7f785ca29706: mov

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 that a.foo() is a boolean because can be only

Re: Boxed types and constat propagation

2012-04-23 Thread Rémi Forax
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 Kawaguchi wrote: On 04/23/2012 11:18 AM, Rémi Forax wrote

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 Foraxfo...@univ-mlv.fr 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 compiler that does constant

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, so

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

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 for JDK

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.ClassValueInteger cv = new

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 target and

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 causes no

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 switch

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 fallback

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 should

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 with

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 a

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

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: 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: handler =

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: 700540b4b52b Author:twisti Date: 2011-12-30 15:25

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.bcg.patch

Re: The NoClassDefFoundError bug is back :(

2011-12-08 Thread Rémi Forax
On 12/08/2011 06:58 PM, Charles Oliver Nutter wrote: I just had a report of the same error in 1.7.0GA, and I saw it on the CI server last night after I set up a 1.7.0_01 build. Did it linger into GA? http://ci.jruby.org/job/jruby-test-matrix/jdk=sun-java-7,label=master/406/console On Tue,

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() { // do nothing

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

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 this

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'es won't have ClassValue information associated with them. -Joe

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 requires to use reflection to inspect some classes and other

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
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

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 such builds

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 it

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 would be

Re: Google Dart

2011-10-11 Thread Rémi Forax
. Rémi On Mon, Oct 10, 2011 at 4:02 PM, Rémi Forax fo...@univ-mlv.fr 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://twitter.com/#%21/dart_lang

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 type

Re: Google Dart

2011-10-10 Thread Rémi Forax
On 10/10/2011 09:51 AM, Marcus Lagergren wrote: FYI, Google Dart now has a twitter account : https://twitter.com/#!/dart_lang https://twitter.com/#%21/dart_lang and Website is up http://www.dartlang.org/ /M OMG, Dart is the next Java not the next Javascript ! Rémi

Re: Google Dart

2011-10-10 Thread Rémi Forax
in a long time - a new language to get exciterd about... On Oct 10, 2011 8:02 AM, Rémi Forax fo...@univ-mlv.fr 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

Re: Help with JIT talk for tomorrow

2011-10-06 Thread Rémi Forax
On 10/06/2011 03:27 PM, Krystal Mok wrote: I tried to document PrintCompilation a while ago, here: https://gist.github.com/1165804#file_notes.md Hope it helps. Sorry for the late reply, we're in holiday this week here in China. Regards, Kris Mok Wow ! Impressive ! You should update the

Re: hg: mlvm/mlvm/hotspot: 2 new changesets

2011-10-02 Thread Rémi Forax
On 10/02/2011 03:03 AM, Mark Roos wrote: This is a pretty cool use of coroutines. I am trying a similar approach for a web browser base UI and was looking for a pattern do handle the time out case. So I send something to the UI, say open a dialog box, and suspend the coroutine. but the UI

Re: hg: mlvm/mlvm/hotspot: 2 new changesets

2011-10-01 Thread Rémi Forax
On 09/27/2011 11:26 PM, Rémi Forax wrote: On 09/27/2011 11:12 PM, Lukas Stadler wrote: Yes :-) and there's more: Pre-built binaries for linux x64 and more documentation at: http://ssw.jku.at/General/Staff/LS/coro/ The page is work in progress, though. I'll have to finish it by next week

Re: hg: mlvm/mlvm/hotspot: 2 new changesets

2011-09-27 Thread Rémi Forax
On 09/27/2011 11:12 PM, Lukas Stadler wrote: Yes :-) and there's more: Pre-built binaries for linux x64 and more documentation at: http://ssw.jku.at/General/Staff/LS/coro/ The page is work in progress, though. I'll have to finish it by next week, in order to direct people to it at my JavaOne

Re: hg: mlvm/mlvm/hotspot: 2 new changesets

2011-09-27 Thread Rémi Forax
On 09/27/2011 11:12 PM, Lukas Stadler wrote: Yes :-) and there's more: Pre-built binaries for linux x64 and more documentation at: http://ssw.jku.at/General/Staff/LS/coro/ The page is work in progress, though. I'll have to finish it by next week, in order to direct people to it at my JavaOne

Re: hg: mlvm/mlvm/hotspot: 2 new changesets

2011-09-27 Thread Rémi Forax
On 09/27/2011 11:12 PM, Lukas Stadler wrote: Yes :-) and there's more: Pre-built binaries for linux x64 and more documentation at: http://ssw.jku.at/General/Staff/LS/coro/ The page is work in progress, though. I'll have to finish it by next week, in order to direct people to it at my JavaOne

Re: Request for review (L): 7087838: JSR 292: add throttling logic for optimistic call site optimizations

2011-09-18 Thread Rémi Forax
Hi Mark, the throttle occurs if you deoptimize an already JITed callsite 10 times. If the callsite is not JITed, you can call setTarget() without triggering the throttle logic. So the main problem you will have is if your program always calls very often the same hot code and is really big.

Re: Request for review (L): 7087838: JSR 292: add throttling logic for optimistic call site optimizations

2011-09-18 Thread Rémi Forax
On 09/18/2011 07:16 PM, Mark Roos wrote: In looking at my code. In general 98% of the callsites are 3 targets. Those that are larger I can catch and use a different lookup. I also believe that Charles Nutter limits his depth to 5. So the general case I see will not exceed the 10. But I

Re: Request for review (L): 7087838: JSR 292: add throttling logic for optimistic call site optimizations

2011-09-17 Thread Rémi Forax
Hi Christian, hi all, I understand that you need such kind of logic but I think it's not compatible with the approach taken by Mark Roos i.e flush all callsites if more than a predefined number of callsites have installed an inlining cache. A possible solution is to add a way in the API to know

Re: Hotspot loves PHP.reboot

2011-09-09 Thread Rémi Forax
I've taken the time to write a small prototype (by hand :( ) see http://www-igm.univ-mlv.fr/~forax/tmp/jsr292-deopt.zip using Fibonacci as John suggest. The idea is to transfer the control from fibo written using ints to fibo written using Object (BigInteger at runtime). If an operation

Re: Hotspot loves PHP.reboot

2011-09-08 Thread Rémi Forax
On 09/08/2011 01:12 AM, John Rose wrote: On Sep 7, 2011, at 3:28 PM, Rémi Forax wrote: On 09/07/2011 10:38 PM, John Rose wrote: Object l0, l1, l2, ...; l0 = l1 = l2 = ... null; // these are required only for definite assignment in the catch body try { ...do fast path

Re: Hotspot loves PHP.reboot

2011-09-07 Thread Rémi Forax
On 09/07/2011 09:08 AM, John Rose wrote: On Sep 7, 2011, at 12:00 AM, Per Bothner wrote: I assume this is one reason why Kawa's IntNum is (mostly) faster than BigInteger. Yes, that's probably true. Here's a dirty secret: As you can see from the OpenJDK sources, BigDecimal, but not

Re: Hotspot loves PHP.reboot

2011-09-07 Thread Rémi Forax
On 09/07/2011 01:00 PM, MacGregor, Duncan (GE Energy) wrote: Could we do pass a method handle into this hypothetical to this hypothetical addDetectingOverflow and allow thus allow the caller to specify what should happen in the overflow case? Or does that still leave too much of a problem

Re: Hotspot loves PHP.reboot

2011-09-07 Thread Rémi Forax
On 09/07/2011 01:22 PM, Christian Thalinger wrote: On Sep 7, 2011, at 11:15 AM, Rémi Forax wrote: On 09/07/2011 09:08 AM, John Rose wrote: On Sep 7, 2011, at 12:00 AM, Per Bothner wrote: I assume this is one reason why Kawa's IntNum is (mostly) faster than BigInteger. Yes, that's

Re: Hotspot loves PHP.reboot

2011-09-07 Thread Rémi Forax
On 09/07/2011 05:07 AM, Charles Oliver Nutter wrote: On Tue, Sep 6, 2011 at 6:10 PM, John Rosejohn.r.r...@oracle.com wrote: Yes. Your request for JO makes me think some users would be happy with a boolean test, a la addWouldOverflow. It's what happens after the test that differs widely

Re: Hotspot loves PHP.reboot

2011-09-07 Thread Rémi Forax
On 09/07/2011 09:32 PM, Per Bothner wrote: On 09/07/2011 02:15 AM, Rémi Forax wrote: This remember me that we don't have any benchmarks using dynamic languages which is, as you explain, not good on the long term. What about having 10 to 12 benchs, one by language, provided by each language

  1   2   3   4   >