Skip to content

Commit 8436adc

Browse files
committed
Merge master jdk-17.0.5+3 into openj9-staging
Signed-off-by: J9 Build <[email protected]>
2 parents 5d7e51f + c9809bf commit 8436adc

File tree

10 files changed

+28
-182
lines changed

10 files changed

+28
-182
lines changed

make/autoconf/flags-cflags.m4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
470470
ALWAYS_DEFINES_JVM="-D_REENTRANT"
471471
ALWAYS_DEFINES_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
472472
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
473-
ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE \
473+
# Access APIs for Windows 8 and above
474+
# see https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
475+
ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 -D_CRT_SECURE_NO_DEPRECATE \
474476
-D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DIAL"
475-
ALWAYS_DEFINES_JVM="-DNOMINMAX -DWIN32_LEAN_AND_MEAN"
477+
ALWAYS_DEFINES_JVM="-DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602"
476478
fi
477479
478480
###############################################################################

src/java.base/windows/native/libjava/WinCAPISeedGenerator.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 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
@@ -23,11 +23,6 @@
2323
* questions.
2424
*/
2525

26-
/* Need to define this to get CAPI functions included */
27-
#ifndef _WIN32_WINNT
28-
#define _WIN32_WINNT 0x0400
29-
#endif
30-
3126
#include <windows.h>
3227
#include <wincrypt.h>
3328
#include <jni.h>

src/java.base/windows/native/libjava/WinNTFileSystem_md.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323
* questions.
2424
*/
2525

26-
/* Access APIs for WinXP and above */
27-
#ifndef _WIN32_WINNT
28-
#define _WIN32_WINNT 0x0501
29-
#endif
30-
3126
#include <assert.h>
3227
#include <stdio.h>
3328
#include <stdlib.h>

src/java.base/windows/native/libjava/java_props_md.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323
* questions.
2424
*/
2525

26-
/* Access APIs for Windows Vista and above */
27-
#ifndef _WIN32_WINNT
28-
#define _WIN32_WINNT 0x0601
29-
#endif
30-
3126
#include "jni.h"
3227
#include "jni_util.h"
3328

src/java.desktop/windows/native/libawt/windows/awt.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 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
@@ -26,10 +26,6 @@
2626
#ifndef _AWT_H_
2727
#define _AWT_H_
2828

29-
#ifndef _WIN32_WINNT
30-
#define _WIN32_WINNT 0x0600
31-
#endif
32-
3329
#ifndef _WIN32_IE
3430
#define _WIN32_IE 0x0600
3531
#endif

src/java.desktop/windows/native/libsplashscreen/splashscreen_sys.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 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
@@ -23,11 +23,6 @@
2323
* questions.
2424
*/
2525

26-
// copy from awt.h
27-
#ifndef _WIN32_WINNT
28-
#define _WIN32_WINNT 0x0600
29-
#endif
30-
3126
// copy from awt.h
3227
#ifndef _WIN32_IE
3328
#define _WIN32_IE 0x0600

src/jdk.management/unix/classes/com/sun/management/internal/OperatingSystemImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 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
@@ -93,7 +93,8 @@ public double getContainerCpuLoad() {
9393
int totalCPUs = getHostOnlineCpuCount0();
9494
int containerCPUs = getAvailableProcessors();
9595
// scale the total host load to the actual container cpus
96-
hostTicks = hostTicks * containerCPUs / totalCPUs;
96+
double scaleFactor = ((double) containerCPUs) / totalCPUs;
97+
hostTicks = (long) (hostTicks * scaleFactor);
9798
return getUsageDividesTotal(cpuUsageSupplier().getAsLong(), hostTicks);
9899
} else {
99100
// If CPU quotas and shares are not active then find the average load for

test/hotspot/jtreg/compiler/allocation/TestCCPAllocateArray.java

Lines changed: 0 additions & 53 deletions
This file was deleted.

test/hotspot/jtreg/compiler/allocation/TestFailedAllocationBadGraph.java

Lines changed: 0 additions & 80 deletions
This file was deleted.

test/hotspot/jtreg/compiler/allocation/TestAllocArrayAfterAllocNoUse.java renamed to test/hotspot/jtreg/compiler/loopopts/TestMissedOpaqueInPredicate.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,32 @@
2121
* questions.
2222
*/
2323

24-
/**
24+
/*
2525
* @test
26-
* @bug 8279125
27-
* @summary fatal error: no reachable node should have no use
28-
* @requires vm.flavor == "server"
29-
*
30-
* @run main/othervm -XX:-BackgroundCompilation -XX:-DoEscapeAnalysis TestAllocArrayAfterAllocNoUse
31-
*
26+
* @bug 8289127
27+
* @summary Apache Lucene triggers: DEBUG MESSAGE: duplicated predicate failed which is impossible
28+
* @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:-TieredCompilation TestMissedOpaqueInPredicate
3229
*/
3330

34-
public class TestAllocArrayAfterAllocNoUse {
35-
private static Object field;
36-
31+
public class TestMissedOpaqueInPredicate {
3732
public static void main(String[] args) {
33+
long[] tmp = new long[28];
34+
long[] longs = new long[32];
3835
for (int i = 0; i < 20_000; i++) {
39-
test();
36+
test(tmp, longs);
4037
}
4138
}
4239

43-
private static void test() {
44-
try {
45-
final TestAllocArrayAfterAllocNoUse o = new TestAllocArrayAfterAllocNoUse();
46-
} catch (Exception e) {
47-
final int[] array = new int[100];
48-
field = array;
40+
private static void test(long[] tmp, long[] longs) {
41+
for (int iter = 0, tmpIdx = 0, longsIdx = 28; iter < 4; ++iter, tmpIdx += 7, longsIdx += 1) {
42+
long l0 = tmp[tmpIdx + 0] << 12;
43+
l0 |= tmp[tmpIdx + 1] << 10;
44+
l0 |= tmp[tmpIdx + 2] << 8;
45+
l0 |= tmp[tmpIdx + 3] << 6;
46+
l0 |= tmp[tmpIdx + 4] << 4;
47+
l0 |= tmp[tmpIdx + 5] << 2;
48+
l0 |= tmp[tmpIdx + 6] << 0;
49+
longs[longsIdx + 0] = l0;
4950
}
50-
5151
}
5252
}

0 commit comments

Comments
 (0)