Skip to content

Commit

Permalink
Merge 'jdk8u/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
benty-amzn committed Feb 15, 2024
2 parents 7c3d294 + cfed45d commit aeb970a
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 169 deletions.
18 changes: 18 additions & 0 deletions hotspot/make/windows/makefiles/compile.make
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ COMPILER_NAME=VS2017
!if "$(MSC_VER)" >= "1920" && "$(MSC_VER)" <= "1929"
COMPILER_NAME=VS2019
!endif
!if "$(MSC_VER)" >= "1930" && "$(MSC_VER)" <= "1938"
COMPILER_NAME=VS2022
!endif
!endif

# By default, we do not want to use the debug version of the msvcrt.dll file
Expand Down Expand Up @@ -336,6 +339,21 @@ MT=mt.exe
SAFESEH_FLAG = /SAFESEH
!endif

!if "$(COMPILER_NAME)" == "VS2022"
PRODUCT_OPT_OPTION = /O2 /Oy-
FASTDEBUG_OPT_OPTION = /O2 /Oy-
DEBUG_OPT_OPTION = /Od
GX_OPTION = /EHsc
LD_FLAGS = /manifest $(LD_FLAGS)
MP_FLAG = /MP
# Manifest Tool - used in VS2005 and later to adjust manifests stored
# as resources inside build artifacts.
!if "x$(MT)" == "x"
MT=mt.exe
!endif
SAFESEH_FLAG = /SAFESEH
!endif

!if "$(BUILDARCH)" == "i486"
LD_FLAGS = $(SAFESEH_FLAG) $(LD_FLAGS)
!endif
Expand Down
4 changes: 4 additions & 0 deletions hotspot/make/windows/makefiles/sanity.make
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ checkCL:
if "$(MSC_VER)" NEQ "1912" \
if "$(MSC_VER)" NEQ "1920" if "$(MSC_VER)" NEQ "1921" if "$(MSC_VER)" NEQ "1922" if "$(MSC_VER)" NEQ "1923" if "$(MSC_VER)" NEQ "1924" \
if "$(MSC_VER)" NEQ "1925" if "$(MSC_VER)" NEQ "1926" if "$(MSC_VER)" NEQ "1927" if "$(MSC_VER)" NEQ "1928" if "$(MSC_VER)" NEQ "1929" \
if "$(MSC_VER)" NEQ "1930" if "$(MSC_VER)" NEQ "1931" if "$(MSC_VER)" NEQ "1932" if "$(MSC_VER)" NEQ "1933" if "$(MSC_VER)" NEQ "1934" \
if "$(MSC_VER)" NEQ "1935" if "$(MSC_VER)" NEQ "1936" if "$(MSC_VER)" NEQ "1937" if "$(MSC_VER)" NEQ "1938" \
echo *** WARNING *** unrecognized cl.exe version $(MSC_VER) ($(RAW_MSC_VER)). Use FORCE_MSC_VER to override automatic detection.

checkLink:
Expand All @@ -43,4 +45,6 @@ checkLink:
if "$(LD_VER)" NEQ "1412" \
if "$(LD_VER)" NEQ "1420" if "$(LD_VER)" NEQ "1421" if "$(LD_VER)" NEQ "1422" if "$(LD_VER)" NEQ "1423" if "$(LD_VER)" NEQ "1424" \
if "$(LD_VER)" NEQ "1425" if "$(LD_VER)" NEQ "1426" if "$(LD_VER)" NEQ "1427" if "$(LD_VER)" NEQ "1428" if "$(LD_VER)" NEQ "1429" \
if "$(LD_VER)" NEQ "1430" if "$(LD_VER)" NEQ "1431" if "$(LD_VER)" NEQ "1432" if "$(LD_VER)" NEQ "1433" if "$(LD_VER)" NEQ "1434" \
if "$(LD_VER)" NEQ "1435" if "$(LD_VER)" NEQ "1436" if "$(LD_VER)" NEQ "1437" if "$(LD_VER)" NEQ "1438" \
echo *** WARNING *** unrecognized link.exe version $(LD_VER) ($(RAW_LD_VER)). Use FORCE_LD_VER to override automatic detection.
2 changes: 1 addition & 1 deletion hotspot/make/windows/makefiles/vm.make
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ CXX_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER

!if "$(USE_PRECOMPILED_HEADER)" != "0"
CXX_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
!if "$(COMPILER_NAME)" == "VS2012" || "$(COMPILER_NAME)" == "VS2013" || "$(COMPILER_NAME)" == "VS2015" || "$(COMPILER_NAME)" == "VS2017" || "$(COMPILER_NAME)" == "VS2019"
!if "$(COMPILER_NAME)" == "VS2012" || "$(COMPILER_NAME)" == "VS2013" || "$(COMPILER_NAME)" == "VS2015" || "$(COMPILER_NAME)" == "VS2017" || "$(COMPILER_NAME)" == "VS2019" || "$(COMPILER_NAME)" == "VS2022"
# VS2012 and later require this object file to be listed:
LD_FLAGS=$(LD_FLAGS) _build_pch_file.obj
!endif
Expand Down
2 changes: 1 addition & 1 deletion jdk/make/data/tzdata/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2024a
tzdata2023d
4 changes: 2 additions & 2 deletions jdk/make/data/tzdata/asia
Original file line number Diff line number Diff line change
Expand Up @@ -3594,14 +3594,14 @@ Rule Palestine 2069 only - Oct 12 2:00 0 -
Rule Palestine 2070 only - Oct 4 2:00 0 -
Rule Palestine 2071 only - Sep 19 2:00 0 -
Rule Palestine 2072 only - Sep 10 2:00 0 -
Rule Palestine 2072 only - Oct 22 2:00 1:00 S
Rule Palestine 2072 only - Oct 15 2:00 1:00 S
Rule Palestine 2072 max - Oct Sat<=30 2:00 0 -
Rule Palestine 2073 only - Sep 2 2:00 0 -
Rule Palestine 2073 only - Oct 14 2:00 1:00 S
Rule Palestine 2074 only - Aug 18 2:00 0 -
Rule Palestine 2074 only - Oct 6 2:00 1:00 S
Rule Palestine 2075 only - Aug 10 2:00 0 -
Rule Palestine 2075 only - Sep 21 2:00 1:00 S
Rule Palestine 2075 only - Sep 14 2:00 1:00 S
Rule Palestine 2076 only - Jul 25 2:00 0 -
Rule Palestine 2076 only - Sep 12 2:00 1:00 S
Rule Palestine 2077 only - Jul 17 2:00 0 -
Expand Down
10 changes: 5 additions & 5 deletions jdk/make/data/tzdata/leapseconds
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ Leap 2016 Dec 31 23:59:60 + S
# Any additional leap seconds will come after this.
# This Expires line is commented out for now,
# so that pre-2020a zic implementations do not reject this file.
#Expires 2024 Dec 28 00:00:00
#Expires 2024 Jun 28 00:00:00

# POSIX timestamps for the data in this file:
#updated 1704708379 (2024-01-08 10:06:19 UTC)
#expires 1735344000 (2024-12-28 00:00:00 UTC)
#updated 1467936000 (2016-07-08 00:00:00 UTC)
#expires 1719532800 (2024-06-28 00:00:00 UTC)

# Updated through IERS Bulletin C (https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat)
# File expires on 28 December 2024
# Updated through IERS Bulletin C66
# File expires on: 28 June 2024
130 changes: 64 additions & 66 deletions jdk/src/share/classes/sun/net/www/http/KeepAliveCache.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -27,9 +27,17 @@

import java.io.IOException;
import java.io.NotSerializableException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.HashMap;
import java.net.URL;
import java.util.List;

import sun.security.action.GetIntegerAction;

/**
* A class that implements a cache of idle Http connections for keep-alive
Expand All @@ -52,14 +60,14 @@ public class KeepAliveCache
static int result = -1;
static int getMaxConnections() {
if (result == -1) {
result = java.security.AccessController.doPrivileged(
new sun.security.action.GetIntegerAction("http.maxConnections",
MAX_CONNECTIONS))
result = AccessController.doPrivileged(
new GetIntegerAction("http.maxConnections", MAX_CONNECTIONS))
.intValue();
if (result <= 0)
if (result <= 0) {
result = MAX_CONNECTIONS;
}
}
return result;
return result;
}

static final int LIFETIME = 5000;
Expand Down Expand Up @@ -92,8 +100,7 @@ public synchronized void put(final URL url, Object obj, HttpClient http) {
* The robustness to get around this is in HttpClient.parseHTTP()
*/
final KeepAliveCache cache = this;
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Void>() {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
// We want to create the Keep-Alive-Timer in the
// system threadgroup
Expand All @@ -120,8 +127,8 @@ public Void run() {

if (v == null) {
int keepAliveTimeout = http.getKeepAliveTimeout();
v = new ClientVector(keepAliveTimeout > 0?
keepAliveTimeout*1000 : LIFETIME);
v = new ClientVector(keepAliveTimeout > 0 ?
keepAliveTimeout * 1000 : LIFETIME);
v.put(http);
super.put(key, v);
} else {
Expand All @@ -130,12 +137,12 @@ public Void run() {
}

/* remove an obsolete HttpClient from its VectorCache */
public synchronized void remove (HttpClient h, Object obj) {
public synchronized void remove(HttpClient h, Object obj) {
KeepAliveKey key = new KeepAliveKey(h.url, obj);
ClientVector v = super.get(key);
if (v != null) {
v.remove(h);
if (v.empty()) {
if (v.isEmpty()) {
removeVector(key);
}
}
Expand Down Expand Up @@ -171,39 +178,27 @@ public void run() {
try {
Thread.sleep(LIFETIME);
} catch (InterruptedException e) {}
synchronized (this) {
/* Remove all unused HttpClients. Starting from the
* bottom of the stack (the least-recently used first).
* REMIND: It'd be nice to not remove *all* connections
* that aren't presently in use. One could have been added
* a second ago that's still perfectly valid, and we're
* needlessly axing it. But it's not clear how to do this
* cleanly, and doing it right may be more trouble than it's
* worth.
*/

// Remove all outdated HttpClients.
synchronized (this) {
long currentTime = System.currentTimeMillis();

ArrayList<KeepAliveKey> keysToRemove
= new ArrayList<KeepAliveKey>();
List<KeepAliveKey> keysToRemove = new ArrayList<>();

for (KeepAliveKey key : keySet()) {
ClientVector v = get(key);
synchronized (v) {
int i;

for (i = 0; i < v.size(); i++) {
KeepAliveEntry e = v.elementAt(i);
KeepAliveEntry e = v.peek();
while (e != null) {
if ((currentTime - e.idleStartTime) > v.nap) {
HttpClient h = e.hc;
h.closeServer();
v.poll();
e.hc.closeServer();
} else {
break;
}
e = v.peek();
}
v.subList(0, i).clear();

if (v.size() == 0) {
if (v.isEmpty()) {
keysToRemove.add(key);
}
}
Expand All @@ -213,59 +208,53 @@ public void run() {
removeVector(key);
}
}
} while (size() > 0);

return;
} while (!isEmpty());
}

/*
* Do not serialize this class!
*/
private void writeObject(java.io.ObjectOutputStream stream)
throws IOException {
private void writeObject(ObjectOutputStream stream) throws IOException {
throw new NotSerializableException();
}

private void readObject(java.io.ObjectInputStream stream)
throws IOException, ClassNotFoundException {
private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException
{
throw new NotSerializableException();
}
}

/* FILO order for recycling HttpClients, should run in a thread
* to time them out. If > maxConns are in use, block.
*/


class ClientVector extends java.util.Stack<KeepAliveEntry> {
class ClientVector extends ArrayDeque<KeepAliveEntry> {
private static final long serialVersionUID = -8680532108106489459L;

// sleep time in milliseconds, before cache clear
int nap;



ClientVector (int nap) {
ClientVector(int nap) {
this.nap = nap;
}

synchronized HttpClient get() {
if (empty()) {
if (isEmpty()) {
return null;
} else {
// Loop until we find a connection that has not timed out
HttpClient hc = null;
long currentTime = System.currentTimeMillis();
do {
KeepAliveEntry e = pop();
if ((currentTime - e.idleStartTime) > nap) {
e.hc.closeServer();
} else {
hc = e.hc;
}
} while ((hc== null) && (!empty()));
return hc;
}

// Loop until we find a connection that has not timed out
HttpClient hc = null;
long currentTime = System.currentTimeMillis();
do {
KeepAliveEntry e = pop();
if ((currentTime - e.idleStartTime) > nap) {
e.hc.closeServer();
} else {
hc = e.hc;
}
} while ((hc == null) && (!isEmpty()));
return hc;
}

/* return a still valid, unused HttpClient */
Expand All @@ -277,21 +266,30 @@ synchronized void put(HttpClient h) {
}
}

/* remove an HttpClient */
synchronized boolean remove(HttpClient h) {
for (KeepAliveEntry curr : this) {
if (curr.hc == h) {
return super.remove(curr);
}
}
return false;
}

/*
* Do not serialize this class!
*/
private void writeObject(java.io.ObjectOutputStream stream)
throws IOException {
private void writeObject(ObjectOutputStream stream) throws IOException {
throw new NotSerializableException();
}

private void readObject(java.io.ObjectInputStream stream)
throws IOException, ClassNotFoundException {
private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException
{
throw new NotSerializableException();
}
}


class KeepAliveKey {
private String protocol = null;
private String host = null;
Expand Down
Loading

0 comments on commit aeb970a

Please sign in to comment.