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

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 > and Website is up > http://www.dartlang.org/ > > /M OMG, Dart is the next Java not the next Javascript ! Rémi __

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 updat

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 nex

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 t

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 t

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 t

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

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 if

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

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

Re: Hotspot loves PHP.reboot

2011-09-07 Thread Rémi Forax
On 09/07/2011 10:38 PM, John Rose wrote: On Sep 7, 2011, at 12:33 PM, Thomas Wuerthinger wrote: This would probably also mean that the exception object created for capturing the slow-case program state needs to be escape-analyzed and removed in the optimized code that deoptimizes on overflow?

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

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 Rose 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 among applications

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

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 reg

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 BigInteg

Re: Hotspot loves PHP.reboot

2011-09-06 Thread Rémi Forax
On 09/06/2011 10:19 PM, John Rose wrote: On Sep 6, 2011, at 12:58 PM, John Rose wrote: What's needed here is a way to get 33 bits out of a 32-bit add intrinsic. There's no fully natural way to do this, and about 4 kludgey ways. Because there are so many poor ways to shape the API, it's hard

Re: Hotspot loves PHP.reboot

2011-09-06 Thread Rémi Forax
On 09/06/2011 05:51 PM, Charles Oliver Nutter wrote: > On Tue, Sep 6, 2011 at 10:39 AM, Rémi Forax wrote: >> Yes, but don't forget that PHP.reboot has no overflow check. > Did we ever figure out if it's possible to trick Hotspot into doing a > JO instead of the raw b

Re: Hotspot loves PHP.reboot

2011-09-06 Thread Rémi Forax
On 09/06/2011 07:33 PM, Christian Thalinger wrote: > On Sep 6, 2011, at 5:51 PM, Charles Oliver Nutter wrote: > >> On Tue, Sep 6, 2011 at 10:39 AM, Rémi Forax wrote: >>> Yes, but don't forget that PHP.reboot has no overflow check. >> Did we ever figure out if it&

Re: Hotspot loves PHP.reboot

2011-09-06 Thread Rémi Forax
On 09/06/2011 04:59 PM, Charles Oliver Nutter wrote: > Awesome numbers, especially promising for impls like JRuby that will > never have type annotations and for which type inference will be very > limited. Getting within 3x Java while still fully boxed is amazing. Yes, but don't forget that PHP.r

Re: Hotspot loves PHP.reboot

2011-09-05 Thread Rémi Forax
On 09/05/2011 12:22 PM, Christian Thalinger wrote: > On Sep 5, 2011, at 1:11 AM, Rémi Forax wrote: > >> I've just compiled the hotspot (64bits server) using the hotspot-comp >> workspace of hotspot express (hsx) >> http://hg.openjdk.java.net/hsx/hotspot-comp/hotsp

Hotspot loves PHP.reboot

2011-09-04 Thread Rémi Forax
I've just compiled the hotspot (64bits server) using the hotspot-comp workspace of hotspot express (hsx) http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/ Here are the result when running PHP.reboot on fibonacci (-server is the server VM of jdk1.7.0): Java: java -server bigfibo4.45 s

Re: Finally a test case for the ClassNotFound

2011-08-26 Thread Rémi Forax
On 08/26/2011 09:24 PM, Mark Roos wrote: Thanks for the quick look. (glad to see it ran for you) By the 'runtime' to add to the bootclass path do you mean rt.jar or my runtime (RtalkTest.jar)? Your runtime. rt.jar is already in the bootstrap path. mark cheers, Rémi _

Bootstrap arguments

2011-08-25 Thread Rémi Forax
Hi John, hi all, several people (2 actually :) ask me how to use a boolean/byte/short/char as a bootstrap argument. As you know, you can't because you can't encode a constant boolean/byte/short/char in the constant pool but only an int and because asType() doesn't do narrowing primitive conversio

Re: Thread safety and nethod handle chains

2011-08-20 Thread Rémi Forax
On 08/20/2011 08:14 AM, John Rose wrote: > On Aug 19, 2011, at 9:15 PM, Mark Roos wrote: > >> The end fallback/lookup is synchronized and so there is only one update at a >> time, but the >> new GWT is added to the start of the chain and the second thread is past >> that point. So >> when the s

Re: naming of internal MH classes

2011-08-19 Thread Rémi Forax
On 08/19/2011 01:31 AM, John Rose wrote: > Here is a heads-up before an engineering code review! > > The OpenJDK implementation of JSR 292 has a number of private MH subclasses, > including DirectMethodHandle, BoundMethodHandle, AdapterMethodHandle, > AdapterMethodHandle.AsVarargsCollector. Exce

Re: Fwd: [asm] toward ASM 4.0

2011-08-18 Thread Rémi Forax
Hi Alexander, the generic solution is to override getCommonSuperClass() to provide the common super class of your type system (runtime or not). The default implementation uses the reflection, i.e the type system provided by the VM. The issue raised by Duncan was just a bug introduced by me when I

Re: Fwd: [asm] toward ASM 4.0

2011-08-18 Thread Rémi Forax
There is a fix available in the trunk of ASM. Thanks Ducan. Rémi On 08/18/2011 11:20 AM, MacGregor, Duncan (GE Energy) wrote: It showed up for me in generating classes within compilation tests, which were being loaded by a test runner. I doubt it would show up normally. *From:*mlvm-dev-bou

Re: recipes for asType and explicitCastArguments

2011-08-17 Thread Rémi Forax
On 08/17/2011 09:47 PM, John Rose wrote: > ## Using an interface as a marker for "dynamically typed reference" > 1. Take one fresh interface D. Remove all methods. > 2. Sprinkle D freely in invokedynamic signatures, wherever a static type > "dynamic" is desired. > 3. When binding a MH to such an

Re: Fwd: [asm] toward ASM 4.0

2011-08-17 Thread Rémi Forax
On 08/17/2011 08:12 PM, MacGregor, Duncan (GE Energy) wrote: Since Remi hasn't replied (or it hasn't reached my mailbox if he has). Yes, MethodType is now merged with Type, and MethodHandle is now Handle, which makes everything much more readable. You will however have to make sure you've cha

Re: JRuby + invokedynamic on IKVM.NET

2011-08-16 Thread Rémi Forax
On 08/16/2011 03:46 PM, Jeroen Frijters wrote: > Hi everyone, Hi Jeroen, > > I "finished" the initial JSR292 implementation. I haven't done any > performance work and it shows: > > ikvm -Djruby.compile.invokedynamic=false -jar jruby-complete-1.7.0.dev.jar > bench\bench_fib_complex.rb > normal f

Re: JRuby invokedynamic updates

2011-08-12 Thread Rémi Forax
On 08/12/2011 08:22 PM, Tom Rodriguez wrote: >> I wonder if this patch is not too much. >> If a big method is called through an invokedynamic + method handle >> then it will be inlined. > That's not how it works. The methods called by the adapter will still have > to pass normal inlining checks

Re: JRuby invokedynamic updates

2011-08-12 Thread Rémi Forax
On 08/12/2011 08:41 PM, Christian Thalinger wrote: > On Aug 12, 2011, at 8:18 PM, Tom Rodriguez wrote: > >>> Well, it's the good old: >>> >>> @ 95 java.lang.invoke.MethodHandle::invokeExact (45 bytes) size> >>> DesiredMethodLimit >>> >>> This seems to be the last recursive call that doesn't g

Re: JRuby invokedynamic updates

2011-08-12 Thread Rémi Forax
Hi Chistian, On 08/12/2011 11:44 AM, Christian Thalinger wrote: > On Aug 11, 2011, at 11:07 PM, Charles Oliver Nutter wrote: > >> On Wed, Aug 10, 2011 at 11:02 PM, Charles Oliver Nutter >> wrote: >>> I've added bench/bench_fib_complex.rb. This runs the original fib >>> along with three variation

Re: GWT fast vs slow path

2011-08-11 Thread Rémi Forax
On 08/11/2011 11:39 PM, Mark Roos wrote: I was wondering what the expected differences are in the usage of these two paths. The names imply something but I find it confusing. In my use case ( in line cache) one of the paths is directly into a method handle to invoke and the other goes to eith

Re: Thread safety and nethod handle chains

2011-08-11 Thread Rémi Forax
On 08/11/2011 11:39 PM, Mark Roos wrote: As I start to look at the multithreading aspects of the Smalltalk implementation I can see a situation where two threads could be running down the GWT lookup path both looking for the same implementation. I was thinking of making the lookup synchronized

Fwd: [asm] toward ASM 4.0

2011-08-11 Thread Rémi Forax
A message from our glorious ASM leader. Rémi Original Message Subject:[asm] toward ASM 4.0 Date: Thu, 11 Aug 2011 17:45:20 +0200 From: Eric Bruneton To: a...@ow2.org Hi, we are about to release ASM 4.0. Compared to ASM 4.0 RC1, we mostly renamed the packag

Re: JRuby/Seph/PHP.reboot/... SwitchPoint usage

2011-08-08 Thread Rémi Forax
On 08/08/2011 03:51 PM, Christian Thalinger wrote: > Since I have the basic push-notification of CallSites I'm now looking into > push-notification of SwitchPoints: > > 7071709: JSR 292: switchpoint invalidation should be pushed not pulled > > Basically it should be the same, just needs some addit

Re: hg: mlvm/mlvm/jdk: cval: hang caches on classes

2011-08-04 Thread Rémi Forax
Not sure to understand the full patch, anyway nextHashCode should be declared final. regards, Rémi On 08/04/2011 10:21 AM, John Rose wrote: Benchmarks indicate a 4x speedup from previous implementation. The fast path has 7 memory references. Here's what it looks like: {mov eax, (cval :

Stolen: Re: [concurrency-interest] LongAdder (was: StripedAdder) and LongAdderTable

2011-08-01 Thread Rémi Forax
An interesting post stolen from the Doug Lea's concurrency mailing list. Having this kind of counter can be really great for those that want to do profiling without having an interpreter Groovy, Nashorn, ... Basically, this kind of counter already exist in the VM, is there a way to bubble them u

Re: Crash from "recursive" method handle chain

2011-07-27 Thread Rémi Forax
On 07/27/2011 01:27 PM, Christian Thalinger wrote: > On Jul 27, 2011, at 12:41 PM, Charles Oliver Nutter wrote: > >> On Wed, Jul 27, 2011 at 3:21 AM, Rémi Forax wrote: >>> I've just read your slides [1]. >>> I believe that the test before returning the result of

Re: Crash from "recursive" method handle chain

2011-07-27 Thread Rémi Forax
On 07/27/2011 12:41 PM, Charles Oliver Nutter wrote: > On Wed, Jul 27, 2011 at 3:21 AM, Rémi Forax wrote: >> I've just read your slides [1]. >> I believe that the test before returning the result of add (slide 201) >> is a safepoint check. > Oh really? What is it

Re: Crash from "recursive" method handle chain

2011-07-27 Thread Rémi Forax
On 07/27/2011 11:50 AM, Charles Oliver Nutter wrote: > I'm getting back into invokedynamic stuff (in between > conferencing...whew!). Perf reports are coming soon, but in the > interim I've just read your slides [1]. I believe that the test before returning the result of add (slide 201) is a

Re: compiler accepts incompatible method reference for Sam conversion

2011-07-13 Thread Rémi Forax
On 07/13/2011 06:01 AM, Ali Ebrahimi wrote: Hi Ali, ... > MethodHandle mh = MethodHandles.lookup().findStatic(MethodHandleTest.class, > "sTest", MethodType.methodType(void.class,int.class,int.class)); > MethodHandle smh = mh.asSpreader(Object[].class, > mh.type().parameterCount()); > > smh.invoke

Re: MethodHandle lookup&invocation performance

2011-07-11 Thread Rémi Forax
On 07/11/2011 03:17 PM, Christian Thalinger wrote: > On Jul 9, 2011, at 3:27 PM, Hiroshi Nakamura wrote: >> Hello, >> >> Thanks for you comments. >> >> On Sat, Jul 9, 2011 at 19:01, Jochen Theodorou wrote: Code is here: https://raw.github.com/nahi/jsr292-sandbox/master/src/jp/gr/java_con

Re: MethodHandle lookup&invocation performance

2011-07-11 Thread Rémi Forax
On 07/11/2011 03:34 PM, Hervé Girod wrote: > Hello, > > My comprehension is that the lookup can be performed only once, to get the > MethodHandle, and that checks are done there and not after when using the > MethodHandle anymore. Am I right? Yes ! Rémi > Sent from my iPhone > > On 11 juil. 20

Re: MethodHandle lookup&invocation performance

2011-07-10 Thread Rémi Forax
On 07/10/2011 10:14 AM, Alexander Turner wrote: > John, > > Thanks for your fascinating reply. I would just like to clarify something: > > " > Another use case which benefits from this particular optimization > trick is "static final" method handles. I.e., if you want to get > invokedynamic-like p

Re: MethodHandle lookup&invocation performance

2011-07-09 Thread Rémi Forax
Object,String)String or to use invoke instead of invokeExact. Rémi On 07/09/2011 03:08 PM, Hiroshi Nakamura wrote: > Hello, > > Thanks for your swift responses. > > On Sat, Jul 9, 2011 at 19:29, Rémi Forax wrote: >>> You should avoid to create constants more than once. &g

Re: MethodHandle lookup&invocation performance

2011-07-09 Thread Rémi Forax
On 07/09/2011 12:21 PM, Rémi Forax wrote: > You should avoid to create constants more than once. > Also, bindTo() will create a method handle for-each call. > > You can transform your code like that: > > private static final MethodHandles.Lookup lookup = >

Re: MethodHandle lookup&invocation performance

2011-07-09 Thread Rémi Forax
You should avoid to create constants more than once. Also, bindTo() will create a method handle for-each call. You can transform your code like that: private static final MethodHandles.Lookup lookup = MethodHandles.lookup(); private static final MethodType mt = MethodType.methodType(Str

Re: where are our performance bottlenecks?

2011-07-05 Thread Rémi Forax
On 07/05/2011 04:04 PM, Christian Thalinger wrote: > Now that we are done with 7 I'm looking into performance issues we have. Are > there any that you know of and would like to get fixed for 7u2? Sound like Xmas to me. So Dear Santa Claus, 1) Remove the method handle check done when the method

Re: PHP.reboot update?

2011-06-21 Thread Rémi Forax
On 06/21/2011 01:12 PM, Rémi Forax wrote: > On 06/21/2011 11:49 AM, Christian Thalinger wrote: >> On Jun 21, 2011, at 11:35 AM, Rémi Forax wrote: >>> Ok, fixed, >>> convertArguments doesn't exist anymore and I forget to remove it from >>> the backport.

Re: PHP.reboot update?

2011-06-21 Thread Rémi Forax
On 06/21/2011 11:49 AM, Christian Thalinger wrote: > On Jun 21, 2011, at 11:35 AM, Rémi Forax wrote: >> Ok, fixed, >> convertArguments doesn't exist anymore and I forget to remove it from >> the backport. > Awesome, thanks. This one looks weird though: Great, this

Re: PHP.reboot update?

2011-06-21 Thread Rémi Forax
On 06/21/2011 12:29 PM, Christian Thalinger wrote: > On Jun 21, 2011, at 12:20 PM, Christian Thalinger wrote: >> On Jun 21, 2011, at 11:35 AM, Rémi Forax wrote: >>> Ok, fixed, >>> convertArguments doesn't exist anymore and I forget to remove it from >>> th

Re: PHP.reboot update?

2011-06-21 Thread Rémi Forax
On 06/21/2011 10:49 AM, Christian Thalinger wrote: > On Jun 20, 2011, at 6:42 PM, Rémi Forax wrote: >> On 06/20/2011 06:09 PM, Christian Thalinger wrote: >>> Remi, could you update PHP.reboot so that it works with a current JDK 7 >>> build (upcoming b146 that is)? &g

Re: Inlining heuristic trouble

2011-06-21 Thread Rémi Forax
On 06/21/2011 09:36 AM, John Rose wrote: On Jun 21, 2011, at 12:31 AM, Rémi Forax wrote: Sorry Mark and Tom, I should have been more clear. The idea is to artificially put a "never seen" flag in front of the *last* fallback in the GWT chain. Yes. One way to do this is with a V

Re: Inlining heuristic trouble

2011-06-21 Thread Rémi Forax
On 06/21/2011 09:50 AM, Mark Roos wrote: Thanks for the example Rémi Out of curiosity why is the fallback method synchronized? Something to do with SwitchPoints? No, SwitchPoint primary use case is metaclass modification/alteration. The problem is that several threads may want to update the

Re: Inlining heuristic trouble

2011-06-21 Thread Rémi Forax
On 06/21/2011 05:43 AM, Mark Roos wrote: John Rose stated See section 5, "Case Study: Inline Caches and invokedynamic". Thanks John, I have read that several times and it is very helpful A small (non-megamorphic) polymorphic cache can be represented as a cascade or decision tr

Re: Inlining heuristic trouble

2011-06-21 Thread Rémi Forax
On 06/20/2011 10:11 PM, Mark Roos wrote: Not that I am the expert here but... In the Smalltalk we are porting the typical call site supports only a few actual classes. So the method look up ( which is based on the object class ) only chooses from a small set ( mostly a single choice). This s

Re: Inlining heuristic trouble

2011-06-21 Thread Rémi Forax
On 06/21/2011 12:27 AM, John Rose wrote: > On Jun 20, 2011, at 1:11 PM, Mark Roos wrote: > >> So we do not have a path that can be assumed to be not taken (except the >> last in the chain). >> >> Perhaps in the JVM this is a poor choice for implementation of a small >> polymorphic inline cache.

Re: PHP.reboot update?

2011-06-20 Thread Rémi Forax
On 06/20/2011 06:09 PM, Christian Thalinger wrote: > Remi, could you update PHP.reboot so that it works with a current JDK 7 build > (upcoming b146 that is)? What is the problem ?? > -- Christian Rémi ___ mlvm-dev mailing list mlvm-dev@openjdk.java.n

Re: Inlining heuristic trouble

2011-06-18 Thread Rémi Forax
On 06/18/2011 03:15 AM, Tom Rodriguez wrote: > On Jun 17, 2011, at 5:00 PM, John Rose wrote: > >> On Jun 17, 2011, at 10:21 AM, Tom Rodriguez wrote: >> Sorry, I was thinking recording which branch of the GWT is taken and storing them in the GWT. Two GWTs should not share the same met

Re: Indy crash

2011-06-17 Thread Rémi Forax
On 06/17/2011 08:17 PM, Rémi Forax wrote: > On 06/17/2011 08:15 PM, Charles Oliver Nutter wrote: >> :( >> >> [apt] >> /Users/headius/projects/jruby/src/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java:602: >> cannot find symbol

Re: Indy crash

2011-06-17 Thread Rémi Forax
rguments(context, caller, self, name, arg0, block); > > - Charlie oups, invoke* is not a good filter. will fix. Rémi > On Fri, Jun 17, 2011 at 12:51 PM, Charles Oliver Nutter > wrote: >> On Fri, Jun 17, 2011 at 4:18 AM, Rémi Forax wrote: >>> Latest backport (1.7)

Re: Inlining heuristic trouble

2011-06-17 Thread Rémi Forax
On 06/17/2011 11:50 AM, Christian Thalinger wrote: [...] >> I wonder if I haven't introduce a bug in my logic, >> there is a the boxing/unboxing of the return value of the test that >> should not occur. >> Question, does EA is also disable when MH.invokeExact is called ? > Yes, as MH.invokeExact

Re: Inlining heuristic trouble

2011-06-17 Thread Rémi Forax
On 06/17/2011 11:14 AM, Rémi Forax wrote: > On 06/17/2011 10:58 AM, Christian Thalinger wrote: >> On Jun 15, 2011, at 5:26 PM, Rémi Forax wrote: >>> // with the optimization >>> [forax@localhost binary-operation]$ time java -cp .:classes PerfOpt >>> real0

Re: Indy crash

2011-06-17 Thread Rémi Forax
On 06/17/2011 02:49 AM, Charles Oliver Nutter wrote: > On Thu, Jun 16, 2011 at 3:16 PM, Rémi Forax wrote: >> good idea. > One more request while you're in there... a mock for ClassValue :) Latest backport (1.7) mock jar includes ClassValue and 'excludes' Mh.invok

Re: Inlining heuristic trouble

2011-06-17 Thread Rémi Forax
On 06/17/2011 10:58 AM, Christian Thalinger wrote: > On Jun 15, 2011, at 5:26 PM, Rémi Forax wrote: >> // with the optimization >> [forax@localhost binary-operation]$ time java -cp .:classes PerfOpt >> real0m0.954s >> user0m1.030s >> sys0m0.087s >

Re: Indy crash

2011-06-16 Thread Rémi Forax
On 06/16/2011 09:27 PM, Charles Oliver Nutter wrote: > On Thu, Jun 16, 2011 at 1:30 PM, Rémi Forax wrote: >> The other reasonable solution is to patch the jdk6 compiler >> to raise an error if MH.invoke*() is used. > Actually, since I'm compiling against your backport&#x

Re: Indy crash

2011-06-16 Thread Rémi Forax
On 06/16/2011 08:23 PM, Charles Oliver Nutter wrote: > On Wed, Jun 15, 2011 at 4:58 PM, Rémi Forax wrote: >> On 06/15/2011 09:55 PM, Charles Oliver Nutter wrote: >>> On Wed, Jun 15, 2011 at 2:42 PM, Rémi Foraxwrote: >>>> You can use invokeWithArguments instead

Re: Indy crash

2011-06-15 Thread Rémi Forax
On 06/15/2011 09:55 PM, Charles Oliver Nutter wrote: > On Wed, Jun 15, 2011 at 2:42 PM, Rémi Forax wrote: >> You can use invokeWithArguments instead of invokeExact. > Yes, that helps, but I was under the impression that invokeExact would > do a better job inlining at least the earl

Re: Indy crash

2011-06-15 Thread Rémi Forax
On 06/15/2011 09:27 PM, Charles Oliver Nutter wrote: > On Wed, Jun 15, 2011 at 10:32 AM, Tom Rodriguez > wrote: >> I get the following message when I try to run it: >> >> InvokeDynamicSupport.java:468:in `invocationFallback': >> java.lang.invoke.WrongMethodTypeException: >> (Lorg/jruby/runtime/

Inlining heuristic trouble

2011-06-15 Thread Rémi Forax
I've just finished to code a sample for the cookbook that does integer operation (+ and -) with overflow (to BigInteger). https://code.google.com/p/jsr292-cookbook/source/browse/#svn%2Ftrunk%2Fbinary-operation%2Fsrc%2Fjsr292%2Fcookbook%2Fbinop For a code like this one: max = ... for(i=0; ihttp://

Re: Invokedynamic updates for JRuby

2011-06-15 Thread Rémi Forax
00 ( 0.669000) > > - Charlie > > On Tue, Jun 14, 2011 at 8:50 PM, Charles Oliver Nutter > wrote: >> I did take your advice and add paths for +- 1 and 2, but did not see an >> improvement in perf. That's not to say there wasn't one, but it may be lost >&g

Re: Invokedynamic updates for JRuby

2011-06-14 Thread Rémi Forax
On 06/14/2011 05:02 PM, Charles Oliver Nutter wrote: > Disabled (for perf or incompleteness): > * Math operator invocations with literal fixnum RHS (incomplete: no guards) I'm working on an example for the cookbook that allows integers to overflow to BigInteger and has special paths when a constan

Re: Regression in newest MLVM build

2011-06-11 Thread Rémi Forax
It works with jdk7 b144, no way to access to b145 due to java.net maintenance. Rémi On 06/11/2011 11:18 PM, Attila Szegedi wrote: public class TestVarArgInvoke { public static void main(String[] args) throws Throwable { java.lang.invoke.MethodHandles.publicLookup().unreflect( TestVa

Re: [jvm-l] JSR292 CookBook

2011-06-11 Thread Rémi Forax
ile like it was before class maipulation. I thought that if ASM takes care of measuring stack needs it would take careofversio number too. Thanks, Szymon The version is checked only if you use the CheckClassAdapter in your adapter chain. Rémi On Fri, Jun 10, 2011 at 12:21 AM, Rémi Forax <

Re: [jvm-l] JSR292 CookBook

2011-06-09 Thread Rémi Forax
.]" Which build of JDK7 and ASM framework should I use to experiment with the cookbook and the JSR in general? It should be ok with build 145. try: java -version TIA -- Sz. Rémi On Sun, Jun 5, 2011 at 6:43 PM, Rémi Forax <mailto:fo...@univ-mlv.fr>> wrote: I'v

Re: 5 failed java/lang/invoke tests, also coro compilation failure

2011-06-09 Thread Rémi Forax
Tests need to be updated to be in sync with the state of the implementation. Rémi On 06/09/2011 09:55 PM, Stephen Bannasch wrote: > I'm getting 5 failed java/lang/invoke tests with the latest mlvm code. > > I'm setting up my guards this way to exclude coro which now causes a > compilation failur

JSR292 CookBook

2011-06-05 Thread Rémi Forax
I've started to write some small (a some not so small) examples showing how to implement common dynamic runtime patterns. http://code.google.com/p/jsr292-cookbook/ Currently, only the source codes are available, the doc will follow. Also the dynamic dispatch pattern is not fully implemented and t

Re: More performance explorations

2011-06-05 Thread Rémi Forax
On 06/05/2011 10:41 AM, Charles Oliver Nutter wrote: > On Fri, Jun 3, 2011 at 1:01 PM, Tom Rodriguez > wrote: >> On Jun 3, 2011, at 12:12 AM, Charles Oliver Nutter wrote: >> >>> I did make another small discovery: the + calls never inline >>> completely. They eventually are a virtual invocation o

Re: More performance explorations

2011-06-03 Thread Rémi Forax
On 06/03/2011 09:08 PM, John Rose wrote: > On Jun 3, 2011, at 11:58 AM, Rémi Forax wrote: > >> This means that you need one MDO by method handle (which do a call) by >> callsite associated to an invokedynamic. >> As far as I know, hotspot doesn't do that. > You

Re: More performance explorations

2011-06-03 Thread Rémi Forax
On 06/03/2011 08:01 PM, Tom Rodriguez wrote: > On Jun 3, 2011, at 12:12 AM, Charles Oliver Nutter wrote: > >> I did make another small discovery: the + calls never inline >> completely. They eventually are a virtual invocation of >> RubyFixnum.op_plus, and in both old and new builds they're calls i

Re: review request (URGENT): 7051206: JSR 292 method name SwitchPoint.isValid is misleading to unwary users; should be hasBeenInvalidated

2011-06-03 Thread Rémi Forax
On 06/03/2011 11:19 AM, Emmanuel Castro wrote: > I noticed that the same kind of strange properties exists from > the beginning in the Java API on the Thread class. When the > Thread.isAlive() returns true, you're not sure that it is still true > at the next instruction. > If one follows the sam

Re: More performance explorations

2011-06-03 Thread Rémi Forax
On 06/03/2011 04:37 AM, John Rose wrote: > Thanks; I'll look at your dump later tonight. > > If the problem is friction from interface casts, we can probably > remove them. It's hard to figure out how they are getting in, though. > It happens when IRubyObject interconverts with Object. Are you

Re: Current Crash status

2011-05-27 Thread Rémi Forax
Hi, do you try to use c2 instead of c1 (-server) ? Rémi On 05/27/2011 08:16 AM, Ola Bini wrote: Hi, I just built a new JDK and ran everything with it. The good news is that the problem with the missing class doesn't show up anymore. However, I still see the ShouldNotReachHere problem: # # A f

Re: More performance explorations

2011-05-26 Thread Rémi Forax
On 05/27/2011 01:53 AM, Charles Oliver Nutter wrote: > On Thu, May 26, 2011 at 5:20 AM, Rémi Forax wrote: >> As far as I know there is no specific optimization of SwitchPoint >> i.e there is still a volatile read in the middle of the pattern. > If that's true I'm not

Re: review request (L): 7032323: code changes for JSR 292 EG adjustments to API, through Public Review

2011-05-26 Thread Rémi Forax
On 05/26/2011 09:10 PM, Y. S. Ramakrishna wrote: > John, you state that validity is not a stable property. > Is invalidity a stable property, or not even that is. yes, once invalidated a switch point can't be reverted to a valid state. http://download.java.net/jdk7/docs/api/java/lang/invoke/Switch

Re: Good news, bad news

2011-05-26 Thread Rémi Forax
On 05/26/2011 12:33 PM, Charles Oliver Nutter wrote: > On Thu, May 26, 2011 at 5:25 AM, Rémi Forax wrote: >> Charles, >> why do you use IRubyObject exactly ? >> why not using Object instead ? >> >> I use Object in PHP.reboot and see no problem. > Legacy, mostl

Re: Good news, bad news

2011-05-26 Thread Rémi Forax
Charles, why do you use IRubyObject exactly ? why not using Object instead ? I use Object in PHP.reboot and see no problem. Rémi On 05/26/2011 09:15 AM, Charles Oliver Nutter wrote: > On Thu, May 26, 2011 at 1:58 AM, Tom Rodriguez > wrote: >> but test is some ugly goo because of boxing. It's

Re: More performance explorations

2011-05-26 Thread Rémi Forax
As far as I know there is no specific optimization of SwitchPoint i.e there is still a volatile read in the middle of the pattern. Rémi On 05/26/2011 08:40 AM, Charles Oliver Nutter wrote: > Now for something completely different: SwitchPoint-based "constant" > lookup in JRuby. > > It's certainly

Re: Danger Will Robinson! Missing API!

2011-05-26 Thread Rémi Forax
On 05/26/2011 11:56 AM, Charles Oliver Nutter wrote: > On Thu, May 26, 2011 at 4:52 AM, Rémi Forax wrote: >> As John says, if isValid return true, >> you know nothing because it's perhaps not true anymore. > Not true. You know if it was valid when you queried it. That wi

Re: Danger Will Robinson! Missing API!

2011-05-26 Thread Rémi Forax
On 05/26/2011 10:16 AM, John Rose wrote: > On May 25, 2011, at 11:04 PM, Charles Oliver Nutter wrote: > >> I don't say it's not clever. It's just not something anyone is >> typically going to figure out on their own. There will be constant >> questions "if I can invalidate a SwitchPoint, why can't

Re: Good news, bad news

2011-05-23 Thread Rémi Forax
On 05/24/2011 12:44 AM, Tom Rodriguez wrote: > On May 23, 2011, at 3:27 PM, Charles Oliver Nutter wrote: > >> On Mon, May 23, 2011 at 5:20 PM, Tom Rodriguez >> wrote: >>> On May 23, 2011, at 2:50 PM, Charles Oliver Nutter wrote: I also do not see any indication *why* nothing inlines past thi

Re: Good news, bad news

2011-05-20 Thread Rémi Forax
On 05/20/2011 11:08 PM, Tom Rodriguez wrote: > Is it the inlining policy? I played a little with this and the current > default policy is still not as good as the big tweaks to MaxInlineSize and > InlineSmallCode. > > tom I tend to agree, things like isFixnumReopened and getCacheToken seem to b

Re: SwitchPoint-based constant lookup in JRuby

2011-05-20 Thread Rémi Forax
Le 19/05/2011 23:00, John Rose a écrit : On May 19, 2011, at 11:11 AM, Charles Oliver Nutter wrote: I've just landed a newer SwitchPoint-based constant caching mechanism. https://github.com/jruby/jruby/commit/90be178c96053d201ea2a869bda7feddeedcfa10 Cool! That's one of the key use cases fo

Re: Inlining of MethodHandles chain possible/planned?

2011-05-18 Thread Rémi Forax
On 05/18/2011 09:03 PM, John Rose wrote: > On May 18, 2011, at 11:59 AM, Rémi Forax wrote: > >> All others are hard because the value of the method handle is not >> statically known >> i.e the method handle cannot be considered as constant. > It can be optimistically i

<    1   2   3   4   5   6   7   >