Re: RFR(10): 8181147: JNU_GetStringPlatformChars should have a fast path for UTF-8

2017-06-16 Thread Xueming Shen
+1 On Jun 15, 2017, at 3:35 PM, Claes Redestad wrote: > On 2017-06-15 18:50, Alan Bateman wrote: > > >> On 15/06/2017 17:26, Chris Hegarty wrote: >> : >> Claes, >> >> This is the first test in the core area that will now use a test >> specific native library,

Re: RFR(10): 8181147: JNU_GetStringPlatformChars should have a fast path for UTF-8

2017-06-15 Thread Claes Redestad
On 2017-06-15 18:50, Alan Bateman wrote: On 15/06/2017 17:26, Chris Hegarty wrote: : Claes, This is the first test in the core area that will now use a test specific native library, which will need to be built ( by the build system, which it does ), and pointed to when executing jtreg from

Re: RFR(10): 8181147: JNU_GetStringPlatformChars should have a fast path for UTF-8

2017-06-15 Thread Alan Bateman
On 15/06/2017 17:26, Chris Hegarty wrote: : Claes, This is the first test in the core area that will now use a test specific native library, which will need to be built ( by the build system, which it does ), and pointed to when executing jtreg from the command line, e.g. jtreg ...

Re: RFR(10): 8181147: JNU_GetStringPlatformChars should have a fast path for UTF-8

2017-06-15 Thread Chris Hegarty
> On 15 Jun 2017, at 14:29, Claes Redestad wrote: > ... > http://cr.openjdk.java.net/~redestad/8181147/jdk.06/ Claes, This is the first test in the core area that will now use a test specific native library, which will need to be built ( by the build system, which it

Re: RFR(10): 8181147: JNU_GetStringPlatformChars should have a fast path for UTF-8

2017-06-15 Thread Xueming Shen
On 6/15/17, 6:29 AM, Claes Redestad wrote: Hi Sherman, One nick picking is that it might be better to initialize the constant "LATIN1" from the String class when intializing String_coder_ID? recently I got a "naked constants" complain #JDK-8156530, so I guess it might be better to do so at

Re: RFR(10): 8181147: JNU_GetStringPlatformChars should have a fast path for UTF-8

2017-06-15 Thread Claes Redestad
Hi Sherman, On 06/15/2017 05:27 AM, Xueming Shen wrote: Hi Claes, The change looks fine. Yes, encoding the 2-byete latin1 at native looks reasonable. Thanks for reviewing! One nick picking is that it might be better to initialize the constant "LATIN1" from the String class when

Re: RFR(10): 8181147: JNU_GetStringPlatformChars should have a fast path for UTF-8

2017-06-14 Thread Xueming Shen
Hi Claes, The change looks fine. Yes, encoding the 2-byete latin1 at native looks reasonable. One nick picking is that it might be better to initialize the constant "LATIN1" from the String class when intializing String_coder_ID? recently I got a "naked constants" complain #JDK-8156530, so

Re: RFR(10): 8181147: JNU_GetStringPlatformChars should have a fast path for UTF-8

2017-06-14 Thread Erik Joelsson
Build changes look good to me. /Erik On 2017-06-13 22:27, Claes Redestad wrote: On 2017-06-13 21:09, Martin Buchholz wrote: Looks good to me, although still hoping for more review from others. I expect Sherman to weigh in. :-) +if (bytes != 0) { Style: use NULL. Done. +static

Re: RFR(10): 8181147: JNU_GetStringPlatformChars should have a fast path for UTF-8

2017-06-13 Thread Claes Redestad
On 2017-06-13 21:09, Martin Buchholz wrote: Looks good to me, although still hoping for more review from others. I expect Sherman to weigh in. :-) +if (bytes != 0) { Style: use NULL. Done. +static jstring newStringJava(JNIEnv *env, const char *str) { I expected two versions, one