Re: RFR: 8252933: com.sun.tools.jdi.ObjectReferenceImpl#validateAssignment always requests referenceType

2020-09-10 Thread Chris Plummer
On Fri, 11 Sep 2020 01:08:53 GMT, Daniil Titov wrote: > The change fixes the regression introduced by > https://bugs.openjdk.java.net/browse/JDK-8241080. > > Method validateAssignment() in com.sun.tools.jdi.ObjectReferenceImpl now > always retrieves the reference type and that > requires one m

Re: RFR: 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize… [v2]

2020-09-10 Thread Leonid Mesnik
On Fri, 11 Sep 2020 03:31:54 GMT, David Holmes wrote: >> What do you think about moving >> Handle obj = ThreadService::get_current_contended_monitor(thread); >> out of scope of block_object oop visibility? >> It is my second patch. > > I'm missing something. How can a NULL oop get corrupted e

Re: RFR: 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize… [v2]

2020-09-10 Thread David Holmes
On Fri, 11 Sep 2020 02:53:51 GMT, Leonid Mesnik wrote: >> It is not loom-specific and reproduced n jdk/jdk with >> -XX:+CheckUnhandledOops. > > What do you think about moving > Handle obj = ThreadService::get_current_contended_monitor(thread); > out of scope of block_object oop visibility? >

Re: RFR: 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize… [v2]

2020-09-10 Thread Leonid Mesnik
On Fri, 11 Sep 2020 02:52:15 GMT, Leonid Mesnik wrote: >> I can't see anywhere a safepoint check would occur in that code. This issue >> was flagged as being in Loom so perhaps the >> loom code is different and is what introduces the safepoint check? But I >> agree with Coleen that the best sol

Re: RFR: 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize… [v2]

2020-09-10 Thread Leonid Mesnik
On Fri, 11 Sep 2020 02:49:04 GMT, David Holmes wrote: >> src/hotspot/share/services/threadService.cpp line 888: >> >>> 886: _thread_status == java_lang_Thread::IN_OBJECT_WAIT_TIMED) { >>> 887: >>> 888: Handle obj = ThreadService::get_current_contended_monitor(thread); >> >> There must

Re: RFR: 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize… [v2]

2020-09-10 Thread David Holmes
On Fri, 11 Sep 2020 02:53:51 GMT, Leonid Mesnik wrote: >> The NULL oops are corrupted by CheckUnhandledOops and should be re-written >> with NULL to pass testing >> with -XX:+CheckUnhandledOops. > > Leonid Mesnik has updated the pull request incrementally with one additional > commit since the

Re: RFR: 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize… [v2]

2020-09-10 Thread Leonid Mesnik
> The NULL oops are corrupted by CheckUnhandledOops and should be re-written > with NULL to pass testing > with -XX:+CheckUnhandledOops. Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision: 8253033: CheckUnhandledOops check fails in Thre

Re: RFR: 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize… [v2]

2020-09-10 Thread David Holmes
On Fri, 11 Sep 2020 00:19:47 GMT, Coleen Phillimore wrote: >> Leonid Mesnik has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize(...) > > src/hotspot/share/services/threadS

Integrated: 8252406: Introduce Thread::as_Java_thread() convenience function

2020-09-10 Thread David Holmes
On Mon, 7 Sep 2020 05:56:14 GMT, David Holmes wrote: > This is a rather large but generally simple cleanup. > > We use a lot of raw C-style casts to "(JavaThread*)" typically after checking > "thread->is_Java_thread()". To simplify > this pattern, and make the code look somewhat cleaner we intr

RFR: 8252933: com.sun.tools.jdi.ObjectReferenceImpl#validateAssignment always requests referenceType

2020-09-10 Thread Daniil Titov
The change fixes the regression introduced by https://bugs.openjdk.java.net/browse/JDK-8241080. Method validateAssignment() in com.sun.tools.jdi.ObjectReferenceImpl now always retrieves the reference type and that requires one more JDWP packet if the value is not cached yet. Before https://bugs

Re: RFR: 8252657: JVMTI agent is not unloaded when Agent_OnAttach is failed

2020-09-10 Thread Yasumasa Suenaga
On Sat, 5 Sep 2020 14:26:17 GMT, Yasumasa Suenaga wrote: > If `Agent_OnAttach()` in JVMTI agent which is attempted to load via > JVMTI.agent_load dcmd is failed, it would not be > unloaded. We've [discussed it on > serviceability-dev](https://mail.openjdk.java.net/pipermail/serviceability-dev/

RFR: 8252657: JVMTI agent is not unloaded when Agent_OnAttach is failed

2020-09-10 Thread Yasumasa Suenaga
If `Agent_OnAttach()` in JVMTI agent which is attempted to load via JVMTI.agent_load dcmd is failed, it would not be unloaded. We've [discussed it on serviceability-dev](https://mail.openjdk.java.net/pipermail/serviceability-dev/2020-September/032839.html). This PR is a continuation of that. T

Re: RFR: 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize…

2020-09-10 Thread Coleen Phillimore
On Thu, 10 Sep 2020 23:38:45 GMT, Leonid Mesnik wrote: > The NULL oops are corrupted by CheckUnhandledOops and should be re-written > with NULL to pass testing > with -XX:+CheckUnhandledOops. Changes requested by coleenp (Reviewer). src/hotspot/share/services/threadService.cpp line 888: > 886

Re: RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Phil Race
On Sun, 6 Sep 2020 13:57:19 GMT, Dmitriy Dumanskiy wrote: > **isEmpty** is faster + has less byte code + easier to read. Benchmarks could > be found > > [here](https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416). 1) This is un-necessary churn. 2) I can't

Re: RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Jonathan Gibbons
On Thu, 10 Sep 2020 12:04:48 GMT, Dmitriy Dumanskiy wrote: > I have in mind dozens of improvements all over the code like this one. That sounds scary. Broad updates like these cause unnecessary churn in the codebase, and can make merging and back porting harder. Changes should be discussed ah

Re: RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Jorn Vernee
On Thu, 10 Sep 2020 15:50:39 GMT, Alan Bateman wrote: >> 14 cc'd mailing lists is unworkable. You need to be subscribed to lists to >> post, but even if you are a reply-all will >> be delayed due to all of the mails being held up for moderator approval due >> to: >> " Too many recipients to the

Re: RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Alan Bateman
On Thu, 10 Sep 2020 13:53:10 GMT, David Holmes wrote: >> @dholmes-ora raises a good point. Hopefully there is a balance point between >> a dozen different bugs / pull requests >> each targeting one area and one bug / PR targeting a dozen separate areas. I >> don't have a good general rule to su

Re: RFR: 8252997: Null-proofing for linker_md.c

2020-09-10 Thread Daniel D. Daugherty
Also this fix needs to be reviewed by the Serviceability team. I've moved hotspot-dev@... to Bcc and added serviceability-dev@... Dan On 9/10/20 5:53 AM, Severin Gehwolf wrote: Hi Adam, jdk/jdk moved to skara[1]. Please re-create the patch as a github PR (or with the skara CLI tooling). Than

Re: RFR: 8252406: Introduce Thread::as_Java_thread() convenience function [v8]

2020-09-10 Thread Daniel D . Daugherty
On Thu, 10 Sep 2020 03:18:23 GMT, David Holmes wrote: >> This is a rather large but generally simple cleanup. >> >> We use a lot of raw C-style casts to "(JavaThread*)" typically after >> checking "thread->is_Java_thread()". To simplify >> this pattern, and make the code look somewhat cleaner w

Re: RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread David Holmes
On 10/09/2020 10:07 pm, Dmitriy Dumanskiy wrote: On Thu, 10 Sep 2020 11:21:28 GMT, David Holmes wrote: The code in java.base was updated to use String::isEmpty in JDK 12 (JDK-8215281). There was follow-up in JDK 13 to do the same in the java.desktop module (JDK-8223237). Changing the remainin

Re: RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread David Holmes
On Thu, 10 Sep 2020 12:18:51 GMT, Kevin Rushforth wrote: >> This should be broken up to deal with the files in different functional >> areas under different bugids and PRs. Otherwise >> the cross-posting to so many lists is prohibitive. Files in different areas >> need to be reviewed by differe

Re: RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Kevin Rushforth
On Thu, 10 Sep 2020 11:21:28 GMT, David Holmes wrote: >> The code in java.base was updated to use String::isEmpty in JDK 12 >> (JDK-8215281). There was follow-up in JDK 13 to do >> the same in the java.desktop module (JDK-8223237). Changing the remaining >> usages make sense although I see that

Re: RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Dmitriy Dumanskiy
On Thu, 10 Sep 2020 11:21:28 GMT, David Holmes wrote: >> The code in java.base was updated to use String::isEmpty in JDK 12 >> (JDK-8215281). There was follow-up in JDK 13 to do >> the same in the java.desktop module (JDK-8223237). Changing the remaining >> usages make sense although I see that

Re: RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread David Holmes
On Thu, 10 Sep 2020 10:40:15 GMT, Alan Bateman wrote: >> @kevinrushforth thanks. Done. >> >> Similar issues: >> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8215014 >> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8251246 >> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=822

Re: RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Alan Bateman
On Thu, 10 Sep 2020 08:47:35 GMT, Dmitriy Dumanskiy wrote: >> Before this Enhancement can be formally reviewed, you will need a JBS bug >> ID. If you are already working with a >> Committer or Reviewer in the `jdk` project who has agreed to sponsor your >> change, they can file the Enhancement

Re: RFR: 8252105: parallel heap inspection for ZCollectedHeap

2020-09-10 Thread Lin Zang
On Thu, 10 Sep 2020 09:33:28 GMT, Per Lidén wrote: >> - enable parallel heap inspection for ZCollectedHeap >> - preliminary evaluation: >> Time of jmap histo on 8GB heap with ~5GB objects >> * before: 7.103s >> * after : 2.734s (with 4 parallel threads) > > Just looked at this briefly. My i

Re: RFR: 8252105: parallel heap inspection for ZCollectedHeap

2020-09-10 Thread Per Lidén
On Thu, 10 Sep 2020 02:28:43 GMT, Lin Zang wrote: > - enable parallel heap inspection for ZCollectedHeap > - preliminary evaluation: > Time of jmap histo on 8GB heap with ~5GB objects > * before: 7.103s > * after : 2.734s (with 4 parallel threads) Just looked at this briefly. My initial co

Re: RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread Dmitriy Dumanskiy
On Wed, 9 Sep 2020 20:21:44 GMT, Kevin Rushforth wrote: >> @mrserb hello. Thanks for the review. Any further actions required from me? > > Before this Enhancement can be formally reviewed, you will need a JBS bug ID. > If you are already working with a > Committer or Reviewer in the `jdk` projec

Re: RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread Kevin Rushforth
On Wed, 9 Sep 2020 07:57:48 GMT, Dmitriy Dumanskiy wrote: >> @doom369 jcheck requires an associated issue > > @mrserb hello. Thanks for the review. Any further actions required from me? Before this Enhancement can be formally reviewed, you will need a JBS bug ID. If you are already working wit

Re: RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread Sergey Bylokhov
On Sun, 6 Sep 2020 13:57:19 GMT, Dmitriy Dumanskiy wrote: > **isEmpty** is faster + has less byte code + easier to read. Benchmarks could > be found > > [here](https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416). src/demo/share/java2d/J2DBench/src/j2dben

Re: RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread Dmitriy Dumanskiy
On Sun, 6 Sep 2020 18:08:15 GMT, thatsIch wrote: >> **isEmpty** is faster + has less byte code + easier to read. Benchmarks >> could be found >> >> [here](https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416). > > @doom369 jcheck requires an associated issu

Re: RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread thatsIch
On Sun, 6 Sep 2020 13:57:19 GMT, Dmitriy Dumanskiy wrote: > **isEmpty** is faster + has less byte code + easier to read. Benchmarks could > be found > > [here](https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416). @doom369 jcheck requires an associated is

RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread Dmitriy Dumanskiy
**isEmpty** is faster + has less byte code + easier to read. Benchmarks could be found [here](https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416). - Commit messages: - Merge branch 'master' of https://github.com/doom369/jdk into reaplce_equal