Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge
  • Loading branch information
prrace committed Aug 31, 2020
2 parents ba7eb53 + 83e0ecb commit 238655b025b8a60ef65656c526aa74e30177cea4
Showing with 1,839 additions and 740 deletions.
  1. +4 −0 make/RunTests.gmk
  2. +3 −3 make/data/currency/CurrencyData.properties
  3. +0 −151 src/hotspot/os/windows/os_windows.cpp
  4. +5 −0 src/hotspot/share/aot/aotCodeHeap.cpp
  5. +1 −0 src/hotspot/share/ci/ciField.cpp
  6. +1 −0 src/hotspot/share/ci/ciReplay.cpp
  7. +1 −0 src/hotspot/share/classfile/classFileParser.cpp
  8. +1 −0 src/hotspot/share/classfile/classListParser.cpp
  9. +99 −0 src/hotspot/share/classfile/classLoadInfo.hpp
  10. +1 −0 src/hotspot/share/classfile/classLoader.cpp
  11. +1 −0 src/hotspot/share/classfile/classLoaderExt.cpp
  12. +18 −0 src/hotspot/share/classfile/dictionary.cpp
  13. +2 −19 src/hotspot/share/classfile/dictionary.hpp
  14. +1 −0 src/hotspot/share/classfile/javaClasses.cpp
  15. +1 −0 src/hotspot/share/classfile/javaClasses.hpp
  16. +1 −0 src/hotspot/share/classfile/klassFactory.cpp
  17. +18 −40 src/hotspot/share/classfile/systemDictionary.cpp
  18. +10 −68 src/hotspot/share/classfile/systemDictionary.hpp
  19. +1 −1 src/hotspot/share/classfile/systemDictionaryShared.hpp
  20. +2 −1 src/hotspot/share/gc/g1/g1Arguments.cpp
  21. +1 −0 src/hotspot/share/gc/g1/g1CollectedHeap.cpp
  22. +2 −1 src/hotspot/share/gc/parallel/mutableNUMASpace.cpp
  23. +1 −0 src/hotspot/share/gc/parallel/psParallelCompact.cpp
  24. +10 −16 src/hotspot/share/gc/serial/defNewGeneration.cpp
  25. +7 −5 src/hotspot/share/gc/serial/defNewGeneration.hpp
  26. +1 −2 src/hotspot/share/gc/serial/defNewGeneration.inline.hpp
  27. +3 −5 src/hotspot/share/gc/serial/serialHeap.cpp
  28. +3 −3 src/hotspot/share/gc/serial/serialHeap.hpp
  29. +1 −2 src/hotspot/share/gc/serial/tenuredGeneration.inline.hpp
  30. +1 −0 src/hotspot/share/gc/shared/gcVMOperations.cpp
  31. +46 −61 src/hotspot/share/gc/shared/genOopClosures.hpp
  32. +42 −43 src/hotspot/share/gc/shared/genOopClosures.inline.hpp
  33. +0 −1 src/hotspot/share/gc/shared/generation.hpp
  34. +1 −0 src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
  35. +4 −0 src/hotspot/share/jvmci/jvmciCodeInstaller.cpp
  36. +4 −0 src/hotspot/share/jvmci/jvmciCodeInstaller.hpp
  37. +1 −0 src/hotspot/share/jvmci/jvmciCompilerToVM.cpp
  38. +2 −1 src/hotspot/share/jvmci/jvmciJavaClasses.cpp
  39. +2 −0 src/hotspot/share/jvmci/jvmciRuntime.cpp
  40. +4 −0 src/hotspot/share/jvmci/vmStructs_jvmci.cpp
  41. +1 −0 src/hotspot/share/memory/virtualspace.cpp
  42. +1 −0 src/hotspot/share/oops/instanceKlass.cpp
  43. +1 −3 src/hotspot/share/oops/klass.inline.hpp
  44. +0 −1 src/hotspot/share/oops/oop.hpp
  45. +86 −9 src/hotspot/share/opto/loopnode.cpp
  46. +5 −0 src/hotspot/share/opto/loopnode.hpp
  47. +4 −1 src/hotspot/share/opto/loopopts.cpp
  48. +1 −0 src/hotspot/share/prims/jvm.cpp
  49. +2 −1 src/hotspot/share/prims/jvmtiRedefineClasses.cpp
  50. +1 −0 src/hotspot/share/prims/methodHandles.cpp
  51. +1 −0 src/hotspot/share/prims/unsafe.cpp
  52. +1 −0 src/hotspot/share/runtime/fieldDescriptor.inline.hpp
  53. +6 −0 src/hotspot/share/runtime/signature.cpp
  54. +1 −6 src/hotspot/share/runtime/signature.hpp
  55. +1 −1 src/hotspot/share/utilities/globalDefinitions_gcc.hpp
  56. +4 −4 src/java.base/linux/native/libnet/linux_close.c
  57. +26 −1 src/java.base/share/classes/java/util/stream/DoublePipeline.java
  58. +63 −0 src/java.base/share/classes/java/util/stream/DoubleStream.java
  59. +25 −1 src/java.base/share/classes/java/util/stream/IntPipeline.java
  60. +63 −0 src/java.base/share/classes/java/util/stream/IntStream.java
  61. +25 −1 src/java.base/share/classes/java/util/stream/LongPipeline.java
  62. +64 −1 src/java.base/share/classes/java/util/stream/LongStream.java
  63. +99 −2 src/java.base/share/classes/java/util/stream/ReferencePipeline.java
  64. +209 −7 src/java.base/share/classes/java/util/stream/Stream.java
  65. +2 −4 src/java.base/unix/native/libnio/ch/NativeThread.c
  66. +23 −23 src/java.logging/share/classes/java/util/logging/FileHandler.java
  67. +9 −9 src/java.logging/share/classes/java/util/logging/Handler.java
  68. +3 −3 src/java.logging/share/classes/java/util/logging/LogManager.java
  69. +3 −3 src/java.logging/share/classes/java/util/logging/MemoryHandler.java
  70. +2 −2 src/java.logging/share/classes/java/util/logging/SocketHandler.java
  71. +5 −5 src/java.logging/share/classes/java/util/logging/StreamHandler.java
  72. +20 −0 ...dk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/BinaryContainer.java
  73. +11 −1 src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java
  74. +16 −0 src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/MarkProcessor.java
  75. +3 −0 ...e/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java
  76. +46 −29 ...e/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
  77. +26 −6 ...ses/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfigAccess.java
  78. +13 −25 ...er/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotMarkId.java
  79. +43 −4 ...org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java
  80. +1 −1 ...compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotG1WriteBarrierSnippets.java
  81. +2 −6 ...aalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java
  82. +4 −9 ...sses/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallSnippets.java
  83. +39 −11 src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c
  84. +106 −0 test/hotspot/jtreg/compiler/loopopts/TestSplitIfPinnedLoadInStripMinedLoop.java
  85. +1 −1 test/hotspot/jtreg/vmTestbase/vm/mlvm/mixed/stress/java/findDeadlock/TestDescription.java
  86. +2 −2 test/jdk/java/util/stream/test/org/openjdk/tests/java/util/stream/FlatMapOpTest.java
  87. +323 −0 test/jdk/java/util/stream/test/org/openjdk/tests/java/util/stream/mapMultiOpTest.java
  88. +139 −129 test/jdk/security/infra/java/security/cert/CertPathValidator/certification/GlobalSignR6CA.java
  89. +0 −5 test/jtreg-ext/requires/VMProps.java
@@ -172,6 +172,10 @@ define SetupAotModuleBody
$1_JAOTC_OPTS += --compile-with-assertions
endif

ifneq ($$(filter -XX:+VerifyOops, $$($1_VM_OPTIONS)), )
$1_JAOTC_OPTS += -J-Dgraal.AOTVerifyOops=true
endif

$$($1_AOT_LIB): $$(JDK_UNDER_TEST)/release \
$$(call DependOnVariable, $1_JAOTC_OPTS) \
$$(call DependOnVariable, JDK_UNDER_TEST)
@@ -1,5 +1,5 @@
#
# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2000, 2020, 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
@@ -50,7 +50,7 @@ all=ADP020-AED784-AFA004-AFN971-ALL008-AMD051-ANG532-AOA973-ARS032-ATS040-AUD036
LVL428-LYD434-MAD504-MDL498-MGA969-MGF450-MKD807-MMK104-MNT496-MOP446-MRO478-MRU929-\
MTL470-MUR480-MVR462-MWK454-MXN484-MXV979-MYR458-MZM508-MZN943-NAD516-NGN566-\
NIO558-NLG528-NOK578-NPR524-NZD554-OMR512-PAB590-PEN604-PGK598-PHP608-\
PKR586-PLN985-PTE620-PYG600-QAR634-ROL946-RON946-RSD941-RUB643-RUR810-RWF646-SAR682-\
PKR586-PLN985-PTE620-PYG600-QAR634-ROL642-RON946-RSD941-RUB643-RUR810-RWF646-SAR682-\
SBD090-SCR690-SDD736-SDG938-SEK752-SGD702-SHP654-SIT705-SKK703-SLL694-SOS706-\
SRD968-SRG740-SSP728-STD678-STN930-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TMT934-TND788-TOP776-\
TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-UYI940-\
@@ -588,7 +588,7 @@ ZW=ZWL

minor0=\
ADP-BEF-BIF-BYB-BYR-CLP-DJF-ESP-GNF-\
GRD-ISK-ITL-JPY-KMF-KRW-LUF-MGF-PYG-PTE-RWF-\
GRD-ISK-ITL-JPY-KMF-KRW-LUF-MGF-PYG-PTE-ROL-RWF-\
TPE-TRL-UGX-UYI-VND-VUV-XAF-XOF-XPF
minor3=\
BHD-IQD-JOD-KWD-LYD-OMR-TND
@@ -2696,122 +2696,6 @@ int os::vm_allocation_granularity() {
#define MEM_LARGE_PAGES 0x20000000
#endif

#define VirtualFreeChecked(mem, size, type) \
do { \
bool ret = VirtualFree(mem, size, type); \
assert(ret, "Failed to free memory: " PTR_FORMAT, p2i(mem)); \
} while (false)

// The number of bytes is setup to match 1 pixel and 32 bits per pixel.
static const int gdi_tiny_bitmap_width_bytes = 4;

static HBITMAP gdi_create_tiny_bitmap(void* mem) {
// The documentation for CreateBitmap states a word-alignment requirement.
STATIC_ASSERT(is_aligned_(gdi_tiny_bitmap_width_bytes, sizeof(WORD)));

// Some callers use this function to test if memory crossing separate memory
// reservations can be used. Create a height of 2 to make sure that one pixel
// ends up in the first reservation and the other in the second.
int nHeight = 2;

assert(is_aligned(mem, gdi_tiny_bitmap_width_bytes), "Incorrect alignment");

// Width is one pixel and correlates with gdi_tiny_bitmap_width_bytes.
int nWidth = 1;

// Calculate bit count - will be 32.
UINT nBitCount = gdi_tiny_bitmap_width_bytes / nWidth * BitsPerByte;

return CreateBitmap(
nWidth,
nHeight,
1, // nPlanes
nBitCount,
mem); // lpBits
}

// It has been found that some of the GDI functions fail under these two situations:
// 1) When used with large pages
// 2) When mem crosses the boundary between two separate memory reservations.
//
// This is a small test used to see if the current GDI implementation is
// susceptible to any of these problems.
static bool gdi_can_use_memory(void* mem) {
HBITMAP bitmap = gdi_create_tiny_bitmap(mem);
if (bitmap != NULL) {
DeleteObject(bitmap);
return true;
}

// Verify that the bitmap could be created with a normal page.
// If this fails, the testing method above isn't reliable.
#ifdef ASSERT
void* verify_mem = ::malloc(4 * 1024);
HBITMAP verify_bitmap = gdi_create_tiny_bitmap(verify_mem);
if (verify_bitmap == NULL) {
fatal("Couldn't create test bitmap with malloced memory");
} else {
DeleteObject(verify_bitmap);
}
::free(verify_mem);
#endif

return false;
}

// Test if GDI functions work when memory spans
// two adjacent memory reservations.
static bool gdi_can_use_split_reservation_memory(bool use_large_pages, size_t granule) {
DWORD mem_large_pages = use_large_pages ? MEM_LARGE_PAGES : 0;

// Find virtual memory range. Two granules for regions and one for alignment.
void* reserved = VirtualAlloc(NULL,
granule * 3,
MEM_RESERVE,
PAGE_NOACCESS);
if (reserved == NULL) {
// Can't proceed with test - pessimistically report false
return false;
}
VirtualFreeChecked(reserved, 0, MEM_RELEASE);

// Ensure proper alignment
void* res0 = align_up(reserved, granule);
void* res1 = (char*)res0 + granule;

// Reserve and commit the first part
void* mem0 = VirtualAlloc(res0,
granule,
MEM_RESERVE|MEM_COMMIT|mem_large_pages,
PAGE_READWRITE);
if (mem0 != res0) {
// Can't proceed with test - pessimistically report false
return false;
}

// Reserve and commit the second part
void* mem1 = VirtualAlloc(res1,
granule,
MEM_RESERVE|MEM_COMMIT|mem_large_pages,
PAGE_READWRITE);
if (mem1 != res1) {
VirtualFreeChecked(mem0, 0, MEM_RELEASE);
// Can't proceed with test - pessimistically report false
return false;
}

// Set the bitmap's bits to point one "width" bytes before, so that
// the bitmap extends across the reservation boundary.
void* bitmapBits = (char*)mem1 - gdi_tiny_bitmap_width_bytes;

bool success = gdi_can_use_memory(bitmapBits);

VirtualFreeChecked(mem1, 0, MEM_RELEASE);
VirtualFreeChecked(mem0, 0, MEM_RELEASE);

return success;
}

// Container for NUMA node list info
class NUMANodeListHolder {
private:
@@ -2914,12 +2798,6 @@ static bool numa_interleaving_init() {
return false;
}

if (!gdi_can_use_split_reservation_memory(UseLargePages, min_interleave_granularity)) {
WARN("Windows GDI cannot handle split reservations.");
WARN("...Ignoring UseNUMAInterleaving flag.");
return false;
}

if (log_is_enabled(Debug, os, cpu)) {
Log(os, cpu) log;
log.debug("NUMA UsedNodeCount=%d, namely ", numa_node_list_holder.get_count());
@@ -3080,25 +2958,6 @@ static size_t large_page_init_decide_size() {
size = LargePageSizeInBytes;
}

// Now test allocating a page
void* large_page = VirtualAlloc(NULL,
size,
MEM_RESERVE|MEM_COMMIT|MEM_LARGE_PAGES,
PAGE_READWRITE);
if (large_page == NULL) {
WARN("JVM cannot allocate one single large page.");
return 0;
}

// Detect if GDI can use memory backed by large pages
if (!gdi_can_use_memory(large_page)) {
WARN("JVM cannot use large pages because of bug in Windows GDI.");
return 0;
}

// Release test page
VirtualFreeChecked(large_page, 0, MEM_RELEASE);

#undef WARN

return size;
@@ -3119,16 +2978,6 @@ void os::large_page_init() {
}

UseLargePages = _large_page_size != 0;

if (UseLargePages && UseLargePagesIndividualAllocation) {
if (!gdi_can_use_split_reservation_memory(true /* use_large_pages */, _large_page_size)) {
if (FLAG_IS_CMDLINE(UseLargePagesIndividualAllocation)) {
warning("Windows GDI cannot handle split reservations.");
warning("...Ignoring UseLargePagesIndividualAllocation flag.");
}
UseLargePagesIndividualAllocation = false;
}
}
}

int os::create_file_for_heap(const char* dir) {
@@ -44,6 +44,7 @@
#include "runtime/deoptimization.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/os.hpp"
#include "runtime/java.hpp"
#include "runtime/safepointVerifiers.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/vmOperations.hpp"
@@ -566,6 +567,10 @@ void AOTCodeHeap::link_stub_routines_symbols() {

SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_stub_routines_throw_delayed_StackOverflowError_entry", address, StubRoutines::_throw_delayed_StackOverflowError_entry);

SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_verify_oops", intptr_t, VerifyOops);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_verify_oop_count_address", jint *, &StubRoutines::_verify_oop_count);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_verify_oop_bits", intptr_t, Universe::verify_oop_bits());
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_verify_oop_mask", intptr_t, Universe::verify_oop_mask());
}

void AOTCodeHeap::link_os_symbols() {
@@ -32,6 +32,7 @@
#include "oops/oop.inline.hpp"
#include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/reflectionUtils.hpp"

// ciField
//
@@ -39,6 +39,7 @@
#include "oops/oop.inline.hpp"
#include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "utilities/copy.hpp"
#include "utilities/macros.hpp"
#include "utilities/utf8.hpp"
@@ -28,6 +28,7 @@
#include "classfile/classFileStream.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/classLoaderData.inline.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/defaultMethods.hpp"
#include "classfile/dictionary.hpp"
#include "classfile/fieldLayoutBuilder.hpp"
@@ -36,6 +36,7 @@
#include "memory/metaspaceShared.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/hashtable.inline.hpp"
@@ -0,0 +1,99 @@
/*
* Copyright (c) 2020, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/

#ifndef SHARE_CLASSFILE_CLASSLOADINFO_HPP
#define SHARE_CLASSFILE_CLASSLOADINFO_HPP

#include "runtime/handles.hpp"

class InstanceKlass;

template <typename T> class GrowableArray;

class ClassInstanceInfo : public StackObj {
private:
InstanceKlass* _dynamic_nest_host;
Handle _class_data;

public:
ClassInstanceInfo() {
_dynamic_nest_host = NULL;
_class_data = Handle();
}
ClassInstanceInfo(InstanceKlass* dynamic_nest_host, Handle class_data) {
_dynamic_nest_host = dynamic_nest_host;
_class_data = class_data;
}

InstanceKlass* dynamic_nest_host() const { return _dynamic_nest_host; }
Handle class_data() const { return _class_data; }
friend class ClassLoadInfo;
};

class ClassLoadInfo : public StackObj {
private:
Handle _protection_domain;
const InstanceKlass* _unsafe_anonymous_host;
GrowableArray<Handle>* _cp_patches;
ClassInstanceInfo _class_hidden_info;
bool _is_hidden;
bool _is_strong_hidden;
bool _can_access_vm_annotations;

public:
ClassLoadInfo(Handle protection_domain) {
_protection_domain = protection_domain;
_unsafe_anonymous_host = NULL;
_cp_patches = NULL;
_class_hidden_info._dynamic_nest_host = NULL;
_class_hidden_info._class_data = Handle();
_is_hidden = false;
_is_strong_hidden = false;
_can_access_vm_annotations = false;
}

ClassLoadInfo(Handle protection_domain, const InstanceKlass* unsafe_anonymous_host,
GrowableArray<Handle>* cp_patches, InstanceKlass* dynamic_nest_host,
Handle class_data, bool is_hidden, bool is_strong_hidden,
bool can_access_vm_annotations) {
_protection_domain = protection_domain;
_unsafe_anonymous_host = unsafe_anonymous_host;
_cp_patches = cp_patches;
_class_hidden_info._dynamic_nest_host = dynamic_nest_host;
_class_hidden_info._class_data = class_data;
_is_hidden = is_hidden;
_is_strong_hidden = is_strong_hidden;
_can_access_vm_annotations = can_access_vm_annotations;
}

Handle protection_domain() const { return _protection_domain; }
const InstanceKlass* unsafe_anonymous_host() const { return _unsafe_anonymous_host; }
GrowableArray<Handle>* cp_patches() const { return _cp_patches; }
const ClassInstanceInfo* class_hidden_info_ptr() const { return &_class_hidden_info; }
bool is_hidden() const { return _is_hidden; }
bool is_strong_hidden() const { return _is_strong_hidden; }
bool can_access_vm_annotations() const { return _can_access_vm_annotations; }
};

#endif // SHARE_CLASSFILE_CLASSLOADINFO_HPP
@@ -29,6 +29,7 @@
#include "classfile/classLoader.inline.hpp"
#include "classfile/classLoaderData.inline.hpp"
#include "classfile/classLoaderExt.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/moduleEntry.hpp"
#include "classfile/modules.hpp"
@@ -28,6 +28,7 @@
#include "classfile/classLoader.inline.hpp"
#include "classfile/classLoaderExt.hpp"
#include "classfile/classLoaderData.inline.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/klassFactory.hpp"
#include "classfile/modules.hpp"
#include "classfile/systemDictionaryShared.hpp"

0 comments on commit 238655b

Please sign in to comment.