--- a/make/Init.gmk Fri Apr 20 10:20:36 2018 +0200
+++ b/make/Init.gmk Fri Apr 20 20:59:02 2018 +0200
@@ -310,9 +310,13 @@
ifneq ($(PARALLEL_TARGETS), )
$(call StartGlobalTimer)
$(call PrepareSmartJavac)
+ # JOBS will only be empty for a bootcycle-images recursive call
+ # or if specified via a make argument directly. In those cases
+ # treat it as NOT using jobs at all.
( cd $(TOPDIR) && \
$(NICE) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
- -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \
+ $(if $(JOBS), -j $(JOBS)) \
+ -f make/Main.gmk $(USER_MAKE_VARS) \
$(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) $(BUILD_LOG_PIPE) || \
( exitcode=$$? && \
$(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" \
--- a/make/lib/Awt2dLibraries.gmk Fri Apr 20 10:20:36 2018 +0200
+++ b/make/lib/Awt2dLibraries.gmk Fri Apr 20 20:59:02 2018 +0200
@@ -219,7 +219,7 @@
format-nonliteral parentheses, \
DISABLED_WARNINGS_clang := logical-op-parentheses extern-initializer, \
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \
- DISABLED_WARNINGS_microsoft := 4297 4244 4267 4996, \
+ DISABLED_WARNINGS_microsoft := 4297 4244 4267 4291 4302 4311 4996, \
ASFLAGS := $(LIBAWT_ASFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
--- a/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp Fri Apr 20 20:59:02 2018 +0200
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2014, Red Hat Inc. All rights reserved.
+ * Copyright (c) 2014, 2018, Red Hat Inc. 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
@@ -133,9 +133,29 @@
address addr = MacroAssembler::target_addr_for_insn(instruction_address());
*(intptr_t*)addr = x;
} else {
+ // Store x into the instruction stream.
MacroAssembler::pd_patch_instruction(instruction_address(), (address)x);
ICache::invalidate_range(instruction_address(), instruction_size);
}
+
+ // Find and replace the oop/metadata corresponding to this
+ // instruction in oops section.
+ CodeBlob* cb = CodeCache::find_blob(instruction_address());
+ nmethod* nm = cb->as_nmethod_or_null();
+ if (nm != NULL) {
+ RelocIterator iter(nm, instruction_address(), next_instruction_address());
+ while (iter.next()) {
+ if (iter.type() == relocInfo::oop_type) {
+ oop* oop_addr = iter.oop_reloc()->oop_addr();
+ *oop_addr = cast_to_oop(x);
+ break;
+ } else if (iter.type() == relocInfo::metadata_type) {
+ Metadata** metadata_addr = iter.metadata_reloc()->metadata_addr();
+ *metadata_addr = (Metadata*)x;
+ break;
+ }
+ }
+ }
}
void NativeMovConstReg::print() {
--- a/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp Fri Apr 20 20:59:02 2018 +0200
@@ -24,6 +24,7 @@
*/
#include "precompiled.hpp"
+#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
#include "interpreter/interp_masm.hpp"
--- a/src/hotspot/share/aot/aotCodeHeap.cpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/hotspot/share/aot/aotCodeHeap.cpp Fri Apr 20 20:59:02 2018 +0200
@@ -445,6 +445,8 @@
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_handle_wrong_method_stub", address, SharedRuntime::get_handle_wrong_method_stub());
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_exception_handler_for_return_address", address, SharedRuntime::exception_handler_for_return_address);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_register_finalizer", address, SharedRuntime::register_finalizer);
+ SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_object_notify", address, JVMCIRuntime::object_notify);
+ SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_object_notifyAll", address, JVMCIRuntime::object_notifyAll);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_OSR_migration_end", address, SharedRuntime::OSR_migration_end);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_resolve_dynamic_invoke", address, CompilerRuntime::resolve_dynamic_invoke);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_resolve_string_by_symbol", address, CompilerRuntime::resolve_string_by_symbol);
--- a/src/hotspot/share/classfile/classLoader.cpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/hotspot/share/classfile/classLoader.cpp Fri Apr 20 20:59:02 2018 +0200
@@ -80,13 +80,13 @@
// Entry points in zip.dll for loading zip/jar file entries
-typedef void * * (JNICALL *ZipOpen_t)(const char *name, char **pmsg);
-typedef void (JNICALL *ZipClose_t)(jzfile *zip);
-typedef jzentry* (JNICALL *FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen);
-typedef jboolean (JNICALL *ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
-typedef jzentry* (JNICALL *GetNextEntry_t)(jzfile *zip, jint n);
-typedef jboolean (JNICALL *ZipInflateFully_t)(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg);
-typedef jint (JNICALL *Crc32_t)(jint crc, const jbyte *buf, jint len);
+typedef void * * (*ZipOpen_t)(const char *name, char **pmsg);
+typedef void (*ZipClose_t)(jzfile *zip);
+typedef jzentry* (*FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen);
+typedef jboolean (*ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
+typedef jzentry* (*GetNextEntry_t)(jzfile *zip, jint n);
+typedef jboolean (*ZipInflateFully_t)(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg);
+typedef jint (*Crc32_t)(jint crc, const jbyte *buf, jint len);
static ZipOpen_t ZipOpen = NULL;
static ZipClose_t ZipClose = NULL;
--- a/src/hotspot/share/jvmci/jvmciRuntime.cpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/hotspot/share/jvmci/jvmciRuntime.cpp Fri Apr 20 20:59:02 2018 +0200
@@ -415,6 +415,34 @@
}
JRT_END
+// Object.notify() fast path, caller does slow path
+JRT_LEAF(jboolean, JVMCIRuntime::object_notify(JavaThread *thread, oopDesc* obj))
+
+ // Very few notify/notifyAll operations find any threads on the waitset, so
+ // the dominant fast-path is to simply return.
+ // Relatedly, it's critical that notify/notifyAll be fast in order to
+ // reduce lock hold times.
+ if (!SafepointSynchronize::is_synchronizing()) {
+ if (ObjectSynchronizer::quick_notify(obj, thread, false)) {
+ return true;
+ }
+ }
+ return false; // caller must perform slow path
+
+JRT_END
+
+// Object.notifyAll() fast path, caller does slow path
+JRT_LEAF(jboolean, JVMCIRuntime::object_notifyAll(JavaThread *thread, oopDesc* obj))
+
+ if (!SafepointSynchronize::is_synchronizing() ) {
+ if (ObjectSynchronizer::quick_notify(obj, thread, true)) {
+ return true;
+ }
+ }
+ return false; // caller must perform slow path
+
+JRT_END
+
JRT_ENTRY(void, JVMCIRuntime::throw_and_post_jvmti_exception(JavaThread* thread, const char* exception, const char* message))
TempNewSymbol symbol = SymbolTable::new_symbol(exception, CHECK);
SharedRuntime::throw_and_post_jvmti_exception(thread, symbol, message);
--- a/src/hotspot/share/jvmci/jvmciRuntime.hpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/hotspot/share/jvmci/jvmciRuntime.hpp Fri Apr 20 20:59:02 2018 +0200
@@ -139,6 +139,8 @@
static address exception_handler_for_pc(JavaThread* thread);
static void monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock);
static void monitorexit (JavaThread* thread, oopDesc* obj, BasicLock* lock);
+ static jboolean object_notify(JavaThread* thread, oopDesc* obj);
+ static jboolean object_notifyAll(JavaThread* thread, oopDesc* obj);
static void vm_error(JavaThread* thread, jlong where, jlong format, jlong value);
static oopDesc* load_and_clear_exception(JavaThread* thread);
static void log_printf(JavaThread* thread, oopDesc* format, jlong v1, jlong v2, jlong v3);
--- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp Fri Apr 20 20:59:02 2018 +0200
@@ -625,6 +625,8 @@
declare_function(JVMCIRuntime::exception_handler_for_pc) \
declare_function(JVMCIRuntime::monitorenter) \
declare_function(JVMCIRuntime::monitorexit) \
+ declare_function(JVMCIRuntime::object_notify) \
+ declare_function(JVMCIRuntime::object_notifyAll) \
declare_function(JVMCIRuntime::throw_and_post_jvmti_exception) \
declare_function(JVMCIRuntime::throw_klass_external_name_exception) \
declare_function(JVMCIRuntime::throw_class_cast_exception) \
--- a/src/hotspot/share/prims/jvm.cpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/hotspot/share/prims/jvm.cpp Fri Apr 20 20:59:02 2018 +0200
@@ -2768,15 +2768,14 @@
return len;
}
-
// HotSpot specific jio method
-void jio_print(const char* s) {
+void jio_print(const char* s, size_t len) {
// Try to make this function as atomic as possible.
if (Arguments::vfprintf_hook() != NULL) {
- jio_fprintf(defaultStream::output_stream(), "%s", s);
+ jio_fprintf(defaultStream::output_stream(), "%.*s", (int)len, s);
} else {
// Make an unused local variable to avoid warning from gcc 4.x compiler.
- size_t count = ::write(defaultStream::output_fd(), s, (int)strlen(s));
+ size_t count = ::write(defaultStream::output_fd(), s, (int)len);
}
}
--- a/src/hotspot/share/runtime/thread.cpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/hotspot/share/runtime/thread.cpp Fri Apr 20 20:59:02 2018 +0200
@@ -1495,7 +1495,6 @@
jlong* JavaThread::_jvmci_old_thread_counters;
bool jvmci_counters_include(JavaThread* thread) {
- oop threadObj = thread->threadObj();
return !JVMCICountersExcludeCompiler || !thread->is_Compiler_thread();
}
--- a/src/hotspot/share/utilities/ostream.cpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/hotspot/share/utilities/ostream.cpp Fri Apr 20 20:59:02 2018 +0200
@@ -36,7 +36,9 @@
#include "utilities/vmError.hpp"
#include "utilities/xmlstream.hpp"
-extern "C" void jio_print(const char* s); // Declarationtion of jvm method
+// Declarations of jvm methods
+extern "C" void jio_print(const char* s, size_t len);
+extern "C" int jio_printf(const char *fmt, ...);
outputStream::outputStream(int width) {
_width = width;
@@ -612,19 +614,15 @@
// Try again to open the file in the temp directory.
delete file;
- char warnbuf[O_BUFLEN*2];
- jio_snprintf(warnbuf, sizeof(warnbuf), "Warning: Cannot open log file: %s\n", log_name);
- // Note: This feature is for maintainer use only. No need for L10N.
- jio_print(warnbuf);
+ // Note: This feature is for maintainer use only. No need for L10N.
+ jio_printf("Warning: Cannot open log file: %s\n", log_name);
try_name = make_log_name(log_name, os::get_temp_directory());
if (try_name == NULL) {
warning("Cannot open file %s: file name is too long for directory %s.\n", log_name, os::get_temp_directory());
return NULL;
}
- jio_snprintf(warnbuf, sizeof(warnbuf),
- "Warning: Forcing option -XX:LogFile=%s\n", try_name);
- jio_print(warnbuf);
+ jio_printf("Warning: Forcing option -XX:LogFile=%s\n", try_name);
file = new(ResourceObj::C_HEAP, mtInternal) fileStream(try_name);
FREE_C_HEAP_ARRAY(char, try_name);
@@ -824,20 +822,6 @@
tty_lock->unlock();
}
-
-// Yuck: jio_print does not accept char*/len.
-static void call_jio_print(const char* s, size_t len) {
- char buffer[O_BUFLEN+100];
- if (len > sizeof(buffer)-1) {
- warning("increase O_BUFLEN in ostream.cpp -- output truncated");
- len = sizeof(buffer)-1;
- }
- strncpy(buffer, s, len);
- buffer[len] = '\0';
- jio_print(buffer);
-}
-
-
void defaultStream::write(const char* s, size_t len) {
intx thread_id = os::current_thread_id();
intx holder = hold(thread_id);
@@ -845,11 +829,7 @@
if (DisplayVMOutput &&
(_outer_xmlStream == NULL || !_outer_xmlStream->inside_attrs())) {
// print to output stream. It can be redirected by a vfprintf hook
- if (s[len] == '\0') {
- jio_print(s);
- } else {
- call_jio_print(s, len);
- }
+ jio_print(s, len);
}
// print to log file
--- a/src/java.base/share/native/launcher/main.c Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.base/share/native/launcher/main.c Fri Apr 20 20:59:02 2018 +0200
@@ -93,7 +93,7 @@
__initenv = _environ;
#else /* JAVAW */
-JNIEXPORT int JNICALL
+JNIEXPORT int
main(int argc, char **argv)
{
int margc;
--- a/src/java.base/share/native/libjimage/jimage.cpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.base/share/native/libjimage/jimage.cpp Fri Apr 20 20:59:02 2018 +0200
@@ -55,7 +55,7 @@
* }
* ...
*/
-extern "C" JNIEXPORT JImageFile* JNICALL
+extern "C" JNIEXPORT JImageFile*
JIMAGE_Open(const char *name, jint* error) {
// TODO - return a meaningful error code
*error = 0;
@@ -72,7 +72,7 @@
* Ex.
* (*JImageClose)(image);
*/
-extern "C" JNIEXPORT void JNICALL
+extern "C" JNIEXPORT void
JIMAGE_Close(JImageFile* image) {
ImageFileReader::close((ImageFileReader*) image);
}
@@ -89,7 +89,7 @@
* tty->print_cr(package);
* -> java.base
*/
-extern "C" JNIEXPORT const char* JNICALL
+extern "C" JNIEXPORT const char*
JIMAGE_PackageToModule(JImageFile* image, const char* package_name) {
return ((ImageFileReader*) image)->get_image_module_data()->package_to_module(package_name);
}
@@ -108,7 +108,7 @@
* JImageLocationRef location = (*JImageFindResource)(image,
* "java.base", "9.0", "java/lang/String.class", &size);
*/
-extern "C" JNIEXPORT JImageLocationRef JNICALL
+extern "C" JNIEXPORT JImageLocationRef
JIMAGE_FindResource(JImageFile* image,
const char* module_name, const char* version, const char* name,
jlong* size) {
@@ -155,7 +155,7 @@
* char* buffer = new char[size];
* (*JImageGetResource)(image, location, buffer, size);
*/
-extern "C" JNIEXPORT jlong JNICALL
+extern "C" JNIEXPORT jlong
JIMAGE_GetResource(JImageFile* image, JImageLocationRef location,
char* buffer, jlong size) {
((ImageFileReader*) image)->get_resource((u4) location, (u1*) buffer);
@@ -184,7 +184,7 @@
* }
* (*JImageResourceIterator)(image, ctw_visitor, loader);
*/
-extern "C" JNIEXPORT void JNICALL
+extern "C" JNIEXPORT void
JIMAGE_ResourceIterator(JImageFile* image,
JImageResourceVisitor_t visitor, void* arg) {
ImageFileReader* imageFile = (ImageFileReader*) image;
@@ -226,7 +226,7 @@
* char path[JIMAGE_MAX_PATH];
* (*JImageResourcePath)(image, location, path, JIMAGE_MAX_PATH);
*/
-extern "C" JNIEXPORT bool JNICALL
+extern "C" JNIEXPORT bool
JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef,
char* path, size_t max) {
ImageFileReader* imageFile = (ImageFileReader*) image;
--- a/src/java.base/share/native/libjimage/jimage.hpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.base/share/native/libjimage/jimage.hpp Fri Apr 20 20:59:02 2018 +0200
@@ -72,7 +72,7 @@
* ...
*/
-extern "C" JNIEXPORT JImageFile* JNICALL
+extern "C" JNIEXPORT JImageFile*
JIMAGE_Open(const char *name, jint* error);
typedef JImageFile* (*JImageOpen_t)(const char *name, jint* error);
@@ -87,7 +87,7 @@
* (*JImageClose)(image);
*/
-extern "C" JNIEXPORT void JNICALL
+extern "C" JNIEXPORT void
JIMAGE_Close(JImageFile* jimage);
typedef void (*JImageClose_t)(JImageFile* jimage);
@@ -106,7 +106,7 @@
* -> java.base
*/
-extern "C" JNIEXPORT const char * JNICALL
+extern "C" JNIEXPORT const char *
JIMAGE_PackageToModule(JImageFile* jimage, const char* package_name);
typedef const char* (*JImagePackageToModule_t)(JImageFile* jimage, const char* package_name);
@@ -150,7 +150,7 @@
* char* buffer = new char[size];
* (*JImageGetResource)(image, location, buffer, size);
*/
-extern "C" JNIEXPORT jlong JNICALL
+extern "C" JNIEXPORT jlong
JIMAGE_GetResource(JImageFile* jimage, JImageLocationRef location,
char* buffer, jlong size);
@@ -185,7 +185,7 @@
const char* module_name, const char* version, const char* package,
const char* name, const char* extension, void* arg);
-extern "C" JNIEXPORT void JNICALL
+extern "C" JNIEXPORT void
JIMAGE_ResourceIterator(JImageFile* jimage,
JImageResourceVisitor_t visitor, void *arg);
@@ -202,7 +202,7 @@
* char path[JIMAGE_MAX_PATH];
* (*JImageResourcePath)(image, location, path, JIMAGE_MAX_PATH);
*/
-extern "C" JNIEXPORT bool JNICALL
+extern "C" JNIEXPORT bool
JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef,
char* path, size_t max);
--- a/src/java.base/share/native/libzip/CRC32.c Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.base/share/native/libzip/CRC32.c Fri Apr 20 20:59:02 2018 +0200
@@ -54,7 +54,7 @@
return crc;
}
-JNIEXPORT jint JNICALL
+JNIEXPORT jint
ZIP_CRC32(jint crc, const jbyte *buf, jint len)
{
return crc32(crc, (Bytef*)buf, len);
--- a/src/java.base/share/native/libzip/zip_util.c Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.base/share/native/libzip/zip_util.c Fri Apr 20 20:59:02 2018 +0200
@@ -881,7 +881,7 @@
* set to the error message text if msg != 0. Otherwise, *msg will be
* set to NULL. Caller doesn't need to free the error message.
*/
-JNIEXPORT jzfile * JNICALL
+JNIEXPORT jzfile *
ZIP_Open(const char *name, char **pmsg)
{
jzfile *file = ZIP_Open_Generic(name, pmsg, O_RDONLY, 0);
@@ -895,7 +895,7 @@
/*
* Closes the specified zip file object.
*/
-JNIEXPORT void JNICALL
+JNIEXPORT void
ZIP_Close(jzfile *zip)
{
MLOCK(zfiles_lock);
@@ -1115,7 +1115,7 @@
* Returns the zip entry corresponding to the specified name, or
* NULL if not found.
*/
-JNIEXPORT jzentry * JNICALL
+JNIEXPORT jzentry *
ZIP_GetEntry(jzfile *zip, char *name, jint ulen)
{
if (ulen == 0) {
@@ -1238,7 +1238,7 @@
* Returns the n'th (starting at zero) zip file entry, or NULL if the
* specified index was out of range.
*/
-JNIEXPORT jzentry * JNICALL
+JNIEXPORT jzentry *
ZIP_GetNextEntry(jzfile *zip, jint n)
{
jzentry *result;
@@ -1439,7 +1439,7 @@
* The current implementation does not support reading an entry that
* has the size bigger than 2**32 bytes in ONE invocation.
*/
-JNIEXPORT jzentry * JNICALL
+JNIEXPORT jzentry *
ZIP_FindEntry(jzfile *zip, char *name, jint *sizeP, jint *nameLenP)
{
jzentry *entry = ZIP_GetEntry(zip, name, 0);
@@ -1456,7 +1456,7 @@
* Note: this is called from the separately delivered VM (hotspot/classic)
* so we have to be careful to maintain the expected behaviour.
*/
-JNIEXPORT jboolean JNICALL
+JNIEXPORT jboolean
ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname)
{
char *msg;
@@ -1515,7 +1515,7 @@
return JNI_TRUE;
}
-JNIEXPORT jboolean JNICALL
+JNIEXPORT jboolean
ZIP_InflateFully(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg)
{
z_stream strm;
--- a/src/java.base/share/native/libzip/zip_util.h Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.base/share/native/libzip/zip_util.h Fri Apr 20 20:59:02 2018 +0200
@@ -241,16 +241,16 @@
*/
#define ZIP_ENDCHAIN ((jint)-1)
-JNIEXPORT jzentry * JNICALL
+JNIEXPORT jzentry *
ZIP_FindEntry(jzfile *zip, char *name, jint *sizeP, jint *nameLenP);
-JNIEXPORT jboolean JNICALL
+JNIEXPORT jboolean
ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entrynm);
-JNIEXPORT jzentry * JNICALL
+JNIEXPORT jzentry *
ZIP_GetNextEntry(jzfile *zip, jint n);
-JNIEXPORT jzfile * JNICALL
+JNIEXPORT jzfile *
ZIP_Open(const char *name, char **pmsg);
jzfile *
@@ -265,10 +265,10 @@
jzfile *
ZIP_Put_In_Cache0(const char *name, ZFILE zfd, char **pmsg, jlong lastModified, jboolean usemmap);
-JNIEXPORT void JNICALL
+JNIEXPORT void
ZIP_Close(jzfile *zip);
-JNIEXPORT jzentry * JNICALL
+JNIEXPORT jzentry *
ZIP_GetEntry(jzfile *zip, char *name, jint ulen);
JNIEXPORT void JNICALL
ZIP_Lock(jzfile *zip);
@@ -281,7 +281,7 @@
jlong ZIP_GetEntryDataOffset(jzfile *zip, jzentry *entry);
jzentry * ZIP_GetEntry2(jzfile *zip, char *name, jint ulen, jboolean addSlash);
-JNIEXPORT jboolean JNICALL
+JNIEXPORT jboolean
ZIP_InflateFully(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg);
#endif /* !_ZIP_H_ */
--- a/src/java.desktop/share/native/common/awt/medialib/mlib_ImageCreate.c Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.desktop/share/native/common/awt/medialib/mlib_ImageCreate.c Fri Apr 20 20:59:02 2018 +0200
@@ -227,7 +227,7 @@
}
/***************************************************************/
-mlib_image *mlib_ImageCreateStruct(mlib_type type,
+JNIEXPORT mlib_image* JNICALL mlib_ImageCreateStruct(mlib_type type,
mlib_s32 channels,
mlib_s32 width,
mlib_s32 height,
@@ -253,7 +253,7 @@
}
/***************************************************************/
-mlib_image *mlib_ImageCreate(mlib_type type,
+JNIEXPORT mlib_image* JNICALL mlib_ImageCreate(mlib_type type,
mlib_s32 channels,
mlib_s32 width,
mlib_s32 height)
@@ -352,7 +352,7 @@
}
/***************************************************************/
-void mlib_ImageDelete(mlib_image *img)
+JNIEXPORT void JNICALL mlib_ImageDelete(mlib_image *img)
{
if (img == NULL) return;
if ((img -> flags & MLIB_IMAGE_USERALLOCATED) == 0) {
--- a/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.c Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.c Fri Apr 20 20:59:02 2018 +0200
@@ -299,7 +299,7 @@
}
/***************************************************************/
-mlib_status mlib_ImageAffine(mlib_image *dst,
+JNIEXPORT mlib_status JNICALL mlib_ImageAffine(mlib_image *dst,
const mlib_image *src,
const mlib_d64 *mtx,
mlib_filter filter,
--- a/src/java.desktop/share/native/libmlib_image/mlib_ImageConvKernelConvert.c Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.desktop/share/native/libmlib_image/mlib_ImageConvKernelConvert.c Fri Apr 20 20:59:02 2018 +0200
@@ -78,7 +78,7 @@
#endif /* __sparc */
/***************************************************************/
-mlib_status mlib_ImageConvKernelConvert(mlib_s32 *ikernel,
+JNIEXPORT mlib_status JNICALL mlib_ImageConvKernelConvert(mlib_s32 *ikernel,
mlib_s32 *iscale,
const mlib_d64 *fkernel,
mlib_s32 m,
--- a/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN.c Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN.c Fri Apr 20 20:59:02 2018 +0200
@@ -90,7 +90,7 @@
#include "mlib_ImageConvEdge.h"
/***************************************************************/
-mlib_status mlib_ImageConvMxN(mlib_image *dst,
+JNIEXPORT mlib_status JNICALL mlib_ImageConvMxN(mlib_image *dst,
const mlib_image *src,
const mlib_s32 *kernel,
mlib_s32 m,
--- a/src/java.desktop/share/native/libmlib_image/mlib_c_ImageLookUp.c Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.desktop/share/native/libmlib_image/mlib_c_ImageLookUp.c Fri Apr 20 20:59:02 2018 +0200
@@ -78,7 +78,7 @@
#include "mlib_c_ImageLookUp.h"
/***************************************************************/
-mlib_status mlib_ImageLookUp(mlib_image *dst,
+JNIEXPORT mlib_status JNICALL mlib_ImageLookUp(mlib_image *dst,
const mlib_image *src,
const void **table)
{
--- a/src/java.desktop/share/native/libsplashscreen/splashscreen_impl.h Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.desktop/share/native/libsplashscreen/splashscreen_impl.h Fri Apr 20 20:59:02 2018 +0200
@@ -132,9 +132,6 @@
unsigned SplashTime();
char* SplashConvertStringAlloc(const char* in, int *size);
-jboolean SplashGetScaledImageName(const char* jarName,
- const char* fileName, float *scaleFactor,
- char *scaleImageName, const size_t scaledImageNameLength);
void SplashLock(Splash * splash);
void SplashUnlock(Splash * splash);
@@ -157,8 +154,7 @@
void SplashUpdateScreenData(Splash * splash);
void SplashCleanup(Splash * splash);
-void SplashSetScaleFactor(float scaleFactor);
-int SplashGetScaledImgNameMaxPstfixLen(const char *fileName);
+
void cleanUp(char *fName, char *xName, char *pctName, float *scaleFactor);
jboolean GetScaledImageName(const char *fileName, char *scaledImgName,
float *scaleFactor, const size_t scaledImageLength);
--- a/src/java.desktop/windows/native/libsplashscreen/splashscreen_sys.c Fri Apr 20 10:20:36 2018 +0200
+++ b/src/java.desktop/windows/native/libsplashscreen/splashscreen_sys.c Fri Apr 20 20:59:02 2018 +0200
@@ -574,7 +574,7 @@
PostMessage(splash->hWnd, WM_SPLASHRECONFIGURE, 0, 0);
}
-jboolean
+JNIEXPORT jboolean JNICALL
SplashGetScaledImageName(const char* jarName, const char* fileName,
float *scaleFactor, char *scaleImageName,
const size_t scaledImageLength)
--- a/src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/BinaryContainer.java Fri Apr 20 10:20:36 2018 +0200
+++ b/src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/BinaryContainer.java Fri Apr 20 20:59:02 2018 +0200
@@ -230,6 +230,8 @@
{"JVMCIRuntime::monitorenter", "_aot_jvmci_runtime_monitorenter"},
{"JVMCIRuntime::monitorexit", "_aot_jvmci_runtime_monitorexit"},
+ {"JVMCIRuntime::object_notify", "_aot_object_notify"},
+ {"JVMCIRuntime::object_notifyAll", "_aot_object_notifyAll"},
{"JVMCIRuntime::log_object", "_aot_jvmci_runtime_log_object"},
{"JVMCIRuntime::log_printf", "_aot_jvmci_runtime_log_printf"},
{"JVMCIRuntime::vm_message", "_aot_jvmci_runtime_vm_message"},
--- a/src/jdk.pack/share/native/unpack200/main.cpp Fri Apr 20 10:20:36 2018 +0200
+++ b/src/jdk.pack/share/native/unpack200/main.cpp Fri Apr 20 20:59:02 2018 +0200
@@ -59,7 +59,7 @@
#include "unpack.h"
-JNIEXPORT int JNICALL
+JNIEXPORT int
main(int argc, char **argv) {
return unpacker::run(argc, argv);
}
--- a/test/hotspot/jtreg/TEST.groups Fri Apr 20 10:20:36 2018 +0200
+++ b/test/hotspot/jtreg/TEST.groups Fri Apr 20 20:59:02 2018 +0200
@@ -70,7 +70,13 @@
hotspot_not_fast_compiler = \
:hotspot_compiler \
- -:tier1_compiler
+ -:tier1_compiler \
+ -:hotspot_slow_compiler
+
+hotspot_slow_compiler = \
+ compiler/codegen/aes \
+ compiler/codecache/stress \
+ compiler/gcbarriers/PreserveFPRegistersTest.java
tier1_compiler_1 = \
compiler/arraycopy/ \
@@ -102,9 +108,7 @@
compiler/integerArithmetic/ \
compiler/interpreter/ \
compiler/jvmci/ \
- -compiler/codegen/aes \
- -compiler/codecache/stress \
- -compiler/gcbarriers/PreserveFPRegistersTest.java
+ -:hotspot_slow_compiler
tier1_compiler_3 = \
compiler/intrinsics/ \
@@ -133,12 +137,21 @@
ctw_1 = \
applications/ctw/modules/ \
- -:ctw_2
+ -:ctw_2 \
+ -:ctw_3
ctw_2 = \
applications/ctw/modules/java_base.java \
applications/ctw/modules/java_desktop.java
+ctw_3 = \
+ applications/ctw/modules/javafx_graphics.java \
+ applications/ctw/modules/java_xml.java \
+ applications/ctw/modules/jdk_compiler.java \
+ applications/ctw/modules/jdk_internal_vm_compiler.java \
+ applications/ctw/modules/jdk_localedata.java \
+ applications/ctw/modules/jdk_scripting_nashorn.java \
+
tier1_gc = \
:tier1_gc_1 \
:tier1_gc_2 \
--- a/test/jdk/java/nio/channels/AsynchronousSocketChannel/Basic.java Fri Apr 20 10:20:36 2018 +0200
+++ b/test/jdk/java/nio/channels/AsynchronousSocketChannel/Basic.java Fri Apr 20 20:59:02 2018 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, 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
@@ -25,8 +25,8 @@
* @bug 4607272 6842687 6878369 6944810 7023403
* @summary Unit test for AsynchronousSocketChannel(use -Dseed=X to set PRNG seed)
* @library /test/lib
- * @build jdk.test.lib.RandomFactory
- * @run main Basic -skipSlowConnectTest
+ * @build jdk.test.lib.RandomFactory jdk.test.lib.Utils
+ * @run main/othervm/timeout=600 Basic -skipSlowConnectTest
* @key randomness intermittent
*/
@@ -79,11 +79,16 @@
private final InetSocketAddress address;
Server() throws IOException {
- ssc = ServerSocketChannel.open().bind(new InetSocketAddress(0));
+ this(0);
+ }
- InetAddress lh = InetAddress.getLocalHost();
- int port = ((InetSocketAddress)(ssc.getLocalAddress())).getPort();
- address = new InetSocketAddress(lh, port);
+ Server(int recvBufSize) throws IOException {
+ ssc = ServerSocketChannel.open();
+ if (recvBufSize > 0) {
+ ssc.setOption(SO_RCVBUF, recvBufSize);
+ }
+ ssc.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0));
+ address = (InetSocketAddress)ssc.getLocalAddress();
}
InetSocketAddress address() {
@@ -293,7 +298,7 @@
System.out.println("-- asynchronous close when reading --");
- try (Server server = new Server()) {
+ try (Server server = new Server(1)) {
ch = AsynchronousSocketChannel.open();
ch.connect(server.address()).get();
@@ -325,6 +330,8 @@
ch = AsynchronousSocketChannel.open();
ch.connect(server.address()).get();
+ SocketChannel peer = server.accept();
+ peer.setOption(SO_RCVBUF, 1);
final AtomicReference<Throwable> writeException =
new AtomicReference<Throwable>();
@@ -333,10 +340,13 @@
final AtomicInteger numCompleted = new AtomicInteger();
ch.write(genBuffer(), ch, new CompletionHandler<Integer,AsynchronousSocketChannel>() {
public void completed(Integer result, AsynchronousSocketChannel ch) {
+ System.out.println("completed write to async channel: " + result);
numCompleted.incrementAndGet();
ch.write(genBuffer(), ch, this);
+ System.out.println("started another write to async channel: " + result);
}
public void failed(Throwable x, AsynchronousSocketChannel ch) {
+ System.out.println("failed write to async channel");
writeException.set(x);
}
});
@@ -347,7 +357,8 @@
// the internal channel state indicates it is writing
int prevNumCompleted = numCompleted.get();
do {
- Thread.sleep(1000);
+ Thread.sleep((long)(1000 * jdk.test.lib.Utils.TIMEOUT_FACTOR));
+ System.out.println("check if buffer is filled up");
if (numCompleted.get() == prevNumCompleted) {
break;
}
@@ -357,14 +368,19 @@
// attempt a concurrent write -
// should fail with WritePendingException
try {
+ System.out.println("concurrent write to async channel");
ch.write(genBuffer());
+ System.out.format("prevNumCompleted: %d, numCompleted: %d%n",
+ prevNumCompleted, numCompleted.get());
throw new RuntimeException("WritePendingException expected");
} catch (WritePendingException x) {
}
// close channel - should cause initial write to complete
+ System.out.println("closing async channel...");
ch.close();
- server.accept().close();
+ System.out.println("closed async channel");
+ peer.close();
// wait for exception
while (writeException.get() == null) {