Skip to content

Commit cc510d9

Browse files
author
Sergey Nazarkin
committedFeb 8, 2023
Merge
2 parents 7490167 + 784f71f commit cc510d9

File tree

24 files changed

+366
-245
lines changed

24 files changed

+366
-245
lines changed
 

‎.github/workflows/submit.yml

+37-40
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
platforms:
1111
description: "Platform(s) to execute on"
1212
required: true
13-
default: "Linux x64, Linux x86, Windows x64, Windows x86, macOS x64"
13+
default: "Linux additional (hotspot only), Linux x64, Linux x86, Windows x64, Windows x86, macOS x64"
1414

1515
concurrency:
1616
group: ${{ github.workflow }}-${{ github.ref }}
@@ -23,7 +23,7 @@ jobs:
2323
outputs:
2424
should_run: ${{ steps.check_submit.outputs.should_run }}
2525
bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }}
26-
platform_linux_additional: false
26+
platform_linux_additional: ${{ steps.check_platforms.outputs.platform_linux_additional }}
2727
platform_linux_x64: ${{ steps.check_platforms.outputs.platform_linux_x64 }}
2828
platform_linux_x86: ${{ steps.check_platforms.outputs.platform_linux_x86 }}
2929
platform_windows_x64: ${{ steps.check_platforms.outputs.platform_windows_x64 }}
@@ -117,7 +117,7 @@ jobs:
117117
name: Linux x64
118118
runs-on: "ubuntu-20.04"
119119
needs: prerequisites
120-
if: needs.prerequisites.outputs.should_run != 'false' && (needs.prerequisites.outputs.platform_linux_x64 != 'false' || needs.prerequisites.outputs.platform_linux_additional == 'true')
120+
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x64 != 'false'
121121

122122
strategy:
123123
fail-fast: false
@@ -307,7 +307,6 @@ jobs:
307307
runs-on: "ubuntu-20.04"
308308
needs:
309309
- prerequisites
310-
- linux_x64_build
311310
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_additional != 'false'
312311

313312
strategy:
@@ -316,8 +315,8 @@ jobs:
316315
flavor:
317316
- hs x64 build only
318317
- hs x64 zero build only
319-
- hs x64 minimal build only
320-
- hs x64 optimized build only
318+
- hs x86 minimal build only
319+
- hs x86 client build only
321320
- hs aarch64 build only
322321
- hs arm build only
323322
- hs s390x build only
@@ -327,21 +326,23 @@ jobs:
327326
flags: --enable-debug --disable-precompiled-headers
328327
- flavor: hs x64 zero build only
329328
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=zero
330-
- flavor: hs x64 minimal build only
331-
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=minimal
332-
- flavor: hs x64 optimized build only
333-
flags: --with-debug-level=optimized --disable-precompiled-headers
329+
- flavor: hs x86 minimal build only
330+
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=minimal1 --with-target-bits=32
331+
multilib: true
332+
- flavor: hs x86 client build only
333+
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=client --with-target-bits=32
334+
multilib: true
334335
- flavor: hs aarch64 build only
335336
flags: --enable-debug --disable-precompiled-headers
336337
debian-arch: arm64
337338
gnu-arch: aarch64
338339
- flavor: hs arm build only
339-
flags: --enable-debug --disable-precompiled-headers
340+
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=zero
340341
debian-arch: armhf
341342
gnu-arch: arm
342343
gnu-flavor: eabihf
343344
- flavor: hs s390x build only
344-
flags: --enable-debug --disable-precompiled-headers
345+
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=zero
345346
debian-arch: s390x
346347
gnu-arch: s390x
347348
- flavor: hs ppc64le build only
@@ -359,31 +360,6 @@ jobs:
359360
with:
360361
path: jdk
361362

362-
- name: Restore build JDK
363-
id: build_restore
364-
uses: actions/download-artifact@v3
365-
with:
366-
name: transient_jdk-linux-x64_${{ needs.prerequisites.outputs.bundle_id }}
367-
path: ~/jdk-linux-x64
368-
continue-on-error: true
369-
370-
- name: Restore build JDK (retry)
371-
uses: actions/download-artifact@v3
372-
with:
373-
name: transient_jdk-linux-x64_${{ needs.prerequisites.outputs.bundle_id }}
374-
path: ~/jdk-linux-x64
375-
if: steps.build_restore.outcome == 'failure'
376-
377-
- name: Unpack build JDK
378-
run: |
379-
mkdir -p "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin"
380-
tar -xf "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin.tar.gz" -C "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin"
381-
382-
- name: Find root of build JDK image dir
383-
run: |
384-
build_jdk_root=`find ${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin -name release -type f`
385-
echo "build_jdk_root=`dirname ${build_jdk_root}`" >> $GITHUB_ENV
386-
387363
- name: Update apt
388364
run: sudo apt-get update
389365

@@ -393,8 +369,17 @@ jobs:
393369
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9
394370
if: matrix.debian-arch == ''
395371

372+
- name: Install multilib dependencies
373+
run: |
374+
sudo dpkg --add-architecture i386
375+
sudo apt-get update
376+
sudo apt-get install --only-upgrade apt
377+
sudo apt-get install openjdk-8-jdk gcc-9-multilib g++-9-multilib libfreetype6-dev:i386 libxrandr-dev:i386 libxtst-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libcups2-dev:i386 libasound2-dev:i386
378+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9
379+
if: matrix.multilib != ''
380+
396381
- name: Install cross-compilation host dependencies
397-
run: sudo apt-get install gcc-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}} g++-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}
382+
run: sudo apt-get install openjdk-8-jdk gcc-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}} g++-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}
398383
if: matrix.debian-arch != ''
399384

400385
- name: Cache sysroot
@@ -414,7 +399,7 @@ jobs:
414399
sudo qemu-debootstrap
415400
--arch=${{ matrix.debian-arch }}
416401
--verbose
417-
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev
402+
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev,libffi-dev
418403
--resolve-deps
419404
buster
420405
~/sysroot-${{ matrix.debian-arch }}
@@ -439,19 +424,30 @@ jobs:
439424
echo "cross_flags=
440425
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}
441426
--with-sysroot=${HOME}/sysroot-${{ matrix.debian-arch }}/
427+
--with-cups=${HOME}/sysroot-${{ matrix.debian-arch }}/usr
428+
--with-freetype-lib=${HOME}/sysroot-${{ matrix.debian-arch }}/usr/lib/${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}
429+
--with-freetype-include=${HOME}/sysroot-${{ matrix.debian-arch }}/usr/include/freetype2
430+
--with-alsa=${HOME}/sysroot-${{ matrix.debian-arch }}/usr
431+
--with-fontconfig=${HOME}/sysroot-${{ matrix.debian-arch }}/usr
432+
" >> $GITHUB_ENV
433+
&& echo "cross_conf_env=
434+
CFLAGS=--sysroot=${HOME}/sysroot-${{ matrix.debian-arch }}
435+
CXXFLAGS=--sysroot=${HOME}/sysroot-${{ matrix.debian-arch }}
436+
LDFLAGS=--sysroot=${HOME}/sysroot-${{ matrix.debian-arch }}
442437
" >> $GITHUB_ENV
443438
if: matrix.debian-arch != ''
444439

445440
- name: Configure
446441
run: >
442+
${{ env.cross_conf_env }}
447443
bash configure
448444
--with-conf-name=linux-${{ matrix.gnu-arch }}-hotspot
449445
${{ matrix.flags }}
450446
${{ env.cross_flags }}
451447
--with-user-release-suffix=${GITHUB_ACTOR}-${GITHUB_SHA}
452448
--with-build-number=b00
453449
--with-boot-jdk=${BOOT_JDK}
454-
--with-build-jdk=${{ env.build_jdk_root }}
450+
--disable-headful
455451
--with-zlib=bundled
456452
working-directory: jdk
457453

@@ -1565,6 +1561,7 @@ jobs:
15651561
continue-on-error: true
15661562
needs:
15671563
- prerequisites
1564+
- linux_additional_build
15681565
- linux_x64_test
15691566
- linux_x86_test
15701567
- windows_x64_test

‎hotspot/src/os/linux/vm/cgroupSubsystem_linux.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,13 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,
270270
}
271271
}
272272
if (is_cgroupsV2) {
273+
// On some systems we have mixed cgroups v1 and cgroups v2 controllers (e.g. freezer on cg1 and
274+
// all relevant controllers on cg2). Only set the cgroup path when we see a hierarchy id of 0.
275+
if (hierarchy_id != 0) {
276+
continue;
277+
}
273278
for (int i = 0; i < CG_INFO_LENGTH; i++) {
279+
assert(cg_infos[i]._cgroup_path == NULL, "cgroup path must only be set once");
274280
cg_infos[i]._cgroup_path = os::strdup(cgroup_path);
275281
}
276282
}

‎hotspot/test/runtime/classFileParserBug/TestEmptyBootstrapMethodsAttr.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,8 @@ public static void main(String args[]) throws Throwable {
5252
// ======= execute test case #1
5353
// Expect a lack of main method, this implies that the class loaded correctly
5454
// with an empty bootstrap_methods and did not generate a ClassFormatError.
55-
pb = ProcessTools.createJavaProcessBuilder("-cp", ".", className);
55+
pb = ProcessTools.createJavaProcessBuilder("-cp", ".",
56+
"-Duser.language=en", "-Duser.country=US", className);
5657
output = new OutputAnalyzer(pb.start());
5758
output.shouldNotContain("java.lang.ClassFormatError");
5859
output.shouldContain("Main method not found in class " + className);
@@ -66,7 +67,8 @@ public static void main(String args[]) throws Throwable {
6667
// ======= execute test case #2
6768
// Expect a lack of main method, this implies that the class loaded correctly
6869
// with an empty bootstrap_methods and did not generate ClassFormatError.
69-
pb = ProcessTools.createJavaProcessBuilder("-cp", ".", className);
70+
pb = ProcessTools.createJavaProcessBuilder("-cp", ".",
71+
"-Duser.language=en", "-Duser.country=US", className);
7072
output = new OutputAnalyzer(pb.start());
7173
output.shouldNotContain("java.lang.ClassFormatError");
7274
output.shouldContain("Main method not found in class " + className);

0 commit comments

Comments
 (0)