RFR: JDK-8245446: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDesc…

2020-12-08 Thread Serguei Spitsyn
The StressRedefine.java (base for redefine stress tests) defines 3 important constants: private static int staticMethodCallersNumber = 10; private static int nonstaticMethodCallersNumber = 10; private static int redefiningThreadsNumber = 40; The 1st is number of threads to call a stat

RFR: 8165276: Spec states that invoke the premain method in an agent cl…

2020-12-08 Thread Serguei Spitsyn
This change have been already reviewed by Mandy, Alan and David. Now, the PR approval is needed. The push was postponed because the CSR was not approved at that time (it is now): https://bugs.openjdk.java.net/browse/JDK-8248189 Investigation of existing popular java agents was requested by Joe.

Re: RFR: 8256424: Move ciSymbol::symbol_name() to ciSymbols::symbol_name() [v2]

2020-12-08 Thread Claes Redestad
> This moves the mirroring of vmSymbols in ciSymbols to a separate file, > ciSymbols.hpp, to reduce includes throughout hotspot (and clean up the > ciSymbol namespace). In a few places code is moved from .hpp to .cpp to > facilitate this. > > With PCH disabled, this reduces total includes from

Re: RFR: 8255381: com/sun/jdi/EATests.java should not suspend graal threads [v2]

2020-12-08 Thread Richard Reingruber
On Mon, 7 Dec 2020 20:48:16 GMT, Chris Plummer wrote: >> Richard Reingruber has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Changes based on Chris Plummer's feedback. > > test/jdk/com/sun/jdi/EATests.java line 1274: > >> 1272:

Re: RFR: 8255381: com/sun/jdi/EATests.java should not suspend graal threads [v2]

2020-12-08 Thread Richard Reingruber
> This fixes a bug in the test test/jdk/com/sun/jdi/EATests.java that caused > timeout failures when graal is enabled. > > The fix is to avoid suspending all threads when a breakpoint is reached and > then resume > just the main thread again. This pattern was used in the test case > EAMaterialize

Re: RFR: 8255381: com/sun/jdi/EATests.java should not suspend graal threads [v3]

2020-12-08 Thread Richard Reingruber
> This fixes a bug in the test test/jdk/com/sun/jdi/EATests.java that caused > timeout failures when graal is enabled. > > The fix is to avoid suspending all threads when a breakpoint is reached and > then resume > just the main thread again. This pattern was used in the test case > EAMaterialize

Re: RFR: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException [v2]

2020-12-08 Thread Per Liden
On Mon, 7 Dec 2020 23:34:00 GMT, Chris Plummer wrote: >> I don't follow your reasoning here Chris. All ObjectReferences can be GC'd >> at any time unless GC has been disallowed. So a reference create via >> newInstance is no different to any other reference. If it is currently >> reachable the

Re: RFR: 8256424: Move ciSymbol::symbol_name() to ciSymbols::symbol_name() [v3]

2020-12-08 Thread Claes Redestad
> This moves the mirroring of vmSymbols in ciSymbols to a separate file, > ciSymbols.hpp, to reduce includes throughout hotspot (and clean up the > ciSymbol namespace). In a few places code is moved from .hpp to .cpp to > facilitate this. > > With PCH disabled, this reduces total includes from

Re: RFR: 8256424: Move ciSymbol::symbol_name() to ciSymbols::symbol_name() [v3]

2020-12-08 Thread Ioi Lam
On Tue, 8 Dec 2020 16:22:44 GMT, Claes Redestad wrote: >> This moves the mirroring of vmSymbols in ciSymbols to a separate file, >> ciSymbols.hpp, to reduce includes throughout hotspot (and clean up the >> ciSymbol namespace). In a few places code is moved from .hpp to .cpp to >> facilitate th

Re: RFR: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException [v2]

2020-12-08 Thread Chris Plummer
On Tue, 8 Dec 2020 14:04:33 GMT, Per Liden wrote: >> I read "reachable for the purposes of garbage collection" as not including >> objects reachable only via weak reference. So if the only reference to an >> object is a weak reference, which is normally what you have after calling >> `ClassTyp

Re: RFR: 8255381: com/sun/jdi/EATests.java should not suspend graal threads [v3]

2020-12-08 Thread Chris Plummer
On Tue, 8 Dec 2020 14:00:25 GMT, Richard Reingruber wrote: >> This fixes a bug in the test test/jdk/com/sun/jdi/EATests.java that caused >> timeout failures when graal is enabled. >> >> The fix is to avoid suspending all threads when a breakpoint is reached and >> then resume >> just the main t

Re: RFR: 8165276: Spec states to invoke the premain method in an agent class if it's public but implementation differs

2020-12-08 Thread Alan Bateman
On Tue, 8 Dec 2020 11:41:33 GMT, Serguei Spitsyn wrote: > This change have been already reviewed by Mandy, Alan and David. > Now, the PR approval is needed. > The push was postponed because the CSR was not approved at that time (it is > now): >https://bugs.openjdk.java.net/browse/JDK-8248189

Re: RFR: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException [v2]

2020-12-08 Thread Chris Plummer
On Mon, 7 Dec 2020 22:05:04 GMT, David Holmes wrote: >> Per Liden has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add comment > > I still have some reservations about the logic in some of the tests now (ie > using disableCollection whil

Re: RFR: 8165276: Spec states to invoke the premain method in an agent class if it's public but implementation differs

2020-12-08 Thread Chris Plummer
On Tue, 8 Dec 2020 11:41:33 GMT, Serguei Spitsyn wrote: > This change have been already reviewed by Mandy, Sundar, Alan and David. > Now, the PR approval is needed. Can you provide a link to the discussion? I'm mostly curious if there was some discussion as to why Instrument purposefully allowe

Re: RFR: 8165276: Spec states to invoke the premain method in an agent class if it's public but implementation differs

2020-12-08 Thread Alan Bateman
On Tue, 8 Dec 2020 19:40:32 GMT, Chris Plummer wrote: >> This change have been already reviewed by Mandy, Sundar, Alan and David. >> Now, the PR approval is needed. >> The push was postponed because the CSR was not approved at that time (it is >> now): >>https://bugs.openjdk.java.net/browse/

Re: RFR: 8255381: com/sun/jdi/EATests.java should not suspend graal threads [v3]

2020-12-08 Thread Richard Reingruber
On Tue, 8 Dec 2020 19:25:30 GMT, Chris Plummer wrote: >> Richard Reingruber has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Only main thread needs to be resumed in >> EARelockingObjectCurrentlyWaitingOn. > > Marked as reviewed by cjplum

Re: RFR: 8165276: Spec states to invoke the premain method in an agent class if it's public but implementation differs

2020-12-08 Thread Serguei Spitsyn
On Tue, 8 Dec 2020 19:51:48 GMT, Alan Bateman wrote: >>> This change have been already reviewed by Mandy, Sundar, Alan and David. >>> Now, the PR approval is needed. >> >> Can you provide a link to the discussion? I'm mostly curious if there was >> some discussion as to why Instrument purposefu

Re: RFR: 8245446: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDescription.java crash intermittently

2020-12-08 Thread Chris Plummer
On Tue, 8 Dec 2020 09:53:36 GMT, Serguei Spitsyn wrote: > The StressRedefine.java (base for redefine stress tests) defines 3 important > constants: > private static int staticMethodCallersNumber = 10; > private static int nonstaticMethodCallersNumber = 10; > private static int redefi

Re: RFR: 8245446: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDescription.java crash intermittently

2020-12-08 Thread Leonid Mesnik
On Tue, 8 Dec 2020 09:53:36 GMT, Serguei Spitsyn wrote: > The StressRedefine.java (base for redefine stress tests) defines 3 important > constants: > private static int staticMethodCallersNumber = 10; > private static int nonstaticMethodCallersNumber = 10; > private static int redefi

Re: RFR: 8245446: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDescription.java crash intermittently

2020-12-08 Thread Serguei Spitsyn
On Tue, 8 Dec 2020 21:01:07 GMT, Chris Plummer wrote: >> The StressRedefine.java (base for redefine stress tests) defines 3 important >> constants: >> private static int staticMethodCallersNumber = 10; >> private static int nonstaticMethodCallersNumber = 10; >> private static int red

Re: RFR: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException [v3]

2020-12-08 Thread Per Liden
> This PR replaces the withdrawn PR #1348. This PR tries to fix the underlying > problem, rather than fix the tests. > > The problem is that a number of JDI tests create objects on the debugger side > with calls to `newInstance()`. However, on the debugee side, these new > instances will only b

Re: RFR: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException [v2]

2020-12-08 Thread Per Liden
On Tue, 8 Dec 2020 19:30:44 GMT, Chris Plummer wrote: >> I still have some reservations about the logic in some of the tests now (ie >> using disableCollection whilst the VM is suspended and reenabling also >> whilst suspended) but the logic was unclear in the first place. If necessary >> foll

Re: RFR: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException [v3]

2020-12-08 Thread Per Liden
On Tue, 8 Dec 2020 19:22:41 GMT, Chris Plummer wrote: >> I think we're still within what the spec says, given that the wording is so >> loose. But it's hard to tell if this change will be problematic for some use >> case. > > I'm ok with making the change and then seeing if there is any fallout

Re: RFR: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException [v3]

2020-12-08 Thread David Holmes
On Tue, 8 Dec 2020 21:29:51 GMT, Per Liden wrote: >> This PR replaces the withdrawn PR #1348. This PR tries to fix the underlying >> problem, rather than fix the tests. >> >> The problem is that a number of JDI tests create objects on the debugger >> side with calls to `newInstance()`. However

Re: RFR: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException [v3]

2020-12-08 Thread Chris Plummer
On Tue, 8 Dec 2020 21:29:51 GMT, Per Liden wrote: >> This PR replaces the withdrawn PR #1348. This PR tries to fix the underlying >> problem, rather than fix the tests. >> >> The problem is that a number of JDI tests create objects on the debugger >> side with calls to `newInstance()`. However

Re: RFR: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException [v3]

2020-12-08 Thread Chris Plummer
On Tue, 8 Dec 2020 21:42:11 GMT, Per Liden wrote: >> I'm ok with making the change and then seeing if there is any fallout from >> it. My guess is there won't be. I do think there is a need to cleanup the >> JDI and JDWP specs in a few areas w.r.t. object liveness. Another CR can be >> filed f

Re: RFR: 8245446: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDescription.java crash intermittently

2020-12-08 Thread Coleen Phillimore
On Tue, 8 Dec 2020 21:17:16 GMT, Leonid Mesnik wrote: >> The StressRedefine.java (base for redefine stress tests) defines 3 important >> constants: >> private static int staticMethodCallersNumber = 10; >> private static int nonstaticMethodCallersNumber = 10; >> private static int red

Re: RFR: 8245446: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDescription.java crash intermittently

2020-12-08 Thread Serguei Spitsyn
On Wed, 9 Dec 2020 00:26:38 GMT, Coleen Phillimore wrote: >> looks good. > > I don't get serviceability-dev mail anymore because it was being duplicated > with hotspot-runtime-dev most of the time. I don't think this fixes the > problem, it only makes the test less stressful. Both of these te

Re: RFR: 8165276: Spec states to invoke the premain method in an agent class if it's public but implementation differs

2020-12-08 Thread Serguei Spitsyn
On Tue, 8 Dec 2020 19:28:29 GMT, Alan Bateman wrote: >> This change have been already reviewed by Mandy, Sundar, Alan and David. >> Please, see the jdk 15 review thread: >> >> http://mail.openjdk.java.net/pipermail/serviceability-dev/2020-June/031998.html >> >> Now, the PR approval is needed.

RFR: 8257928: Test image build failure with clang-10 due to -Wmisleading-indentation

2020-12-08 Thread Hao Sun
Flag '-Wmisleading-indentation' was introduced since clang-10 [1] and gcc-6 [2]. Putting the code with proper indentations would suppress this warning. The main reason why test image build with gcc succeeds is that, clang and gcc might behave differently for some corner cases under '-Wmisleading-i

Integrated: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException

2020-12-08 Thread Per Liden
On Thu, 3 Dec 2020 12:55:04 GMT, Per Liden wrote: > This PR replaces the withdrawn PR #1348. This PR tries to fix the underlying > problem, rather than fix the tests. > > The problem is that a number of JDI tests create objects on the debugger side > with calls to `newInstance()`. However, on

Re: RFR: 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException [v3]

2020-12-08 Thread Per Liden
On Tue, 8 Dec 2020 22:37:13 GMT, Chris Plummer wrote: >> Per Liden has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix copyright > > Marked as reviewed by cjplummer (Reviewer). Thanks for reviewing, @plummercj and @dholmes-ora! ---