Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread David Holmes
On Fri, 26 Mar 2021 13:21:43 GMT, Robbin Ehn wrote: >> A suspend request is done by handshaking thread target thread(s). When >> executing the handshake operation we know the target mutator thread is in a >> dormant state (as in safepoint safe state). We have a guarantee that it will >> check

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread David Holmes
On Tue, 30 Mar 2021 16:50:50 GMT, Daniel D. Daugherty wrote: >> Robbin Ehn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - 8257831: Suspend with handshake

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread David Holmes
On Mon, 29 Mar 2021 17:30:32 GMT, Richard Reingruber wrote: >> Robbin Ehn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - 8257831: Suspend with handshake (r

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Richard Reingruber
On Wed, 31 Mar 2021 03:40:49 GMT, David Holmes wrote: >> Robbin Ehn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - 8257831: Suspend with handshake (review

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Richard Reingruber
On Wed, 31 Mar 2021 05:27:05 GMT, David Holmes wrote: >> src/hotspot/share/runtime/handshake.cpp line 485: >> >>> 483: } else { >>> 484: // Asynchronous may block so they may not execute >>> ~PreserveExceptionMark before safepointing >>> 485: // in outer loop. >> >> Sorry

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent

2021-03-31 Thread actuallyasmartname
On Tue, 30 Mar 2021 18:58:24 GMT, Andrey Turbanov wrote: > Found by IntelliJ IDEA inspection `Java | Java language level migration aids > | Java 5 | 'StringBuffer' may be 'StringBuilder'` > As suggested in > https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created > separa

RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent

2021-03-31 Thread Andrey Turbanov
Found by IntelliJ IDEA inspection `Java | Java language level migration aids | Java 5 | 'StringBuffer' may be 'StringBuilder'` As suggested in https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created separate PR for module `jdk.hotspot.agent` Similar cleanups in the past: http

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent

2021-03-31 Thread Aleksey Shipilev
On Tue, 30 Mar 2021 19:41:32 GMT, actuallyasmartname wrote: >> Found by IntelliJ IDEA inspection `Java | Java language level migration aids >> | Java 5 | 'StringBuffer' may be 'StringBuilder'` >> As suggested in >> https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created >

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent

2021-03-31 Thread Yasumasa Suenaga
On Tue, 30 Mar 2021 18:58:24 GMT, Andrey Turbanov wrote: > Found by IntelliJ IDEA inspection `Java | Java language level migration aids > | Java 5 | 'StringBuffer' may be 'StringBuilder'` > As suggested in > https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created > separa

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Robbin Ehn
On Tue, 30 Mar 2021 17:08:07 GMT, Daniel D. Daugherty wrote: >> Robbin Ehn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - 8257831: Suspend with handshake

Re: RFR: 8257831: Suspend with handshakes [v3]

2021-03-31 Thread Robbin Ehn
> A suspend request is done by handshaking thread target thread(s). When > executing the handshake operation we know the target mutator thread is in a > dormant state (as in safepoint safe state). We have a guarantee that it will > check it's poll before leaving the dormant state. To stop the th

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread David Holmes
On Wed, 31 Mar 2021 07:48:00 GMT, Richard Reingruber wrote: >> src/hotspot/share/prims/jvmtiEnv.cpp line 1009: >> >>> 1007: if (self_index >= 0) { >>> 1008: if (!JvmtiSuspendControl::suspend(current)) { >>> 1009: results[self_index] = JVMTI_ERROR_THREAD_NOT_ALIVE; >> >> Surely impos

Re: RFR: 8264396: Use the blessed modifier order in jdk.internal.jvmstat [v2]

2021-03-31 Thread Alex Blewitt
On Wed, 31 Mar 2021 06:07:57 GMT, Aleksey Shipilev wrote: >> Alex Blewitt has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated copyright dates > > Looks fine to me as well. Going to upstream this patch into opendjk/panama-foreign --

Withdrawn: 8264396: Use the blessed modifier order in jdk.internal.jvmstat

2021-03-31 Thread Alex Blewitt
On Mon, 29 Mar 2021 21:00:20 GMT, Alex Blewitt wrote: > 8264396: Use the blessed modifier order in jdk.internal.jvmstat This pull request has been closed without being integrated. - PR: https://git.openjdk.java.net/jdk/pull/3252

Re: RFR: 8264396: Use the blessed modifier order in jdk.internal.jvmstat [v2]

2021-03-31 Thread Alex Blewitt
On Wed, 31 Mar 2021 09:24:46 GMT, Alex Blewitt wrote: >> Looks fine to me as well. > > Going to upstream this patch into opendjk/panama-foreign Sorry, closed the wrong PR. This one should be good to go 🙄 - PR: https://git.openjdk.java.net/jdk/pull/3252

Re: RFR: 8257831: Suspend with handshakes [v3]

2021-03-31 Thread Richard Reingruber
On Wed, 31 Mar 2021 06:42:27 GMT, David Holmes wrote: >> Robbin Ehn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains three commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - Merge branch 'master' into SuspendInHa

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Richard Reingruber
On Wed, 31 Mar 2021 09:18:56 GMT, David Holmes wrote: >> Another thread can win the race to suspend the current thread (if >> claim_handshake() in try_process() fails). Then JVMTI_ERROR_THREAD_SUSPENDED >> should be returned. > > My comment was about JVMTI_ERROR_THREAD_NOT_ALIVE Sure. I agree

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Robbin Ehn
On Wed, 31 Mar 2021 02:43:21 GMT, David Holmes wrote: >> src/hotspot/os/posix/signals_posix.cpp line 1587: >> >>> 1585: // destructor has completed. >>> 1586: >>> 1587: if (thread->is_Java_thread() && >>> thread->as_Java_thread()->is_terminated()) { >> >> We need @dholmes-ora to verify th

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Robbin Ehn
On Tue, 30 Mar 2021 17:15:52 GMT, Daniel D. Daugherty wrote: > This is an elegant evolution of the suspend/resume mechanism. > > It is so nice to see all the suspend-equivalent stuff go away! Thanks Dan! > src/hotspot/share/runtime/handshake.hpp line 37: > >> 35: class JavaThread; >> 36: cla

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Robbin Ehn
On Tue, 30 Mar 2021 21:12:47 GMT, Richard Reingruber wrote: > Hi Robbin, > > this is a great simplification. Excellent work! :) > > Thanks, Richard. Thanks Richard! > src/hotspot/share/prims/jvmtiRawMonitor.cpp line 421: > >> 419: guarantee(jt->thread_state() == _thread_in_native, "invar

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Robbin Ehn
On Mon, 29 Mar 2021 17:23:11 GMT, Richard Reingruber wrote: >> Robbin Ehn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - 8257831: Suspend with handshake (r

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Robbin Ehn
On Wed, 31 Mar 2021 08:01:27 GMT, Richard Reingruber wrote: >> I think this relates to why the PEM was moved from the loop-scope to the >> sync op case only. That said it isn't clear why we need the HM or PEM. > > I guess it should be "... must not execute ~PreserveExceptionMark ..." > ~Preserve

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Robbin Ehn
On Tue, 30 Mar 2021 08:20:21 GMT, Richard Reingruber wrote: >> Robbin Ehn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - 8257831: Suspend with handshake (r

Re: RFR: 8264285: Clean the modification of ccstr JVM flags

2021-03-31 Thread Coleen Phillimore
On Mon, 29 Mar 2021 21:35:52 GMT, Ioi Lam wrote: > There are two versions of JVMFlagAccess::ccstrAtPut() for modifying JVM flags > of the ccstr type (i.e., strings). > > - One version requires the caller to free the old value, but some callers > don't do that (writeableFlags.cpp). > - The othe

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread David Holmes
On 31/03/2021 8:51 pm, Robbin Ehn wrote: On Wed, 31 Mar 2021 02:43:21 GMT, David Holmes wrote: src/hotspot/os/posix/signals_posix.cpp line 1587: 1585: // destructor has completed. 1586: 1587: if (thread->is_Java_thread() && thread->as_Java_thread()->is_terminated()) { We need @dholmes

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Daniel D . Daugherty
On Wed, 31 Mar 2021 03:47:28 GMT, David Holmes wrote: >> Robbin Ehn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - 8257831: Suspend with handshake (review

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Daniel D . Daugherty
On Wed, 31 Mar 2021 10:22:28 GMT, Richard Reingruber wrote: >> My comment was about JVMTI_ERROR_THREAD_NOT_ALIVE > > Sure. I agree with your comment. It depends on how late we can call into an event handler during the JavaThread exit code path. Is it possible to post an event on a thread that ha

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Robbin Ehn
On Wed, 31 Mar 2021 10:48:11 GMT, Robbin Ehn wrote: >> Thanks @dcubed-ojdk - no it won't. The problem is that the signal can hit >> very late in a thread's termination process, after the JavaThread destructor >> has executed, so no query of JavaThread state is possible. So we needed >> somethi

Re: RFR: 8264124: Update MXBean specification and implementation to extend mapping of CompositeType to records [v3]

2021-03-31 Thread Daniel Fuchs
> This RFE proposes to extend the MXBean framework to define a mapping to > records. > > The MXBean framework already defines a mapping of `CompositeType` to plain > java objects. Records are a natural representation of CompositeTypes. A > record can be easily reconstructed from a `CompositeDat

Re: RFR: 8264124: Update MXBean specification and implementation to extend mapping of CompositeType to records [v2]

2021-03-31 Thread Daniel Fuchs
On Mon, 29 Mar 2021 22:12:01 GMT, Daniel Fuchs wrote: >> You add record in "Mappings for other types". I think it deserves a >> separate section "Mappings for record classes" (maybe after primitive >> types). It's useful to add a row for record in the summary table above >> "Mappings for pr

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent

2021-03-31 Thread Kevin Walls
On Tue, 30 Mar 2021 18:58:24 GMT, Andrey Turbanov wrote: > Found by IntelliJ IDEA inspection `Java | Java language level migration aids > | Java 5 | 'StringBuffer' may be 'StringBuilder'` > As suggested in > https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created > separa

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent [v2]

2021-03-31 Thread Andrey Turbanov
> Found by IntelliJ IDEA inspection `Java | Java language level migration aids > | Java 5 | 'StringBuffer' may be 'StringBuilder'` > As suggested in > https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created > separate PR for module `jdk.hotspot.agent` > Similar cleanups in t

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent [v2]

2021-03-31 Thread Andrey Turbanov
On Wed, 31 Mar 2021 08:23:24 GMT, Yasumasa Suenaga wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8264484: Replace uses of StringBuffer with StringBuilder in >> jdk.hotspot.agent >> >> remove redundant lo

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent [v2]

2021-03-31 Thread Andrey Turbanov
On Wed, 31 Mar 2021 15:41:42 GMT, Kevin Walls wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8264484: Replace uses of StringBuffer with StringBuilder in >> jdk.hotspot.agent >> >> remove redundant local v

Re: RFR: 8264396: Use the blessed modifier order in jdk.internal.jvmstat [v2]

2021-03-31 Thread Chris Plummer
On Tue, 30 Mar 2021 20:37:45 GMT, Alex Blewitt wrote: >> 8264396: Use the blessed modifier order in jdk.internal.jvmstat > > Alex Blewitt has updated the pull request incrementally with one additional > commit since the last revision: > > Updated copyright dates Marked as reviewed by cjplum

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent [v2]

2021-03-31 Thread Kevin Walls
On Wed, 31 Mar 2021 16:07:56 GMT, Andrey Turbanov wrote: >> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java >> line 887: >> >>> 885:protected String genMultPCHref(String pcs) { >>> 886: String buf = genBaseHref() + "pc_multiple=" + pcs; >>> 887:

Integrated: 8264396: Use the blessed modifier order in jdk.internal.jvmstat

2021-03-31 Thread Alex Blewitt
On Mon, 29 Mar 2021 21:00:20 GMT, Alex Blewitt wrote: > 8264396: Use the blessed modifier order in jdk.internal.jvmstat This pull request has now been integrated. Changeset: f43d14a2 Author:Alex Blewitt Committer: Kevin Walls URL: https://git.openjdk.java.net/jdk/commit/f43d14a2 St

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent [v3]

2021-03-31 Thread Andrey Turbanov
> Found by IntelliJ IDEA inspection `Java | Java language level migration aids > | Java 5 | 'StringBuffer' may be 'StringBuilder'` > As suggested in > https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created > separate PR for module `jdk.hotspot.agent` > Similar cleanups in t

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent [v3]

2021-03-31 Thread Andrey Turbanov
On Wed, 31 Mar 2021 16:35:32 GMT, Kevin Walls wrote: >> done > > Thanks - just a nit, looks like an extra space means "return genBaseHref() > ..etc.." is not aligned. fixed - PR: https://git.openjdk.java.net/jdk/pull/3275

Re: RFR: 8264124: Update MXBean specification and implementation to extend mapping of CompositeType to records [v4]

2021-03-31 Thread Daniel Fuchs
> This RFE proposes to extend the MXBean framework to define a mapping to > records. > > The MXBean framework already defines a mapping of `CompositeType` to plain > java objects. Records are a natural representation of CompositeTypes. A > record can be easily reconstructed from a `CompositeDat

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent [v3]

2021-03-31 Thread Kevin Walls
On Wed, 31 Mar 2021 15:42:03 GMT, Kevin Walls wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8264484: Replace uses of StringBuffer with StringBuilder in >> jdk.hotspot.agent >> >> fix indentation > > Chan

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent [v3]

2021-03-31 Thread Kevin Walls
On Wed, 31 Mar 2021 17:45:33 GMT, Andrey Turbanov wrote: >> Found by IntelliJ IDEA inspection `Java | Java language level migration aids >> | Java 5 | 'StringBuffer' may be 'StringBuilder'` >> As suggested in >> https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created >> s

Re: RFR: 8264124: Update MXBean specification and implementation to extend mapping of CompositeType to records [v2]

2021-03-31 Thread Mandy Chung
On Wed, 31 Mar 2021 15:38:22 GMT, Daniel Fuchs wrote: >> Link added. With respect to adding a section for records, it's a bit >> difficult to separate that from the "Mapping for other types" without a lot >> of duplication. I can add a row in the summary table, and then add a new >> section "M

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

2021-03-31 Thread Ioi Lam
> There are two versions of JVMFlagAccess::ccstrAtPut() for modifying JVM flags > of the ccstr type (i.e., strings). > > - One version requires the caller to free the old value, but some callers > don't do that (writeableFlags.cpp). > - The other version frees the old value on behalf of the call

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

2021-03-31 Thread Ioi Lam
On Wed, 31 Mar 2021 12:58:50 GMT, Coleen Phillimore wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> relax flag attributions (ala JDK-7123237) > > src/hotspot/share/runtime/flags/debug_globals.hpp line 38: > >> 36: // h

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent [v3]

2021-03-31 Thread Alex Menkov
On Wed, 31 Mar 2021 17:45:33 GMT, Andrey Turbanov wrote: >> Found by IntelliJ IDEA inspection `Java | Java language level migration aids >> | Java 5 | 'StringBuffer' may be 'StringBuilder'` >> As suggested in >> https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created >> s

RFR: 8264538: Rename SystemDictionary::parse_stream

2021-03-31 Thread Coleen Phillimore
This function is used to call the classfile parser for hidden or anonymous classes, and for use with jvmti RedefineClasses. The latter only calls KlassFactory::create_from_stream and skips the rest of the code in SystemDictionary::parse_stream. Renamed SystemDictionary::parse_stream -> resolve_

Re: RFR: 8264538: Rename SystemDictionary::parse_stream [v2]

2021-03-31 Thread Coleen Phillimore
> This function is used to call the classfile parser for hidden or anonymous > classes, and for use with jvmti RedefineClasses. The latter only calls > KlassFactory::create_from_stream and skips the rest of the code in > SystemDictionary::parse_stream. > > Renamed SystemDictionary::parse_stream

Re: RFR: 8264538: Rename SystemDictionary::parse_stream [v2]

2021-03-31 Thread Lois Foltan
On Wed, 31 Mar 2021 19:57:57 GMT, Coleen Phillimore wrote: >> This function is used to call the classfile parser for hidden or anonymous >> classes, and for use with jvmti RedefineClasses. The latter only calls >> KlassFactory::create_from_stream and skips the rest of the code in >> SystemDict

Re: RFR: 8264538: Rename SystemDictionary::parse_stream [v2]

2021-03-31 Thread Harold Seigel
On Wed, 31 Mar 2021 19:57:57 GMT, Coleen Phillimore wrote: >> This function is used to call the classfile parser for hidden or anonymous >> classes, and for use with jvmti RedefineClasses. The latter only calls >> KlassFactory::create_from_stream and skips the rest of the code in >> SystemDict

Re: RFR: 8264538: Rename SystemDictionary::parse_stream [v2]

2021-03-31 Thread Harold Seigel
On Wed, 31 Mar 2021 19:57:57 GMT, Coleen Phillimore wrote: >> This function is used to call the classfile parser for hidden or anonymous >> classes, and for use with jvmti RedefineClasses. The latter only calls >> KlassFactory::create_from_stream and skips the rest of the code in >> SystemDict

Re: RFR: 8264124: Update MXBean specification and implementation to extend mapping of CompositeType to records [v5]

2021-03-31 Thread Daniel Fuchs
> This RFE proposes to extend the MXBean framework to define a mapping to > records. > > The MXBean framework already defines a mapping of `CompositeType` to plain > java objects. Records are a natural representation of CompositeTypes. A > record can be easily reconstructed from a `CompositeDat

Re: RFR: 8264124: Update MXBean specification and implementation to extend mapping of CompositeType to records [v2]

2021-03-31 Thread Daniel Fuchs
On Wed, 31 Mar 2021 18:32:31 GMT, Mandy Chung wrote: >> Hi Mandy, I have updated the PR with a revised version of the text above. Is >> that more in line what you had in mind? >> >> best regards, >> -- daniel > > This looks better. I like a separate mapping section for records since the > map

Re: RFR: 8259070: Add jcmd option to dump CDS [v8]

2021-03-31 Thread Yumin Qi
> Hi, Please review > > Added jcmd option for dumping CDS archive during application runtime. > Before this change, user has to dump shared archive in two steps: first run > application with > `java -XX:DumpLoadedClassList= ` > to collect shareable class names and saved in file `` ,

Re: RFR: 8264124: Update MXBean specification and implementation to extend mapping of CompositeType to records [v6]

2021-03-31 Thread Daniel Fuchs
> This RFE proposes to extend the MXBean framework to define a mapping to > records. > > The MXBean framework already defines a mapping of `CompositeType` to plain > java objects. Records are a natural representation of CompositeTypes. A > record can be easily reconstructed from a `CompositeDat

Re: RFR: 8264538: Rename SystemDictionary::parse_stream [v2]

2021-03-31 Thread Coleen Phillimore
On Wed, 31 Mar 2021 19:57:57 GMT, Coleen Phillimore wrote: >> This function is used to call the classfile parser for hidden or anonymous >> classes, and for use with jvmti RedefineClasses. The latter only calls >> KlassFactory::create_from_stream and skips the rest of the code in >> SystemDict

Re: RFR: 8264538: Rename SystemDictionary::parse_stream [v3]

2021-03-31 Thread Coleen Phillimore
> This function is used to call the classfile parser for hidden or anonymous > classes, and for use with jvmti RedefineClasses. The latter only calls > KlassFactory::create_from_stream and skips the rest of the code in > SystemDictionary::parse_stream. > > Renamed SystemDictionary::parse_stream

Re: RFR: 8264538: Rename SystemDictionary::parse_stream [v2]

2021-03-31 Thread Coleen Phillimore
On Wed, 31 Mar 2021 20:07:50 GMT, Lois Foltan wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fifix comment > > src/hotspot/share/prims/jvm.cpp line 950: > >> 948: InstanceKlass* ik = NULL; >> 949: if (!i

Re: RFR: 8264538: Rename SystemDictionary::parse_stream [v2]

2021-03-31 Thread Coleen Phillimore
On Wed, 31 Mar 2021 20:22:08 GMT, Harold Seigel wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fifix comment > > src/hotspot/share/prims/jvmtiRedefineClasses.cpp line 1395: > >> 1393:

Re: RFR: 8264124: Update MXBean specification and implementation to extend mapping of CompositeType to records [v6]

2021-03-31 Thread Mandy Chung
On Wed, 31 Mar 2021 21:02:51 GMT, Daniel Fuchs wrote: >> This RFE proposes to extend the MXBean framework to define a mapping to >> records. >> >> The MXBean framework already defines a mapping of `CompositeType` to plain >> java objects. Records are a natural representation of CompositeTypes.

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

2021-03-31 Thread Ioi Lam
On Tue, 30 Mar 2021 03:44:26 GMT, David Holmes wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> relax flag attributions (ala JDK-7123237) > > src/hotspot/share/services/writeableFlags.cpp line 250: > >> 248: if (err =

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread David Holmes
Hi Dan, On 1/04/2021 12:07 am, Daniel D.Daugherty wrote: On Wed, 31 Mar 2021 10:22:28 GMT, Richard Reingruber wrote: My comment was about JVMTI_ERROR_THREAD_NOT_ALIVE Sure. I agree with your comment. It depends on how late we can call into an event handler during the JavaThread exit code

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread David Holmes
On 1/04/2021 12:35 am, Robbin Ehn wrote: On Wed, 31 Mar 2021 10:48:11 GMT, Robbin Ehn wrote: Thanks @dcubed-ojdk - no it won't. The problem is that the signal can hit very late in a thread's termination process, after the JavaThread destructor has executed, so no query of JavaThread state

Re: RFR: 8259070: Add jcmd option to dump CDS [v8]

2021-03-31 Thread Ioi Lam
On Wed, 31 Mar 2021 20:58:46 GMT, Yumin Qi wrote: >> Hi, Please review >> >> Added jcmd option for dumping CDS archive during application runtime. >> Before this change, user has to dump shared archive in two steps: first run >> application with >> `java -XX:DumpLoadedClassList= ` >

Re: RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent [v3]

2021-03-31 Thread Yasumasa Suenaga
On Wed, 31 Mar 2021 17:45:33 GMT, Andrey Turbanov wrote: >> Found by IntelliJ IDEA inspection `Java | Java language level migration aids >> | Java 5 | 'StringBuffer' may be 'StringBuilder'` >> As suggested in >> https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created >> s

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

2021-03-31 Thread Coleen Phillimore
On Wed, 31 Mar 2021 19:01:48 GMT, Ioi Lam wrote: >> There are two versions of JVMFlagAccess::ccstrAtPut() for modifying JVM >> flags of the ccstr type (i.e., strings). >> >> - One version requires the caller to free the old value, but some callers >> don't do that (writeableFlags.cpp). >> - Th

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

2021-03-31 Thread Coleen Phillimore
On Wed, 31 Mar 2021 19:02:02 GMT, Ioi Lam wrote: >> src/hotspot/share/runtime/flags/debug_globals.hpp line 38: >> >>> 36: // have any MANAGEABLE flags of the ccstr type, but we really need to >>> 37: // make sure the implementation is correct (in terms of memory >>> allocation) >>> 38: // just

RFR: 8264150: CDS dumping code calls TRAPS functions in VM thread

2021-03-31 Thread Coleen Phillimore
This change initializes the vtables/itables without checking constraints. After initializing but before the class is visible in the SystemDictionary, constraints are checked in a separate loop. Tested with tier1-6 which includes jck tests. - Commit messages: - 8264150: CDS dumpin

Re: RFR: 8176026: SA: Huge heap sizes cause a negative value to be displayed in the jhisto heap total [v2]

2021-03-31 Thread Koichi Sakata
On Fri, 26 Mar 2021 13:57:00 GMT, Koichi Sakata wrote: >> Marked as reviewed by [email protected] (no known OpenJDK username). > > I just updated the copyright. Could someone sponsor this pull request? It is ready. - PR: https://git.openjdk.java.net/jdk/pull/3087

Re: RFR: 8257831: Suspend with handshakes [v3]

2021-03-31 Thread Patricio Chilano Mateo
On Wed, 31 Mar 2021 08:27:35 GMT, Robbin Ehn wrote: >> A suspend request is done by handshaking thread target thread(s). When >> executing the handshake operation we know the target mutator thread is in a >> dormant state (as in safepoint safe state). We have a guarantee that it will >> check

Re: RFR: 8257831: Suspend with handshakes [v2]

2021-03-31 Thread Patricio Chilano Mateo
On Tue, 30 Mar 2021 13:26:13 GMT, Richard Reingruber wrote: >> Robbin Ehn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - 8257831: Suspend with handshake (r

Re: RFR: 8257831: Suspend with handshakes [v3]

2021-03-31 Thread Patricio Chilano Mateo
On Wed, 31 Mar 2021 08:27:35 GMT, Robbin Ehn wrote: >> A suspend request is done by handshaking thread target thread(s). When >> executing the handshake operation we know the target mutator thread is in a >> dormant state (as in safepoint safe state). We have a guarantee that it will >> check

Re: RFR: 8257831: Suspend with handshakes [v3]

2021-03-31 Thread Patricio Chilano Mateo
On Wed, 31 Mar 2021 06:32:40 GMT, David Holmes wrote: >> Robbin Ehn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains three commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - Merge branch 'master' into SuspendInHa

Re: RFR: 8176026: SA: Huge heap sizes cause a negative value to be displayed in the jhisto heap total [v3]

2021-03-31 Thread Yasumasa Suenaga
On Fri, 26 Mar 2021 13:51:40 GMT, Koichi Sakata wrote: >> When a heap is used more than about 2.1GB, clhsdb jhisto shows a negative >> number in the total field. >> >> $ java -Xmx20g Sample >> >> $ jhsdb clhsdb --pid 5773 >> Attaching to process 5773, please wait... >> hsdb> jhisto >> ... >> 2

Integrated: 8176026: SA: Huge heap sizes cause a negative value to be displayed in the jhisto heap total

2021-03-31 Thread Koichi Sakata
On Fri, 19 Mar 2021 11:49:39 GMT, Koichi Sakata wrote: > When a heap is used more than about 2.1GB, clhsdb jhisto shows a negative > number in the total field. > > $ java -Xmx20g Sample > > $ jhsdb clhsdb --pid 5773 > Attaching to process 5773, please wait... > hsdb> jhisto > ... > 299:

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

2021-03-31 Thread Ioi Lam
On Thu, 1 Apr 2021 00:25:53 GMT, Coleen Phillimore wrote: >> I had to use a `product` flag due to the following code, which should have >> been removed as part of >> [JDK-8243208](https://bugs.openjdk.java.net/browse/JDK-8243208), but I was >> afraid to do so because I didn't have a test case.

Re: RFR: 8257831: Suspend with handshakes [v3]

2021-03-31 Thread David Holmes
On 1/04/2021 1:29 pm, Patricio Chilano Mateo wrote: On Wed, 31 Mar 2021 06:32:40 GMT, David Holmes wrote: Robbin Ehn has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits: - Merge branch 'master' into SuspendInHandshake

Re: RFR: 8264150: CDS dumping code calls TRAPS functions in VM thread

2021-03-31 Thread David Holmes
On Tue, 30 Mar 2021 22:25:06 GMT, Coleen Phillimore wrote: > This change initializes the vtables/itables without checking constraints. > After initializing but before the class is visible in the SystemDictionary, > constraints are checked in a separate loop. > > Tested with tier1-6 which incl

Re: RFR: 8259070: Add jcmd option to dump CDS [v8]

2021-03-31 Thread Ioi Lam
On Wed, 31 Mar 2021 20:58:46 GMT, Yumin Qi wrote: >> Hi, Please review >> >> Added jcmd option for dumping CDS archive during application runtime. >> Before this change, user has to dump shared archive in two steps: first run >> application with >> `java -XX:DumpLoadedClassList= ` >

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

2021-03-31 Thread David Holmes
On 1/04/2021 5:05 am, Ioi Lam wrote: On Wed, 31 Mar 2021 12:58:50 GMT, Coleen Phillimore wrote: Ioi Lam has updated the pull request incrementally with one additional commit since the last revision: relax flag attributions (ala JDK-7123237) src/hotspot/share/runtime/flags/debug_globals.

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

2021-03-31 Thread Ioi Lam
On 3/31/21 10:22 PM, David Holmes wrote: On 1/04/2021 5:05 am, Ioi Lam wrote: On Wed, 31 Mar 2021 12:58:50 GMT, Coleen Phillimore wrote: 36: // have any MANAGEABLE flags of the ccstr type, but we really need to 37: // make sure the implementation is correct (in terms of memory allocati

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

2021-03-31 Thread David Holmes
On 1/04/2021 3:29 pm, Ioi Lam wrote: On 3/31/21 10:22 PM, David Holmes wrote: On 1/04/2021 5:05 am, Ioi Lam wrote: On Wed, 31 Mar 2021 12:58:50 GMT, Coleen Phillimore wrote: 36: // have any MANAGEABLE flags of the ccstr type, but we really need to 37: // make sure the implementation is

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v3]

2021-03-31 Thread Ioi Lam
> There are two versions of JVMFlagAccess::ccstrAtPut() for modifying JVM flags > of the ccstr type (i.e., strings). > > - One version requires the caller to free the old value, but some callers > don't do that (writeableFlags.cpp). > - The other version frees the old value on behalf of the call

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

2021-03-31 Thread Ioi Lam
On 3/31/21 10:47 PM, David Holmes wrote: On 1/04/2021 3:29 pm, Ioi Lam wrote: On 3/31/21 10:22 PM, David Holmes wrote: On 1/04/2021 5:05 am, Ioi Lam wrote: On Wed, 31 Mar 2021 12:58:50 GMT, Coleen Phillimore wrote: 36: // have any MANAGEABLE flags of the ccstr type, but we really ne

Re: RFR: 8264150: CDS dumping code calls TRAPS functions in VM thread

2021-03-31 Thread Ioi Lam
On Tue, 30 Mar 2021 22:25:06 GMT, Coleen Phillimore wrote: > This change initializes the vtables/itables without checking constraints. > After initializing but before the class is visible in the SystemDictionary, > constraints are checked in a separate loop. > > Tested with tier1-6 which incl

Re: RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

2021-03-31 Thread David Holmes
On 1/04/2021 4:19 pm, Ioi Lam wrote: On 3/31/21 10:47 PM, David Holmes wrote: On 1/04/2021 3:29 pm, Ioi Lam wrote: On 3/31/21 10:22 PM, David Holmes wrote: On 1/04/2021 5:05 am, Ioi Lam wrote: On Wed, 31 Mar 2021 12:58:50 GMT, Coleen Phillimore wrote: 36: // have any MANAGEABLE flags