Re: Is returning a value != '0' or '1' as jboolean from a JNI function legal?

2018-08-20 Thread Krystal Mok
spot/share/c1/c1_Runtime1.cpp#l1380 On Mon, Aug 20, 2018 at 9:28 AM, Volker Simonis wrote: > On Mon, Aug 20, 2018 at 6:09 PM, Krystal Mok > wrote: > > Hi guys, > > > > Haha this is fun. I actually hit this issue the hard way and had to > tweak a > > bit of my code

Re: Is returning a value != '0' or '1' as jboolean from a JNI function legal?

2018-08-20 Thread Krystal Mok
Hi guys, Haha this is fun. I actually hit this issue the hard way and had to tweak a bit of my code to accommodate that: I had to return a jint from a function that I wanted to return a jbool at first: http://hg.openjdk.java.net/hsx/hsx25/hotspot/diff/8f37087fc13f/src/share/vm/c1/c1_Runtime1.cpp

Race condition when serializing SerializedRandomAccessList

2018-08-03 Thread Krystal Mok
Hi core-libs, I'd like to report a bug on race condition while serializing SerializedRandomAccessList / deserializing SerializedList. This seems to be a long standing bug, we've hit it on JDK8 and the same code is still there in JDK11's core-lib. In SerializedRandomAccessList.writeReplace(): [1]

Re: Oracle Java 8u161 regression in XML Schema Factory

2018-01-26 Thread Krystal Mok
an 26, 2018 at 12:06 AM, Seán Coffey wrote: > I don't see them being related with data given below. Maybe there's a > classpath configuration issue ? > > If you feel there's a bug in the JDK libraries, please report it via > https://bugs.java.com/ > > regards,

Re: Oracle Java 8u161 regression in XML Schema Factory

2018-01-25 Thread Krystal Mok
Hi guys, A coworker of mine had hit this issue last night on 8u161 and it worked fine on 8u151: ERROR: /home/myuser/.cache/bazel/_bazel_myuser/some_hash_code/external/jackson_datatype_joda_shaded/BUILD:5:1: Building external/jackson_datatype_joda_shaded/libjackson-datatype-joda-class.jar (35 sou

Re: [PATCH] Inefficient ArrayList.subList().toArray()

2018-01-25 Thread Krystal Mok
Hi Sergey, Not a Reviewer but I like this patch a lot. Thanks for contributing it to OpenJDK! Best regards, Kris On Thu, Jan 25, 2018 at 2:02 PM, Сергей Цыпанов wrote: > Hi, > > I've run into poor performance of toArray() method called on result of > subList() taken from java.util.ArrayList. >

Re: RFR: 8166840: Synthetic bridge constructor in ArrayList$Itr blocks inlining

2016-09-28 Thread Krystal Mok
Hi Claes, For this particular case, this JDK-side change looks good to me. Let me post out the HotSpot version of the change and let you guys decide whether or not you guys want to take that version (which will take care of the ArrayList$1 case without the JDK-side change). Thanks, Kris On Wed,

Re: RFR(s): 4285505: deprecate java.lang.Compiler

2016-09-15 Thread Krystal Mok
navoidably platform-specific. Users of this API > would be better served by using a platform-specific API. Can't Azul create > one and migrate to it? > > s'marks > > > On 9/13/16 5:09 PM, Krystal Mok wrote: > > Hi OpenJDK developers, > > Replying on beha

Re: RFR(s): 4285505: deprecate java.lang.Compiler

2016-09-13 Thread Krystal Mok
Hi OpenJDK developers, Replying on behalf of Azul Systems: java.lang.Compiler is an integral part of the current Java SE spec, and is currently being used by multiple independent Java SE implementations of that spec in a spec-conforming way (Azul Zing, Azul Vega, and IBM J9 being concrete example

Re: RFR(s): 4285505: deprecate java.lang.Compiler

2016-09-08 Thread Krystal Mok
Hi Tim, Thanks for your reply. It's good to know at least the known use cases from IBM have indeed been discussed. On Thu, Sep 8, 2016 at 9:01 AM, Tim Ellison wrote: > On 07/09/16 23:45, Krystal Mok wrote: > > I see that on the JBS page, your most recent comment says it&#x

Re: RFR(s): 4285505: deprecate java.lang.Compiler

2016-09-07 Thread Krystal Mok
it's an improvement, > as Rémi noted, since people will no longer confuse it with an API for > invoking javac. > > s'marks > > [1] http://openjdk.java.net/jeps/165 > > On 9/7/16 3:45 PM, Krystal Mok wrote: > > Hi Stuart, > > I see that on the JBS page, your

Re: RFR(s): 4285505: deprecate java.lang.Compiler

2016-09-07 Thread Krystal Mok
Hi Stuart, I see that on the JBS page, your most recent comment says it's been decided that for JDK9 it's okay to deprecate and forRemoval=true, while also mentioning the uses of this class in IBM's implementation. Does that mean IBM has agreed on the deprecation of this class? I thought J9 had f

Re: A bit of sugar for j.u.c.locks with try-with-resources?

2016-09-03 Thread Krystal Mok
in that it still doesn't support the try (locker(lock)) { ... } usage. The new TWR syntax was just extended to allow effectively final variables in the TWR header... Best regards, Kris On Sat, Sep 3, 2016 at 12:17 AM, David Holmes wrote: > Hi Kris, > > On 3/09/2016 12:41 PM, Krystal

Re: A bit of sugar for j.u.c.locks with try-with-resources?

2016-09-02 Thread Krystal Mok
Hi Vitaly, Thanks for your comments! On Fri, Sep 2, 2016 at 7:55 PM, Vitaly Davidovich wrote: > Hi Kris, > > > On Friday, September 2, 2016, Krystal Mok wrote: > >> Hi core-libs developers, >> >> I mostly live down in the VM world, but recently I've been

A bit of sugar for j.u.c.locks with try-with-resources?

2016-09-02 Thread Krystal Mok
Hi core-libs developers, I mostly live down in the VM world, but recently I've been playing with j.u.c.locks a bit, and saw that there's an opportunity to retrofit the API with the try-with-resources syntax. I wonder if anybody has brought this topic up before; apologies if there had been. >From

Re: How to change locale in a Windows terminal?

2016-08-09 Thread Krystal Mok
Hi Max, Does setting -Duser.country=CN work for you? (I don't remember what the correct name for China should be, but setting that to US forces java to print the help message in English) - Kris On Tue, Aug 9, 2016 at 6:25 PM, Weijun Wang wrote: > My Windows 10 is English, but I want the java c

Re: StackOverflowError on HashMap.hashCode() due to self reference

2015-07-17 Thread Krystal Mok
not > permissible for a map to contain itself as a key. While it is permissible > for a map to contain itself as a value, extreme caution is advised: the > **equals and hashCode methods > are no longer well defined on such a map.* > > (emphasis added) > > On Fri, Jul 17, 2015 at

StackOverflowError on HashMap.hashCode() due to self reference

2015-07-17 Thread Krystal Mok
Friday, July 17, 2015, Vitaly Davidovich > wrote: > IMHO, this doesn't warrant any special wording -- if someone hits this, I > think it's fairly evident what the issue is. You can get the same problem > with adding an ArrayList to itself and calling hashCode(). > > O

StackOverflowError on HashMap.hashCode() due to self reference

2015-07-17 Thread Krystal Mok
Hi everyone, I'm sure somebody has seen this stack overflow before. My question is: is it expected (which should be documented to warn people not to do this), or is it considered a bug (which should be fixed)? Example: https://gist.github.com/rednaxelafx/930f8979473185cfc0a0 import java.util.*;

Re: AbstractStringBuilder::append less inlined?

2014-07-03 Thread Krystal Mok
Hi Bernd, I agree with Vitaly. Tiered compilation may well be the reason you're seeing different logging -- in other words, your test is probably too short so that when tiered compilation is turned on, you're only seeing C1's compilation logs, and C2 compilation hasn't happened yet. Try turning o

Re: How to close a Process and having shutdown hooks called ?

2014-03-04 Thread Krystal Mok
Hi Nicolas, Looks like a well discussed question. On Posix systems, SIGTERM should work for you. That's the default signal sent by the 'kill' command on Linux. e.g. please take a look here: http://stackoverflow.com/questions/2541597/how-to-gracefully-handle-the-sigkill-signal-in-java - Kris On

Re: Getting ciObject from oop/jobject

2013-08-01 Thread Krystal Mok
Hi Nick, This topic is related to HotSpot Server Compiler instead of the Java core library, so I'm cc'ing this email to hotspot-compiler-dev and dropping core-libs-dev. As you already know, HotSpot compilers are shielded from VM runtime implementation details via the Compiler Interface (CI). That

Re: Request for Review : CR#6924259: Remove String.count/String.offset

2013-04-12 Thread Krystal Mok
Hi Nazario, That's a typical substring leak case. Matcher.group(n) eventually calls String.substring() to return the result. Before removing the count and offset fields in String, that'll return a String sharing the value char array, which may cause memory leaks if you hold on to a small substring

Re: about SuppressWarnings

2012-11-04 Thread Krystal Mok
Hi, If you're using javac to compile your Java source code, than you can try running javac -X to see the list of -Xlint options. That'll give you a hint of what warnings can be suppressed. As from the JavaDoc [1], the warning names are vendor specific. So if you're not using javac then youll need

Re: StackTraceElement question

2012-10-08 Thread Krystal Mok
On Mon, Oct 8, 2012 at 10:25 PM, Christos Zoulas wrote: > On Oct 8, 11:07pm, david.hol...@oracle.com (David Holmes) wrote: > -- Subject: Re: StackTraceElement question > > | > There is also the problem of having a class hierarchy like: > | > > | > class A extends class I > | > class B extends clas

Re: StackTraceElement question

2012-10-08 Thread Krystal Mok
On Mon, Oct 8, 2012 at 7:27 AM, David Holmes wrote: > On Sat, Oct 6, 2012 at 3:04 AM, Christos Zoulas >> wrote: >> >> Hi, >>> >>> I don't know if this belongs to this list, but if it does not, >>> please point me to where it does. I think that it would be nice if >>> StackTraceElement which curr

Re: StackTraceElement question

2012-10-06 Thread Krystal Mok
Hi, I believe this discussion belongs to core-libs-dev list better. cc'd. - Kris On Sat, Oct 6, 2012 at 3:04 AM, Christos Zoulas wrote: > Hi, > > I don't know if this belongs to this list, but if it does not, > please point me to where it does. I think that it would be nice if > StackTraceElem

Re: typo in comments of JVM_SupportsCX8 in jvm.h

2012-06-07 Thread Krystal Mok
On Fri, Jun 8, 2012 at 4:39 AM, chris hegarty wrote: > Looks fine Kris (given the same change is being made to > hotspot/src/share/vm/prims/**jvm.h) > > Yes. jvm.h in both the hotspot and jdk workspaces had incorrect comments on JVM_SupportsCX8 before this change, but they were different because t

typo in comments of JVM_SupportsCX8 in jvm.h

2012-06-07 Thread Krystal Mok
Hi all, As discussed on hotspot-compiler-dev [1], I came across a typo in the exported jvm.h in the jdk workspace while working on 7174218. The fix is simple [2], and sync up with the changes in 7174218: diff -r 7def50698e78 src/share/javavm/export/jvm.h --- a/src/share/javavm/export/jvm.h Thu Ma

Re: Review Request CR#7118743 : Alternative Hashing for String with Hash-based Maps

2012-05-24 Thread Krystal Mok
Hi Mike, On Fri, May 25, 2012 at 10:12 AM, Mike Duigou wrote: > > On May 24 2012, at 16:32 , Vitaly Davidovich wrote: > > > That's a bit odd as I thought the Klass object in the VM stored > something like 7 supers, which includes interfaces (if I'm not mistaken). > I know that instanceof checks

Re: Need reviewer: JDK 8 CR for Support Integer overflow

2012-02-03 Thread Krystal Mok
eet the requirements for OptimizeStringConcat to work, Regards, Kris Mok [1]: http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-February/009128.html [2]: http://cr.openjdk.java.net/~rriggs/CR6708398/webrev/ On Sat, Feb 4, 2012 at 1:47 AM, Tom Rodriguez wrote: > > On Feb 3, 2012

Re: Need reviewer: JDK 8 CR for Support Integer overflow

2012-02-03 Thread Krystal Mok
Hi Florian, On Fri, Feb 3, 2012 at 4:11 PM, Florian Weimer wrote: > Will Hotspot be able to optimize away the string construction on the > exception path in multiplyExact() if the exception is caught locally? > > At least -XX:+OptimizeStringConcat should remove the need to construct a StringBuil

Re: typo in sun.misc.VM's comment

2012-01-10 Thread Krystal Mok
#x27;s better if it has it's own bug id and changeset. >>> I'm sure Joe can create a bug id for it. >>> >>> Rémi >>> >>> On 01/10/2012 06:51 AM, Krystal Mok wrote: >>> >>>> Hi all, >>>> >>>> Just found a

typo in sun.misc.VM's comment

2012-01-09 Thread Krystal Mok
Hi all, Just found a little typo in sun.misc.VM: diff -r 00e2c88e2234 src/share/classes/sun/misc/VM.java --- a/src/share/classes/sun/misc/VM.java Thu Nov 17 10:46:02 2011 -0800 +++ b/src/share/classes/sun/misc/VM.java Tue Jan 10 13:42:52 2012 +0800 @@ -167,7 +167,7 @@ // // The initial