[jdk17u-dev] RFR: 8315097: Rename createJavaProcessBuilder

Goetz Lindenmaier goetz at openjdk.org
Mon Oct 14 13:08:35 UTC 2024


This backport is based on the 21 version.

A lot of files can be patched clean.
Others had to be resolved.
I split the change into four commits:
1. The hunks that applied clean.
2. The test files I resolved. Details below.
3. The parts of ProcessTools.java I had to resolve
4. The files I had to fix in addition so all calls to the old method are removed

*The tests resolved:*
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java
Resolved.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/codecache/CodeCacheFullCountTest.java
Resolve, but double check on 8279573: compiler/codecache/CodeCacheFullCountTest.java fails with "RuntimeException: the value of full_count is wrong."
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/jvmci/TestEnableJVMCIProduct.java
Resolved.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/TestHotSpotJVMCIRuntime.java
Omitted because 8306992: [JVMCI] mitigate more against JVMCI related OOME causing VM to exit is not in 17.

https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/arguments/TestVerifyBeforeAndAfterGCFlags.java
Resolved because 8270991: G1 Full GC always performs heap verification after JDK-8269295 is not in 17.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/g1/TestGCLogMessages.java
Resolved.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/g1/TestLargePageUseForAuxMemory.java
Resolved copyright only.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/g1/TestMixedGCLiveThreshold.java
Resolved copyright only.

https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/ClassFile/JsrRewriting.java
Resolved.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/ClassFile/OomWhileParsingRepeatedJsr.java
Resolved.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/ErrorHandling/SecondaryErrorTest.java
Resolved.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/LoadClass/TestResize.java
Resolved.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/LocalLong/LocalLongTest.java
Resolved.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/Monitor/SyncOnValueBasedClassTest.java
Omitted. Already backported.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/Thread/TooSmallStackSize.java
Resolved

https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/cds/MaxMetaspaceSize.java
Resolved
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/cds/appcds/CommandLineFlagCombo.java
Omitted. 8279009: CDS crashes when the source of an InstanceKlass is NULL not in 17.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java
Resolved copyright only
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/DynamicArchiveTestBase.java
Resolved copyright only
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestDynamicDump.java
Resolved copyright only
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/handshake/HandshakeTransitionTest.java
Resolved
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/logging/ClassInitializationTest.java
Resolved. Has one more test case I needed to resolve.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/logging/ClassLoadUnloadTest.java
Resolved. Later change was already backported.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/logging/LoaderConstraintsTest.java
Resolved copyright only.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/logging/ThreadLoggingTest.java
Resolved copyright only. (tiny enhancement missing)

https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineLeak.java
Resolved copyright only.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefinePreviousVersions.java
Resolved copyright only.
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/awt/color/ICC_ColorSpace/MTTransformReplacedProfile.java
Omitted. 8275344: -Xcheck:jni produces some warnings in the LCMS.c not in 17.
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/lang/System/MacEncoding/MacJNUEncoding.java
Resolved
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/lang/Thread/UncaughtExceptionsTest.java 
Resolved
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/nio/file/Path/MacPathTest.java
Resolved. One testcase not in 17, omitted.
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/jdk/jfr/jvm/TestDumpOnCrash.java 
Resolved
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/jdk/jfr/startupargs/TestStartDuration.java
Resolved
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/sun/security/ssl/SSLSessionImpl/ResumptionUpdateBoundValues.java
Resolved copyright only.


*The following test files are touched by this change but not in 17.*
I checked for all of them whether they
are introduced by a change useful to be backported to 17, too. For some I did a
backport previous to this change here.

These could be backported to 17, but for now I decided not to do so:
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/compilercontrol/TestConflictInlineCommands.java
8270459: Conflict inlining decisions by C1/C2 with the same CompileCommand - Maybe?
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/ErrorHandling/StackWalkNativeToJava.java
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/ErrorHandling/TestAbortVmOnException.java
8316309: AArch64: VMError::print_native_stack() crashes on Java native method frame - Maybe?
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/sun/net/spi/SystemProxyDriver.java
8305529: DefaultProxySelector.select(URI) in certain cases returns a List with null element - Maybe?

If you think we should have these in 17, I would do them before this change.

Here I think the change introducing the test can/should not be backported:

https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/arguments/TestCodeEntryAlignment.java
8281467: Allow larger OptoLoopAlignment and CodeEntryAlignment - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/arguments/TestOptoLoopAlignment.java
8281467: Allow larger OptoLoopAlignment and CodeEntryAlignment - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/c2/aarch64/TestTrampoline.java
8285487: AArch64: Do not generate unneeded trampolines for runtime calls - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/ciReplay/TestInvalidReplayFile.java
8292561: Make "ReplayCompiles" a diagnostic product switch - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/escapeAnalysis/TestIterativeEA.java
8276455: C2: iterative EA - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/intrinsics/chacha/TestChaCha20.java
8247645: ChaCha20 intrinsics - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/jvmci/TestUncaughtErrorInCompileMethod.java
8308151: [JVMCI] capture JVMCI exceptions in hs-err - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/onSpinWait/TestOnSpinWaitRISCV64.java
8299844: RISC-V: Implement _onSpinWait intrinsic - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java
8289996: Fix array range check hoisting for some scaled loop iv - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java
8280481: Duplicated stubs to interpreter for static calls - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/sharedstubs/SharedTrampolineTest.java
8280152: AArch64: Reuse runtime call trampolines - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/TestPLABAdaptToMinTLABSize.java
8289137: Automatically adapt Young/OldPLABSize and when setting only MinTLABSize - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/arguments/TestG1RemSetFlags.java
8017163: G1: Refactor remembered sets - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java
8280761: UseCompressedOops should be set after limit_heap_by_allocatable_memory - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/g1/TestEvacuationFailure.java
8269022: Put evacuation failure string directly into gc=info log message - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/g1/TestOneEdenRegionAfterGC.java
8297186: G1 triggers unnecessary full GCs when heap utilization is low - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/x/TestAllocateHeapAt.java
8307058: Implementation of Generational ZGC - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/x/TestPageCacheFlush.java
8307058: Implementation of Generational ZGC - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/x/TestSmallHeap.java
8307058: Implementation of Generational ZGC - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/z/TestZForceDiscontiguousHeapReservations.java
8310743: assert(reserved_rgn != nullptr) failed: Add committed region, No reserved region found - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/gc/z/TestZNMT.java
8310743: assert(reserved_rgn != nullptr) failed: Add committed region, No reserved region found - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/ErrorHandling/ReattemptErrorTest.java
8296469: Instrument VMError::report with reentrant iteration step for register and stack printing - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/ErrorHandling/ResourceMarkTest.java
8284274: Error reporting crashes because missing ResourceMarks - No. Marked as bug, but rather an imrovement.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/ErrorHandling/TestDwarf.java
8242181: [Linux] Show source information when printing native stack traces in hs_err files - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/ErrorHandling/TestSigInfoInHsErrFile.java
8296906: VMError::controlled_crash crashes with wrong code and address - Possible, but 4 follow-ups, so skip.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/ErrorHandling/TestSymbolsInHsErrFile.java
8317510: Change Windows debug symbol files naming to avoid losing info when an executable and a library share the same name - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/NMT/MallocLimitTest.java
8291878: NMT: Malloc limits - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/NMT/NMTJavaHeapTest.java
8306841: Generational ZGC: NMT reports Java heap size larger than max heap size - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/Thread/TestAlwaysPreTouchStacks.java
8294266: Add a way to pre-touch java thread stacks - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/cds/appcds/FillerObjectLoadTest.java
8286066: assert(k != __null) failed: klass not loaded caused by FillerObject_klass - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/cds/appcds/TestDumpClassListSource.java
8286066: assert(k != __null) failed: klass not loaded caused by FillerObject_klass - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/handshake/SystemMembarHandshakeTransitionTest.java
8292591: Experimentally add back barrier-less Java thread transitions - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/jni/checked/TestPrimitiveArrayCriticalWithBadParam.java
8269697: JNI_GetPrimitiveArrayCritical() should not accept object array - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/logging/FoldMultilinesTest.java
8271186: Add UL option to replace newline char - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/logging/MutexRankTest.java
8294759: Print actual lock/monitor ranking - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/posixSig/TestPosixSig.java
8285792: Posix signal handler modification checking issues. -- would make sense in 17, but quite big - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/serviceability/jvmti/vthread/premain/AgentWithVThreadTest.java
8284161: Implementation of Virtual Threads (Preview)  - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java
8303489: Add a test to verify classes in vmStruct have unique vtables - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/awt/font/JNICheck/FreeTypeScalerJNICheck.java
8269223: -Xcheck:jni WARNINGs working with fonts on Linux - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/foreign/UpcallTestHelper.java
8295044: Implementation of Foreign Function and Memory API (Second Preview) - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/io/Console/RedirectTest.java
8295803: Console should be usable in jshell and other environments - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/lang/Object/InvalidFinalizationOption.java
8276422: Add command-line option to disable finalization - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/lang/System/FileEncodingTest.java
8260265: UTF-8 by Default - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/lang/System/i18nEnvArg.java
8260265: UTF-8 by Default - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/lang/Thread/virtual/ShutdownHook.java
8284161: Implementation of Virtual Threads (Preview) - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/java/util/Properties/StoreReproducibilityTest.java
8231640: (prop) Canonical property storage - No
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/jdk/jfr/startupargs/TestPreserveRepository.java
8303229: JFR: Preserve disk repository after exit - No

*These files had to be edited additionally.*

https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/compiler/eliminateAutobox/TestEliminateBoxInDebugInfo.java
Was removed by 8284198: Undo JDK-8261137: Optimization of Box nodes in uncommon_trap in 19. Adapted.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/CommandLine/PrintTouchedMethods.java
Was removed by 8292890: Remove PrintTouchedMethodsAtExit and LogTouchedMethods in 20. Adapted.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/Monitor/MonitorUnlinkBatchTest.java
Was adapted in backport to status of ProcessTools at that time.  8319048: Monitor deflation unlink phase prolongs time to safepoint. Adapted again.
https://github.com/openjdk/jdk21u-dev/commits/master/test/hotspot/jtreg/runtime/logging/BiasedLockingTest.java
Was removed by 8256425: Obsolete Biased Locking in JDK 18. Adapted.
https://github.com/openjdk/jdk21u-dev/commits/master/test/jdk/jdk/jfr/jvm/TestJfrJavaBase.java
8280131: jcmd reports "Module jdk.jfr not found." when "jdk.management.jfr" is missing                   Candidate for backport?
https://github.com/openjdk/jdk21u-dev/commits/master/test/lib-test/jdk/test/whitebox/vm_flags/BooleanTest.java
Call was removed from the test by 8255746: Make PrintCompilation available on a per method level. Adapted.

-------------

Commit messages:
 - Fix files that call createJavaProcessBuilder but are not in 21.
 - Resolved ProcessTools.java
 - Resolved test files
 - Changes that applied clean

Changes: https://git.openjdk.org/jdk17u-dev/pull/2960/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=2960&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8315097
  Stats: 1496 lines in 518 files changed: 44 ins; 10 del; 1442 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/2960.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/2960/head:pull/2960

PR: https://git.openjdk.org/jdk17u-dev/pull/2960


More information about the jdk-updates-dev mailing list