On Mar 3, 2011, at 1:52 PM, Christian Thalinger wrote: > On Mar 3, 2011, at 1:12 PM, Christian Thalinger wrote: >> On Mar 3, 2011, at 9:47 AM, Rémi Forax wrote: >>> Yes. I use an agent so it can have trigger a deoptimization >>> even if I don't understand why ? >> >> Here is what I get with a debug build: > > <snip> > >> The assert looks like: >> >> 7016279: JSR292 Exception when creating CallSites from multiple threads >> >> Is your source code creating CallSites from multiple threads (massively >> parallel)? > > > Scratch that. I think I found the problem: the constant pool cache entry is > not properly updated after a GC thus resulting in a bogus value for the BSM.
UseSerialGC seems to do proper pointer updating. -- Christian > > This can either crash or throw an exception depending on the current content > of the heap: > > resolving bootstrap method for 0xb65daf98 at 2 at cache[18]CP[143]... > result_oop: e4f01720 > sun.dyn.DirectMethodHandle > - klass: 'sun/dyn/DirectMethodHandle' > - ---- fields (total size 6 words): > - private 'vmentry' 'I' @8 -93565868 (fa6c4c54) > - protected 'vmtarget' 'Ljava/lang/Object;' @12 {method} 'staticBootstrap' > '(Ljava/dyn/MethodHandles$Lookup;Ljava/lang/String;Ljava/dyn/MethodType;[Ljava/lang/Object;)Ljava/dyn/CallSite;' > in 'jsr335/lambda/optimizer/RT' (b65f2738) > - private 'type' 'Ljava/dyn/MethodType;' @16 a 'java/dyn/MethodType' = > (Ljava/dyn/MethodHandles$Lookup;Ljava/lang/String;Ljava/dyn/MethodType;[Ljava/lang/Object;)Ljava/dyn/CallSite; > (e4f00f00) > - private final 'vmindex' 'I' @20 -2 (fffffffe) > bootstrap method for 0xb65daf98 at 2 retrieved as 0xe4f01720: > > ... > > [GC 16448K->5140K(62848K), 0.1462675 secs] > [GC 21588K->6252K(79296K), 0.1955926 secs] > [GC 39148K->8444K(79296K), 0.5892590 secs] > [GC 41340K->10744K(112192K), 0.6393406 secs] > [GC 76536K->15324K(112192K), 1.2619007 secs] > [GC 81116K->19988K(182592K), 0.9492098 secs] > resolving bootstrap method for 0xb65daf98 at 9 at cache[18]CP[143]... > result_oop: e4f01720 > [Ljava.lang.Object; > - klass: 'java/lang/Object'[] > - length: 1 > - 0 : "foo" > bootstrap method for 0xb65daf98 at 9 retrieved as 0xe4f01720: > Exception in thread "main" java.lang.IllegalStateException: no bootstrap > method found for invokedynamic > at Megamorphic2.test(Megamorphic2.java:60) > at Megamorphic2.main(Megamorphic2.java:52) _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev