Re: RFR: 8255706: The JDWP debug agent unecessarily checks for JVMTI_ERROR_INTERRUPT after calling RawMonitorEnter

2020-11-02 Thread Alan Bateman
On Mon, 2 Nov 2020 22:11:48 GMT, Chris Plummer wrote: > Remove code that retries if RawMonitorEnter is interrupted since that can't > happen: > > https://docs.oracle.com/en/java/javase/14/docs/specs/jvmti.html#RawMonitorEnter Marked as reviewed by alanb (Reviewer). - PR:

Integrated: 8254723: add diagnostic command to write Linux perf map file

2020-11-02 Thread Nick Gasson
On Tue, 20 Oct 2020 09:27:45 GMT, Nick Gasson wrote: > When using the Linux "perf" tool to do system profiling, symbol names of > running Java methods cannot be decoded, resulting in unhelpful output > such as: > > 10.52% [JIT] tid 236748 [.] 0x7f6fdb75d223 > > Perf can read a simple

RFR: 8255706: The JDWP debug agent unecessarily checks for JVMTI_ERROR_INTERRUPT after calling RawMonitorEnter

2020-11-02 Thread Chris Plummer
Remove code that retries if RawMonitorEnter is interrupted since that can't happen: https://docs.oracle.com/en/java/javase/14/docs/specs/jvmti.html#RawMonitorEnter - Commit messages: - RawMonitorEnter will never return JVMTI_ERROR_INTERRUPT, so don't check for it. Changes:

Re: RFR: 8255452: Doing GC during JVMTI MethodExit event posting breaks return oop [v2]

2020-11-02 Thread Serguei Spitsyn
On Mon, 2 Nov 2020 17:52:58 GMT, Erik Österlund wrote: >> src/hotspot/share/prims/jvmtiExport.cpp line 1570: >> >>> 1568: // return a flag when a method terminates by throwing an exception >>> 1569: // i.e. if an exception is thrown and it's not caught by the >>> current method >>> 1570:

Re: RFR: 8255452: Doing GC during JVMTI MethodExit event posting breaks return oop [v2]

2020-11-02 Thread Serguei Spitsyn
On Mon, 2 Nov 2020 16:20:09 GMT, Coleen Phillimore wrote: >> Erik Österlund has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Coleen CR1: Refactoring > > This looks better. Just to have the JRT_BLOCK be unconditional is an >

Integrated: 8255695: Some JVMTI calls in the jdwp debug agent are using FUNC_PTR instead of JVMTI_FUNC_PTR

2020-11-02 Thread Chris Plummer
On Fri, 30 Oct 2020 21:11:09 GMT, Chris Plummer wrote: > Use JVMTI_FUNC_PTR instead of FUNC_PTR for most JVMTI calls. See CR for > details. This pull request has now been integrated. Changeset: c7747416 Author:Chris Plummer URL: https://git.openjdk.java.net/jdk/commit/c7747416

Integrated: 8255696: JDWP debug agent's canSuspendResumeThreadLists() should be removed

2020-11-02 Thread Chris Plummer
On Fri, 30 Oct 2020 20:42:24 GMT, Chris Plummer wrote: > This RFR removes the debug agent's canSuspendResumeThreadLists() function and > code that depends on it. Please see the CR for a description of why this is > being done. This pull request has now been integrated. Changeset: ceba2f85

Integrated: 8255694: memory leak in JDWP debug agent after calling JVMTI GetAllThreads

2020-11-02 Thread Chris Plummer
On Fri, 30 Oct 2020 20:30:49 GMT, Chris Plummer wrote: > The debug agent needs to deallocate memory that is allocated by calls to > GetAllThreads. There were two places were this was not being done, resulting > in a memory leak. This pull request has now been integrated. Changeset: a250716a

Re: RFR: 8255695: Some JVMTI calls in the jdwp debug agent are using FUNC_PTR instead of JVMTI_FUNC_PTR

2020-11-02 Thread Alex Menkov
On Fri, 30 Oct 2020 21:11:09 GMT, Chris Plummer wrote: > Use JVMTI_FUNC_PTR instead of FUNC_PTR for most JVMTI calls. See CR for > details. Marked as reviewed by amenkov (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/971

Re: RFR: 8255694: memory leak in JDWP debug agent after calling JVMTI GetAllThreads [v2]

2020-11-02 Thread Chris Plummer
> The debug agent needs to deallocate memory that is allocated by calls to > GetAllThreads. There were two places were this was not being done, resulting > in a memory leak. Chris Plummer has updated the pull request incrementally with one additional commit since the last revision: Remove

Re: RFR: 8255695: Some JVMTI calls in the jdwp debug agent are using FUNC_PTR instead of JVMTI_FUNC_PTR

2020-11-02 Thread Chris Plummer
On Sat, 31 Oct 2020 08:12:50 GMT, Serguei Spitsyn wrote: >> Use JVMTI_FUNC_PTR instead of FUNC_PTR for most JVMTI calls. See CR for >> details. > > Looks good. > Thanks, > Serguei Ping! I could use one more review. The changes are pretty trivial. Thanks! - PR:

Re: RFR: 8255452: Doing GC during JVMTI MethodExit event posting breaks return oop [v2]

2020-11-02 Thread Erik Österlund
On Mon, 2 Nov 2020 16:19:59 GMT, Coleen Phillimore wrote: >> Erik Österlund has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Coleen CR1: Refactoring > > src/hotspot/share/prims/jvmtiExport.cpp line 1570: > >> 1568: // return a flag

Re: RFR: 8212879: Make JVMTI TagMap table concurrent [v2]

2020-11-02 Thread Coleen Phillimore
On Mon, 2 Nov 2020 16:52:02 GMT, Coleen Phillimore wrote: >> I thought that we didn't load the archived heap from CDS, if JVMTI heap >> walker capabilities are in place, as we didn't want this kind of >> interactions. But maybe I'm missing something, since you said having this if >> statement

Re: RFR: 8212879: Make JVMTI TagMap table concurrent [v2]

2020-11-02 Thread Coleen Phillimore
On Mon, 2 Nov 2020 15:45:18 GMT, Erik Österlund wrote: >> Because it crashed with my changes and didn't without. I cannot recollect >> why. > > I thought that we didn't load the archived heap from CDS, if JVMTI heap > walker capabilities are in place, as we didn't want this kind of >

Re: RFR: 8212879: Make JVMTI TagMap table concurrent [v2]

2020-11-02 Thread Coleen Phillimore
On Mon, 2 Nov 2020 15:18:43 GMT, Erik Österlund wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Code review comments from StefanK. > >

Re: RFR: 8255452: Doing GC during JVMTI MethodExit event posting breaks return oop [v2]

2020-11-02 Thread Coleen Phillimore
On Mon, 2 Nov 2020 11:14:10 GMT, Erik Österlund wrote: >> The imasm::remove_activation() call does not deal with safepoints very well. >> However, when the MethodExit JVMTI event is being called, we call into the >> runtime in the middle of remove_activation(). If the value being returned is

Re: RFR: 8212879: Make JVMTI TagMap table concurrent [v2]

2020-11-02 Thread Erik Österlund
On Mon, 2 Nov 2020 12:50:23 GMT, Coleen Phillimore wrote: >> src/hotspot/share/prims/jvmtiTagMap.cpp line 954: >> >>> 952: o->klass()->external_name()); >>> 953: return; >>> 954: } >> >> Why is this done as a part of this RFE? Is this a bug fix that should be >>

Re: RFR: 8212879: Make JVMTI TagMap table concurrent [v2]

2020-11-02 Thread Erik Österlund
On Mon, 2 Nov 2020 15:58:15 GMT, Coleen Phillimore wrote: >> This change turns the HashTable that JVMTI uses for object tagging into a >> regular Hotspot hashtable - the one in hashtable.hpp with resizing and >> rehashing. Instead of pointing directly to oops so that GC has to walk the >>

Integrated: 8255616: Disable AOT and Graal in Oracle OpenJDK

2020-11-02 Thread Vladimir Kozlov
On Fri, 30 Oct 2020 17:40:51 GMT, Vladimir Kozlov wrote: > We shipped Ahead-of-Time compilation (the jaotc tool) in JDK 9, as an > experimental feature. We shipped Graal as an experimental JIT compiler in JDK > 10. We haven't seen much use of these features, and the effort required to >

Re: RFR: 8212879: Make JVMTI TagMap table concurrent [v2]

2020-11-02 Thread Zhengyu Gu
On Mon, 2 Nov 2020 15:58:15 GMT, Coleen Phillimore wrote: >> This change turns the HashTable that JVMTI uses for object tagging into a >> regular Hotspot hashtable - the one in hashtable.hpp with resizing and >> rehashing. Instead of pointing directly to oops so that GC has to walk the >>

Re: RFR: 8212879: Make JVMTI TagMap table concurrent [v2]

2020-11-02 Thread Coleen Phillimore
> This change turns the HashTable that JVMTI uses for object tagging into a > regular Hotspot hashtable - the one in hashtable.hpp with resizing and > rehashing. Instead of pointing directly to oops so that GC has to walk the > table to follow oops and then to rehash the table, this table

Re: RFR: 8212879: Make JVMTI TagMap table not hash on oop address

2020-11-02 Thread Coleen Phillimore
On Fri, 30 Oct 2020 20:46:31 GMT, Erik Joelsson wrote: >> This change turns the HashTable that JVMTI uses for object tagging into a >> regular Hotspot hashtable - the one in hashtable.hpp with resizing and >> rehashing. Instead of pointing directly to oops so that GC has to walk the >>

Re: RFR: 8212879: Make JVMTI TagMap table not hash on oop address

2020-11-02 Thread Coleen Phillimore
On Fri, 30 Oct 2020 20:23:04 GMT, Coleen Phillimore wrote: > This change turns the HashTable that JVMTI uses for object tagging into a > regular Hotspot hashtable - the one in hashtable.hpp with resizing and > rehashing. Instead of pointing directly to oops so that GC has to walk the >

Re: RFR: 8212879: Make JVMTI TagMap table not hash on oop address

2020-11-02 Thread Coleen Phillimore
On Mon, 2 Nov 2020 08:08:53 GMT, Stefan Karlsson wrote: >> This change turns the HashTable that JVMTI uses for object tagging into a >> regular Hotspot hashtable - the one in hashtable.hpp with resizing and >> rehashing. Instead of pointing directly to oops so that GC has to walk the >>

Re: RFR: 8212879: Make JVMTI TagMap table not hash on oop address

2020-11-02 Thread Coleen Phillimore
On Mon, 2 Nov 2020 08:34:17 GMT, Stefan Karlsson wrote: >> src/hotspot/share/prims/jvmtiTagMap.cpp line 126: >> >>> 124: // concurrent GCs. So fix it here once we have a lock or are >>> 125: // at a safepoint. >>> 126: // SetTag and GetTag should not post events! >> >> I think it would

Re: RFR: 8255616: Disable AOT and Graal in Oracle OpenJDK

2020-11-02 Thread Magnus Ihse Bursie
On Fri, 30 Oct 2020 17:40:51 GMT, Vladimir Kozlov wrote: > We shipped Ahead-of-Time compilation (the jaotc tool) in JDK 9, as an > experimental feature. We shipped Graal as an experimental JIT compiler in JDK > 10. We haven't seen much use of these features, and the effort required to >

Re: RFR: 8212879: Make JVMTI TagMap table not hash on oop address

2020-11-02 Thread Magnus Ihse Bursie
On Fri, 30 Oct 2020 20:23:04 GMT, Coleen Phillimore wrote: > This change turns the HashTable that JVMTI uses for object tagging into a > regular Hotspot hashtable - the one in hashtable.hpp with resizing and > rehashing. Instead of pointing directly to oops so that GC has to walk the >

Re: RFR: 8212879: Make JVMTI TagMap table not hash on oop address

2020-11-02 Thread Stefan Karlsson
On Mon, 2 Nov 2020 08:25:28 GMT, Stefan Karlsson wrote: >> This change turns the HashTable that JVMTI uses for object tagging into a >> regular Hotspot hashtable - the one in hashtable.hpp with resizing and >> rehashing. Instead of pointing directly to oops so that GC has to walk the >>

Re: RFR: 8212879: Make JVMTI TagMap table not hash on oop address

2020-11-02 Thread Stefan Karlsson
On Fri, 30 Oct 2020 20:23:04 GMT, Coleen Phillimore wrote: > This change turns the HashTable that JVMTI uses for object tagging into a > regular Hotspot hashtable - the one in hashtable.hpp with resizing and > rehashing. Instead of pointing directly to oops so that GC has to walk the >

Re: RFR: 8255452: Doing GC during JVMTI MethodExit event posting breaks return oop [v2]

2020-11-02 Thread Erik Österlund
On Sat, 31 Oct 2020 09:54:09 GMT, Serguei Spitsyn wrote: > Hi Erik, > > Nice discovery! Indeed, this is a long standing issue. It looks good in > general. > I agree with Coleen, it would be nice if there is an elegant way to move the > oop_result saving/restoring code to

Re: RFR: 8255452: Doing GC during JVMTI MethodExit event posting breaks return oop [v2]

2020-11-02 Thread Erik Österlund
On Fri, 30 Oct 2020 14:09:46 GMT, Erik Österlund wrote: >> Oh that's actually horrible. I wonder if it's possible to hoist saving the >> result oop into the InterpreterRuntime entry. And pass the Handle into >> JvmtiExport::post_method_exit(). > > I tried that first, and ended up with a

Re: RFR: 8255452: Doing GC during JVMTI MethodExit event posting breaks return oop [v2]

2020-11-02 Thread Erik Österlund
On Sat, 31 Oct 2020 09:54:09 GMT, Serguei Spitsyn wrote: >> Erik Österlund has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Coleen CR1: Refactoring > > Hi Erik, > > Nice discovery! Indeed, this is a long standing issue. It looks good in

Re: RFR: 8255452: Doing GC during JVMTI MethodExit event posting breaks return oop [v2]

2020-11-02 Thread Erik Österlund
> The imasm::remove_activation() call does not deal with safepoints very well. > However, when the MethodExit JVMTI event is being called, we call into the > runtime in the middle of remove_activation(). If the value being returned is > an object type, then the top-of-stack contains the oop.

Re: RFR: 8254723: add diagnostic command to write Linux perf map file [v5]

2020-11-02 Thread Yasumasa Suenaga
On Tue, 27 Oct 2020 04:21:33 GMT, Nick Gasson wrote: >> When using the Linux "perf" tool to do system profiling, symbol names of >> running Java methods cannot be decoded, resulting in unhelpful output >> such as: >> >> 10.52% [JIT] tid 236748 [.] 0x7f6fdb75d223 >> >> Perf can read a