Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v8]

2021-06-22 Thread Yi Yang
> After JDK-8265518(#3615), it's possible to replace all variants of checkIndex > by Objects.checkIndex/Objects.checkFromToIndex/Objects.checkFromIndexSize in > the whole JDK codebase. Yi Yang has updated the pull request incrementally with one additional commit since the last revision: test

Integrated: 8268368: Adopt cast notation for JavaThread conversions

2021-06-22 Thread Guoxiong Li
On Tue, 22 Jun 2021 01:11:30 GMT, Guoxiong Li wrote: > Hi all, > > Considering the consistency of `JavaThread` and other threads, such as > WorkerThread and CompilerThread, `JavaThread` could use a method named `cast` > to replace the method `Thread::as_Java_thread()`. It can reduce the Thread

Integrated: Merge jdk17

2021-06-22 Thread Jesper Wilhelmsson
On Wed, 23 Jun 2021 00:21:57 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 17 -> JDK 18 This pull request has now been integrated. Changeset: b6cfca8a Author:Jesper Wilhelmsson URL: https://git.openjdk.java.net/jdk/commit/b6cfca8a89810c7ed63ebc34ed9855b66ebcb5d9 Stats: 1931

Re: RFR: Merge jdk17 [v2]

2021-06-22 Thread Jesper Wilhelmsson
> Forwardport JDK 17 -> JDK 18 Jesper Wilhelmsson has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 59 commits: - Merge - 8268290: Improve LockFreeQueue<> utility Reviewed-by: iwalulya, tschatzl - 8264941: Remove CodeCache::ma

RFR: 8269188: [BACKOUT] Remove CodeCache::mark_for_evol_deoptimization() method

2021-06-22 Thread Coleen Phillimore
This reverts commit 33c23a1cf2aa81551eee4a2acf271edf573558aa. Building locally. See bug for details. - Commit messages: - Revert "8264941: Remove CodeCache::mark_for_evol_deoptimization() method" Changes: https://git.openjdk.java.net/jdk/pull/4563/files Webrev: https://webrevs.op

RFR: Merge jdk17

2021-06-22 Thread Jesper Wilhelmsson
Forwardport JDK 17 -> JDK 18 - Commit messages: - Merge - 8268404: [TESTBUG] tools/jpackage/windows/WinInstallerIconTest.java failed "AssertionError: Failed: Check icon" - 8267652: c2 loop unrolling by 8 results in reading memory past array - 8267399: C2: java/text/Normalizer/Con

Re: RFR: 8256306: ObjectMonitor::_contentions field should not be 'jint' [v2]

2021-06-22 Thread David Holmes
On Tue, 22 Jun 2021 21:07:04 GMT, Coleen Phillimore wrote: >> I changed the _contentions and _waiters fields from jint to int and ran >> tests tier1-3. Tested tier1 with linux, mac, windows platforms. Also >> changed the _previous_owner_tid to unintptr_t from jlong, since that's what >> the c

Re: RFR: 8256306: ObjectMonitor::_contentions field should not be 'jint' [v2]

2021-06-22 Thread Daniel D . Daugherty
On Tue, 22 Jun 2021 21:07:04 GMT, Coleen Phillimore wrote: >> I changed the _contentions and _waiters fields from jint to int and ran >> tests tier1-3. Tested tier1 with linux, mac, windows platforms. Also >> changed the _previous_owner_tid to unintptr_t from jlong, since that's what >> the c

RFR: 8260540: serviceability/jdwp/AllModulesCommandTest.java failed with "Debuggee error: 'ERROR: transport error 202: bind failed: Address already in use'"

2021-06-22 Thread Alex Menkov
Updated AllModulesCommandTest to use dynamic port launching debuggee. Parsing debuggee listening address functionality is required in several tests (and we have other tests which need to be fixed the same way), so moved the code to new class in jdk.test.lib - Commit messages: - JDK

Re: RFR: 8256306: ObjectMonitor::_contentions field should not be 'jint' [v2]

2021-06-22 Thread Coleen Phillimore
> I changed the _contentions and _waiters fields from jint to int and ran tests > tier1-3. Tested tier1 with linux, mac, windows platforms. Also changed the > _previous_owner_tid to unintptr_t from jlong, since that's what the cast did. Coleen Phillimore has updated the pull request incremental

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v7]

2021-06-22 Thread Paul Sandoz
On Tue, 22 Jun 2021 02:58:28 GMT, Yi Yang wrote: > I found that after solving the problem that Preconditions cannot be used > during the VM startup, a series of functions such as > String.checkIndex/checkOffset/.. can also be harmlessly replaced, but this > changeset is somewhat large and may

Re: RFR: 8264941: Remove CodeCache::mark_for_evol_deoptimization() method

2021-06-22 Thread Coleen Phillimore
On Wed, 16 Jun 2021 12:52:46 GMT, Coleen Phillimore wrote: > This change removes the mark_for_evol_deoptimization method and removes the > flag that all dependencies are recorded. Before the change to walk the > entire nmethod looking for "old" (redefined) methods with metadata_do(), we > use

Integrated: 8264941: Remove CodeCache::mark_for_evol_deoptimization() method

2021-06-22 Thread Coleen Phillimore
On Wed, 16 Jun 2021 12:52:46 GMT, Coleen Phillimore wrote: > This change removes the mark_for_evol_deoptimization method and removes the > flag that all dependencies are recorded. Before the change to walk the > entire nmethod looking for "old" (redefined) methods with metadata_do(), we > use

Re: RFR: 8256306: ObjectMonitor::_contentions field should not be 'jint'

2021-06-22 Thread Coleen Phillimore
On Tue, 22 Jun 2021 15:45:19 GMT, Daniel D. Daugherty wrote: >> I changed the _contentions and _waiters fields from jint to int and ran >> tests tier1-3. Tested tier1 with linux, mac, windows platforms. Also >> changed the _previous_owner_tid to unintptr_t from jlong, since that's what >> th

Re: RFR: 8256306: ObjectMonitor::_contentions field should not be 'jint'

2021-06-22 Thread Coleen Phillimore
On Tue, 22 Jun 2021 15:43:34 GMT, Daniel D. Daugherty wrote: >> src/hotspot/share/runtime/objectMonitor.cpp line 575: >> >>> 573: // Make a zero contentions field negative to force any contending >>> threads >>> 574: // to retry. This is the second part of the async deflation dance. >>

Re: RFR: 8256306: ObjectMonitor::_contentions field should not be 'jint'

2021-06-22 Thread Coleen Phillimore
On Mon, 21 Jun 2021 23:55:45 GMT, David Holmes wrote: >> I changed the _contentions and _waiters fields from jint to int and ran >> tests tier1-3. Tested tier1 with linux, mac, windows platforms. Also >> changed the _previous_owner_tid to unintptr_t from jlong, since that's what >> the cast d

Re: RFR: 8256306: ObjectMonitor::_contentions field should not be 'jint'

2021-06-22 Thread Daniel D . Daugherty
On Mon, 21 Jun 2021 23:56:36 GMT, David Holmes wrote: >> I changed the _contentions and _waiters fields from jint to int and ran >> tests tier1-3. Tested tier1 with linux, mac, windows platforms. Also >> changed the _previous_owner_tid to unintptr_t from jlong, since that's what >> the cast d

Re: RFR: 8256306: ObjectMonitor::_contentions field should not be 'jint'

2021-06-22 Thread Daniel D . Daugherty
On Tue, 11 May 2021 15:01:18 GMT, Coleen Phillimore wrote: > I changed the _contentions and _waiters fields from jint to int and ran tests > tier1-3. Tested tier1 with linux, mac, windows platforms. Also changed the > _previous_owner_tid to unintptr_t from jlong, since that's what the cast did

Re: RFR: 8256306: ObjectMonitor::_contentions field should not be 'jint'

2021-06-22 Thread Coleen Phillimore
On Tue, 22 Jun 2021 04:09:48 GMT, Thomas Stuefe wrote: >> I changed the _contentions and _waiters fields from jint to int and ran >> tests tier1-3. Tested tier1 with linux, mac, windows platforms. Also >> changed the _previous_owner_tid to unintptr_t from jlong, since that's what >> the cast

Re: RFR: 8268857: Merge VM_PrintJNI and VM_PrintThreads and remove the unused field 'is_deadlock' of DeadlockCycle [v7]

2021-06-22 Thread Daniel D . Daugherty
On Fri, 18 Jun 2021 06:51:53 GMT, Denghui Dong wrote: >> Hi, >> >> Could I have a review of this change that merges three vm >> operations(VM_PrintThreads, VM_PrintJNI, VM_FindDeadlocks) in thread_dump >> and signal_thread_entry. >> >> `jstack` is a very common command, even in the production

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions [v3]

2021-06-22 Thread Guoxiong Li
On Tue, 22 Jun 2021 12:56:27 GMT, David Holmes wrote: > I can sponsor, but as per hotspot integration guidelines we should wait at > least 24 hours to give people in different timezones a chance to comment. Got it. Thanks a lot! - PR: https://git.openjdk.java.net/jdk/pull/4546

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions [v3]

2021-06-22 Thread David Holmes
On Tue, 22 Jun 2021 10:53:06 GMT, Guoxiong Li wrote: >> Hi all, >> >> Considering the consistency of `JavaThread` and other threads, such as >> WorkerThread and CompilerThread, `JavaThread` could use a method named >> `cast` to replace the method `Thread::as_Java_thread()`. It can reduce the

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions

2021-06-22 Thread Guoxiong Li
On Tue, 22 Jun 2021 11:36:02 GMT, David Holmes wrote: > The error is in ZGC code and ZGC is not tested in tier-1 or pre-submit. Got it. Thanks. - PR: https://git.openjdk.java.net/jdk/pull/4546

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions [v3]

2021-06-22 Thread Guoxiong Li
On Tue, 22 Jun 2021 11:34:58 GMT, David Holmes wrote: >> Guoxiong Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove inline specifier > > Updates look fine. > > Thanks, > David @dholmes-ora @stefank Thanks for your reviews. Coul

Re: RFR: 8268857: Merge VM_PrintJNI and VM_PrintThreads and remove the unused field 'is_deadlock' of DeadlockCycle [v7]

2021-06-22 Thread Denghui Dong
On Fri, 18 Jun 2021 06:51:53 GMT, Denghui Dong wrote: >> Hi, >> >> Could I have a review of this change that merges three vm >> operations(VM_PrintThreads, VM_PrintJNI, VM_FindDeadlocks) in thread_dump >> and signal_thread_entry. >> >> `jstack` is a very common command, even in the production

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions [v3]

2021-06-22 Thread David Holmes
On Tue, 22 Jun 2021 10:53:06 GMT, Guoxiong Li wrote: >> Hi all, >> >> Considering the consistency of `JavaThread` and other threads, such as >> WorkerThread and CompilerThread, `JavaThread` could use a method named >> `cast` to replace the method `Thread::as_Java_thread()`. It can reduce the

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions [v2]

2021-06-22 Thread David Holmes
On 22/06/2021 5:24 pm, Guoxiong Li wrote: On Tue, 22 Jun 2021 01:59:17 GMT, David Holmes wrote: Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision: Fix incorrect use of the method cast Hi Guoxiong, Thanks for picking up this enhanc

Re: Integrated: 8268857: Merge VM_PrintJNI and VM_PrintThreads and remove the unused field 'is_deadlock' of DeadlockCycle

2021-06-22 Thread David Holmes
Hi, Please note that hotspot changes require two reviews before integrating (unless a trivial change). David On 22/06/2021 6:31 pm, Denghui Dong wrote: On Wed, 16 Jun 2021 03:33:14 GMT, Denghui Dong wrote: Hi, Could I have a review of this change that merges three vm operations(VM_Prin

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions [v2]

2021-06-22 Thread Guoxiong Li
On Tue, 22 Jun 2021 10:21:45 GMT, Stefan Karlsson wrote: >> Guoxiong Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix incorrect use of the method cast > > src/hotspot/share/runtime/thread.hpp line 1432: > >> 1430: assert(t->is

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions [v3]

2021-06-22 Thread Guoxiong Li
> Hi all, > > Considering the consistency of `JavaThread` and other threads, such as > WorkerThread and CompilerThread, `JavaThread` could use a method named `cast` > to replace the method `Thread::as_Java_thread()`. It can reduce the Thread's > knowledge about the subtypes. > > This patch rem

Re: RFR: 8236212: CompiledMethodLoad and CompiledMethodUnload events can be posted in START phase

2021-06-22 Thread Serguei Spitsyn
On Fri, 18 Jun 2021 22:57:41 GMT, Alex Menkov wrote: > Accordingly the spec CompiledMethodLoad/CompiledMethodUnload events may be > sent in the start and live phases. > VM implementation send them only in the live phase, but tests should expect > them in the start phase too Hi Alex, This looks

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions [v2]

2021-06-22 Thread Stefan Karlsson
On Tue, 22 Jun 2021 07:17:00 GMT, Guoxiong Li wrote: >> Hi all, >> >> Considering the consistency of `JavaThread` and other threads, such as >> WorkerThread and CompilerThread, `JavaThread` could use a method named >> `cast` to replace the method `Thread::as_Java_thread()`. It can reduce the

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions [v2]

2021-06-22 Thread Guoxiong Li
On Tue, 22 Jun 2021 07:21:29 GMT, Guoxiong Li wrote: > Maybe we can improve the tier1 or the Pre-submit tests in the future. I meant to improve the test coverage. - PR: https://git.openjdk.java.net/jdk/pull/4546

Re: RFR: 8268433: serviceability/dcmd/framework/VMVersionTest.java fails with Unable to send object throw not established PipeIO Listener Thread connection

2021-06-22 Thread Serguei Spitsyn
On Fri, 18 Jun 2021 20:20:53 GMT, Alex Menkov wrote: > Main logic of the tests is: > > TestProcessLauncher t = ...; > try { > t.launch(); > .. perform testing ... > } finally { >t.quit(); > } > > We have some problem with the tests, but the exception from > TestProcessLauncher.quit

Integrated: 8268857: Merge VM_PrintJNI and VM_PrintThreads and remove the unused field 'is_deadlock' of DeadlockCycle

2021-06-22 Thread Denghui Dong
On Wed, 16 Jun 2021 03:33:14 GMT, Denghui Dong wrote: > Hi, > > Could I have a review of this change that merges three vm > operations(VM_PrintThreads, VM_PrintJNI, VM_FindDeadlocks) in thread_dump and > signal_thread_entry. > > `jstack` is a very common command, even in the production enviro

Re: RFR: JDK-8268893: jcmd to trim the glibc heap [v2]

2021-06-22 Thread Volker Simonis
On Thu, 17 Jun 2021 08:53:55 GMT, Thomas Stuefe wrote: >> Proposal to add a Linux+glibc-only jcmd to manually induce malloc_trim(3) in >> the VM process. >> >> >> The glibc is somewhat notorious for retaining released C Heap memory: >> calling free(3) returns memory to the glibc, and most lib

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions [v2]

2021-06-22 Thread Guoxiong Li
On Tue, 22 Jun 2021 01:59:17 GMT, David Holmes wrote: >> Guoxiong Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix incorrect use of the method cast > > Hi Guoxiong, > > Thanks for picking up this enhancement request. > > I wasn't

Re: RFR: 8268368: Adopt cast notation for JavaThread conversions [v2]

2021-06-22 Thread Guoxiong Li
> Hi all, > > Considering the consistency of `JavaThread` and other threads, such as > WorkerThread and CompilerThread, `JavaThread` could use a method named `cast` > to replace the method `Thread::as_Java_thread()`. It can reduce the Thread's > knowledge about the subtypes. > > This patch rem