Re: Scanning multi version jars?

2017-09-15 Thread Alan Bateman
On 15/09/2017 03:09, Greg Wilkins wrote: Alan, thanks for correcting me on the API of JarFile - I can see it kind of works, but in a very bizarre way (it gives different content for entries obtained via the enumerator vs the getJarEntry API, even though both entries report the same name). 

[PATCH] Enhancement proposal for TimSort and ComparableTimSort

2017-09-15 Thread Сергей Цыпанов
Current implementations of TimSort and ComparableTimSort both have fast path for the case when the size of array = 1 i.e. such array is considered to be sorted. My proposal is to add similar fast path for the case when the size of the array = 2. In this case it's enough to check if the first it

Re: [PATCH] Enhancement proposal for TimSort and ComparableTimSort

2017-09-15 Thread Claes Redestad
Hi, looks reasonable, but when adding a fast-path branch like this it's just as important to show that we don't regress *other* cases, e.g., benchmark using input data of randomized lengths, both on sets which include and don't include 1- and 2-element arrays. /Claes On 2017-09-15 11:49, С

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-09-15 Thread Alan Bateman
On 15/09/2017 02:47, David Holmes wrote: Hi Adam, I am still very much torn over this one. I think the idea of print-and-exit flags for a potentially hosted library like the JVM is just wrong - we should never have done that, but we did. Fixing that by moving the flags to the launcher is far

Re: MR JarFile was: Scanning multi version jars?

2017-09-15 Thread Alan Bateman
On 15/09/2017 05:43, Greg Wilkins wrote: : The issue I have are that sometimes the class is trying to hide the MR aspects, yet other times it is not.   Specifically when iterating it returns JarEntry instances that ignore versions and always return the content to which they refer, yet if you

Re: [BUG PROPOSAL]: C++ code that calls JNI_CreateJavaVM can be exited by java

2017-09-15 Thread David Holmes
On 15/09/2017 8:17 PM, Alan Bateman wrote: On 15/09/2017 02:47, David Holmes wrote: Hi Adam, I am still very much torn over this one. I think the idea of print-and-exit flags for a potentially hosted library like the JVM is just wrong - we should never have done that, but we did. Fixing tha

Re: [10] RFR(M) 8182701: Modify JVMCI to allow Graal Compiler to expose platform MBean

2017-09-15 Thread Jaroslav Tulach
Thanks for the review Mandy, Daniel. Now, that the consolidated JDK10 repository is available, I have updated my webrev to its structure. In addition to that I addressed your comments: On úterý 12. září 2017 11:19:45 CEST mandy chung wrote: > ./make/common/Modules.gmk > Nit: can you move jd

Re: [10] RFR(M) 8182701: Modify JVMCI to allow Graal Compiler to expose platform MBean

2017-09-15 Thread Doug Simon
> On 15 Sep 2017, at 14:32, Jaroslav Tulach wrote: > > Thanks for the review Mandy, Daniel. Now, that the consolidated JDK10 > repository is available, I have updated my webrev to its structure. In > addition to that I addressed your comments: > > On úterý 12. září 2017 11:19:45 CEST mandy ch

Re: RFR: 8187033: [PPC] Imporve performance of ObjectStreamClass.getClassDataLayout()

2017-09-15 Thread Peter Levart
Hi, On 09/15/2017 07:12 AM, Kazunori Ogata wrote: Hi Hans, Thank you for your comment Hans Boehm wrote on 2017/09/15 09:44:56: Just to be clear, the semi-plausible failure scenario here is that a reader will see a non-null slots value, but then read an uninitialized value from the ClassData

Re: RFR: 8187033: [PPC] Imporve performance of ObjectStreamClass.getClassDataLayout()

2017-09-15 Thread Kazunori Ogata
Hi Peter, My understanding is the case when dataLayout is speculatively loaded (and stored to the local variable slots) and then an element of ClassDataSlot array (say slots[0]) is also speculatively loaded. I think the full fence should take effect when the speculative load of slots[0] is con

Re: [10] RFR(M) 8182701: Modify JVMCI to allow Graal Compiler to expose platform MBean

2017-09-15 Thread mandy chung
On 9/15/17 5:47 AM, Doug Simon wrote: I don't think I can. There is no way to get to HotspotGraalRuntime except asking the HotSpotGraalCompiler. The HotspotGraalRuntime isn't JVMCIRuntime... At least I think so That is correct - you have to obtain a HotspotGraalRuntime from a HotSpotGraalComp

Re: Scanning multi version jars?

2017-09-15 Thread Greg Wilkins
Alan, I had a quick look at `jdk.internal.util.jar.VersionedStream` and have the following comments: - The style of the API is fine - pass in a JarFile and get a Stream. - It might be better to have a Stream which includes a method to query the actual version of each entry. - I thi

RE: Scanning multi version jars?

2017-09-15 Thread Stephen Felts
FWIW I tracked down the MR jar file that I was having trouble with. It's the stand-alone JAXWS jar file com.sun.xml.ws.jaxws-rt.jar. Focusing on the problem class, the jar contains com/sun/xml/ws/util/xml/XmlCatalogUtil$1.class com/sun/xml/ws/util/xml/XmlCatalogUtil.class META-INF/versions/9/com/

Re: Scanning multi version jars?

2017-09-15 Thread Greg Wilkins
Alen et al, here is a VersionedJarFile implementation that filters out inappropriate inner classes: https://gist.github.com/gregw/8f305e369d0b769e9c3fe791a0634b13 cheers On 16 September 2017 at 07:58, Greg Wilkins wrote: > > Alan, > > I had a quick look at `jdk.internal.util.jar.VersionedStre