diff --git a/aarch64-b12tob21.patch b/aarch64-b12tob22.patch similarity index 76% rename from aarch64-b12tob21.patch rename to aarch64-b12tob22.patch index bd08f73..665545d 100644 --- a/aarch64-b12tob21.patch +++ b/aarch64-b12tob22.patch @@ -1,16 +1,21 @@ ---- jdk8/hotspot/make/hotspot_version 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/make/hotspot_version 2015-01-08 21:23:31.130149345 +0100 -@@ -35,7 +35,7 @@ +--- jdk8/hotspot/make/hotspot_version 2015-01-27 08:42:53.903819833 +0100 ++++ jdk8/hotspot/make/hotspot_version 2015-01-27 08:43:45.224625549 +0100 +@@ -31,11 +31,11 @@ + # + + # Don't put quotes (fail windows build). +-HOTSPOT_VM_COPYRIGHT=Copyright 2014 ++HOTSPOT_VM_COPYRIGHT=Copyright 2015 HS_MAJOR_VER=25 HS_MINOR_VER=40 -HS_BUILD_NUMBER=16 -+HS_BUILD_NUMBER=24 ++HS_BUILD_NUMBER=25 JDK_MAJOR_VER=1 JDK_MINOR_VER=8 ---- jdk8/hotspot/make/linux/makefiles/adjust-mflags.sh 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/make/linux/makefiles/adjust-mflags.sh 2015-01-08 21:23:31.144149009 +0100 +--- jdk8/hotspot/make/linux/makefiles/adjust-mflags.sh 2015-01-27 08:42:53.903819833 +0100 ++++ jdk8/hotspot/make/linux/makefiles/adjust-mflags.sh 2015-01-27 08:43:45.224625549 +0100 @@ -64,7 +64,7 @@ echo "$MFLAGS" \ | sed ' @@ -20,8 +25,8 @@ s/ -j[0-9][0-9]*/ -j/ s/ -j\([^ ]\)/ -j -\1/ s/ -j/ -j'${HOTSPOT_BUILD_JOBS:-${default_build_jobs}}'/ ---- jdk8/hotspot/make/linux/makefiles/mapfile-vers-debug 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/make/linux/makefiles/mapfile-vers-debug 2015-01-08 21:23:31.144149009 +0100 +--- jdk8/hotspot/make/linux/makefiles/mapfile-vers-debug 2015-01-27 08:42:53.903819833 +0100 ++++ jdk8/hotspot/make/linux/makefiles/mapfile-vers-debug 2015-01-27 08:43:45.225625525 +0100 @@ -217,6 +217,9 @@ JVM_RegisterSignal; JVM_ReleaseUTF; @@ -32,8 +37,8 @@ JVM_ResumeThread; JVM_Send; JVM_SendTo; ---- jdk8/hotspot/make/linux/makefiles/mapfile-vers-product 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/make/linux/makefiles/mapfile-vers-product 2015-01-08 21:23:31.144149009 +0100 +--- jdk8/hotspot/make/linux/makefiles/mapfile-vers-product 2015-01-27 08:42:53.903819833 +0100 ++++ jdk8/hotspot/make/linux/makefiles/mapfile-vers-product 2015-01-27 08:43:45.225625525 +0100 @@ -217,6 +217,9 @@ JVM_RegisterSignal; JVM_ReleaseUTF; @@ -44,8 +49,451 @@ JVM_ResumeThread; JVM_Send; JVM_SendTo; ---- jdk8/hotspot/src/share/vm/c1/c1_globals.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/c1/c1_globals.hpp 2015-01-08 21:23:31.144149009 +0100 +--- jdk8/hotspot/src/os/linux/vm/perfMemory_linux.cpp 2015-01-27 08:42:53.926819297 +0100 ++++ jdk8/hotspot/src/os/linux/vm/perfMemory_linux.cpp 2015-01-27 08:43:45.226625502 +0100 +@@ -197,7 +197,38 @@ + } + + +-// check if the given path is considered a secure directory for ++// Check if the given statbuf is considered a secure directory for ++// the backing store files. Returns true if the directory is considered ++// a secure location. Returns false if the statbuf is a symbolic link or ++// if an error occurred. ++// ++static bool is_statbuf_secure(struct stat *statp) { ++ if (S_ISLNK(statp->st_mode) || !S_ISDIR(statp->st_mode)) { ++ // The path represents a link or some non-directory file type, ++ // which is not what we expected. Declare it insecure. ++ // ++ return false; ++ } ++ // We have an existing directory, check if the permissions are safe. ++ // ++ if ((statp->st_mode & (S_IWGRP|S_IWOTH)) != 0) { ++ // The directory is open for writing and could be subjected ++ // to a symlink or a hard link attack. Declare it insecure. ++ // ++ return false; ++ } ++ // See if the uid of the directory matches the effective uid of the process. ++ // ++ if (statp->st_uid != geteuid()) { ++ // The directory was not created by this user, declare it insecure. ++ // ++ return false; ++ } ++ return true; ++} ++ ++ ++// Check if the given path is considered a secure directory for + // the backing store files. Returns true if the directory exists + // and is considered a secure location. Returns false if the path + // is a symbolic link or if an error occurred. +@@ -211,22 +242,180 @@ + return false; + } + +- // the path exists, now check it's mode +- if (S_ISLNK(statbuf.st_mode) || !S_ISDIR(statbuf.st_mode)) { +- // the path represents a link or some non-directory file type, +- // which is not what we expected. declare it insecure. ++ // The path exists, see if it is secure. ++ return is_statbuf_secure(&statbuf); ++} ++ ++ ++// Check if the given directory file descriptor is considered a secure ++// directory for the backing store files. Returns true if the directory ++// exists and is considered a secure location. Returns false if the path ++// is a symbolic link or if an error occurred. + // ++static bool is_dirfd_secure(int dir_fd) { ++ struct stat statbuf; ++ int result = 0; ++ ++ RESTARTABLE(::fstat(dir_fd, &statbuf), result); ++ if (result == OS_ERR) { + return false; + } +- else { +- // we have an existing directory, check if the permissions are safe. ++ ++ // The path exists, now check its mode. ++ return is_statbuf_secure(&statbuf); ++} ++ ++ ++// Check to make sure fd1 and fd2 are referencing the same file system object. + // +- if ((statbuf.st_mode & (S_IWGRP|S_IWOTH)) != 0) { +- // the directory is open for writing and could be subjected +- // to a symlnk attack. declare it insecure. ++static bool is_same_fsobject(int fd1, int fd2) { ++ struct stat statbuf1; ++ struct stat statbuf2; ++ int result = 0; ++ ++ RESTARTABLE(::fstat(fd1, &statbuf1), result); ++ if (result == OS_ERR) { ++ return false; ++ } ++ RESTARTABLE(::fstat(fd2, &statbuf2), result); ++ if (result == OS_ERR) { ++ return false; ++ } ++ ++ if ((statbuf1.st_ino == statbuf2.st_ino) && ++ (statbuf1.st_dev == statbuf2.st_dev)) { ++ return true; ++ } else { ++ return false; ++ } ++} ++ ++ ++// Open the directory of the given path and validate it. ++// Return a DIR * of the open directory. ++// ++static DIR *open_directory_secure(const char* dirname) { ++ // Open the directory using open() so that it can be verified ++ // to be secure by calling is_dirfd_secure(), opendir() and then check ++ // to see if they are the same file system object. This method does not ++ // introduce a window of opportunity for the directory to be attacked that ++ // calling opendir() and is_directory_secure() does. ++ int result; ++ DIR *dirp = NULL; ++ RESTARTABLE(::open(dirname, O_RDONLY|O_NOFOLLOW), result); ++ if (result == OS_ERR) { ++ if (PrintMiscellaneous && Verbose) { ++ if (errno == ELOOP) { ++ warning("directory %s is a symlink and is not secure\n", dirname); ++ } else { ++ warning("could not open directory %s: %s\n", dirname, strerror(errno)); ++ } ++ } ++ return dirp; ++ } ++ int fd = result; ++ ++ // Determine if the open directory is secure. ++ if (!is_dirfd_secure(fd)) { ++ // The directory is not a secure directory. ++ os::close(fd); ++ return dirp; ++ } ++ ++ // Open the directory. ++ dirp = ::opendir(dirname); ++ if (dirp == NULL) { ++ // The directory doesn't exist, close fd and return. ++ os::close(fd); ++ return dirp; ++ } ++ ++ // Check to make sure fd and dirp are referencing the same file system object. ++ if (!is_same_fsobject(fd, dirfd(dirp))) { ++ // The directory is not secure. ++ os::close(fd); ++ os::closedir(dirp); ++ dirp = NULL; ++ return dirp; ++ } ++ ++ // Close initial open now that we know directory is secure ++ os::close(fd); ++ ++ return dirp; ++} ++ ++// NOTE: The code below uses fchdir(), open() and unlink() because ++// fdopendir(), openat() and unlinkat() are not supported on all ++// versions. Once the support for fdopendir(), openat() and unlinkat() ++// is available on all supported versions the code can be changed ++// to use these functions. ++ ++// Open the directory of the given path, validate it and set the ++// current working directory to it. ++// Return a DIR * of the open directory and the saved cwd fd. + // ++static DIR *open_directory_secure_cwd(const char* dirname, int *saved_cwd_fd) { ++ ++ // Open the directory. ++ DIR* dirp = open_directory_secure(dirname); ++ if (dirp == NULL) { ++ // Directory doesn't exist or is insecure, so there is nothing to cleanup. ++ return dirp; ++ } ++ int fd = dirfd(dirp); ++ ++ // Open a fd to the cwd and save it off. ++ int result; ++ RESTARTABLE(::open(".", O_RDONLY), result); ++ if (result == OS_ERR) { ++ *saved_cwd_fd = -1; ++ } else { ++ *saved_cwd_fd = result; ++ } ++ ++ // Set the current directory to dirname by using the fd of the directory. ++ result = fchdir(fd); ++ ++ return dirp; ++} ++ ++// Close the directory and restore the current working directory. ++// ++static void close_directory_secure_cwd(DIR* dirp, int saved_cwd_fd) { ++ ++ int result; ++ // If we have a saved cwd change back to it and close the fd. ++ if (saved_cwd_fd != -1) { ++ result = fchdir(saved_cwd_fd); ++ ::close(saved_cwd_fd); ++ } ++ ++ // Close the directory. ++ os::closedir(dirp); ++} ++ ++// Check if the given file descriptor is considered a secure. ++// ++static bool is_file_secure(int fd, const char *filename) { ++ ++ int result; ++ struct stat statbuf; ++ ++ // Determine if the file is secure. ++ RESTARTABLE(::fstat(fd, &statbuf), result); ++ if (result == OS_ERR) { ++ if (PrintMiscellaneous && Verbose) { ++ warning("fstat failed on %s: %s\n", filename, strerror(errno)); ++ } + return false; + } ++ if (statbuf.st_nlink > 1) { ++ // A file with multiple links is not expected. ++ if (PrintMiscellaneous && Verbose) { ++ warning("file %s has multiple links\n", filename); ++ } ++ return false; + } + return true; + } +@@ -317,9 +506,11 @@ + + const char* tmpdirname = os::get_temp_directory(); + ++ // open the temp directory + DIR* tmpdirp = os::opendir(tmpdirname); + + if (tmpdirp == NULL) { ++ // Cannot open the directory to get the user name, return. + return NULL; + } + +@@ -344,7 +535,8 @@ + strcat(usrdir_name, "/"); + strcat(usrdir_name, dentry->d_name); + +- DIR* subdirp = os::opendir(usrdir_name); ++ // open the user directory ++ DIR* subdirp = open_directory_secure(usrdir_name); + + if (subdirp == NULL) { + FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal); +@@ -465,26 +657,6 @@ + } + + +-// remove file +-// +-// this method removes the file with the given file name in the +-// named directory. +-// +-static void remove_file(const char* dirname, const char* filename) { +- +- size_t nbytes = strlen(dirname) + strlen(filename) + 2; +- char* path = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal); +- +- strcpy(path, dirname); +- strcat(path, "/"); +- strcat(path, filename); +- +- remove_file(path); +- +- FREE_C_HEAP_ARRAY(char, path, mtInternal); +-} +- +- + // cleanup stale shared memory resources + // + // This method attempts to remove all stale shared memory files in +@@ -496,16 +668,11 @@ + // + static void cleanup_sharedmem_resources(const char* dirname) { + +- // open the user temp directory +- DIR* dirp = os::opendir(dirname); +- ++ int saved_cwd_fd; ++ // open the directory ++ DIR* dirp = open_directory_secure_cwd(dirname, &saved_cwd_fd); + if (dirp == NULL) { +- // directory doesn't exist, so there is nothing to cleanup +- return; +- } +- +- if (!is_directory_secure(dirname)) { +- // the directory is not a secure directory ++ // directory doesn't exist or is insecure, so there is nothing to cleanup + return; + } + +@@ -527,9 +695,8 @@ + if (pid == 0) { + + if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0) { +- + // attempt to remove all unexpected files, except "." and ".." +- remove_file(dirname, entry->d_name); ++ unlink(entry->d_name); + } + + errno = 0; +@@ -551,12 +718,14 @@ + // + if ((pid == os::current_process_id()) || + (kill(pid, 0) == OS_ERR && (errno == ESRCH || errno == EPERM))) { +- +- remove_file(dirname, entry->d_name); ++ unlink(entry->d_name); + } + errno = 0; + } +- os::closedir(dirp); ++ ++ // close the directory and reset the current working directory ++ close_directory_secure_cwd(dirp, saved_cwd_fd); ++ + FREE_C_HEAP_ARRAY(char, dbuf, mtInternal); + } + +@@ -613,19 +782,54 @@ + return -1; + } + +- int result; ++ int saved_cwd_fd; ++ // open the directory and set the current working directory to it ++ DIR* dirp = open_directory_secure_cwd(dirname, &saved_cwd_fd); ++ if (dirp == NULL) { ++ // Directory doesn't exist or is insecure, so cannot create shared ++ // memory file. ++ return -1; ++ } + +- RESTARTABLE(::open(filename, O_RDWR|O_CREAT|O_TRUNC, S_IREAD|S_IWRITE), result); ++ // Open the filename in the current directory. ++ // Cannot use O_TRUNC here; truncation of an existing file has to happen ++ // after the is_file_secure() check below. ++ int result; ++ RESTARTABLE(::open(filename, O_RDWR|O_CREAT|O_NOFOLLOW, S_IREAD|S_IWRITE), result); + if (result == OS_ERR) { + if (PrintMiscellaneous && Verbose) { ++ if (errno == ELOOP) { ++ warning("file %s is a symlink and is not secure\n", filename); ++ } else { + warning("could not create file %s: %s\n", filename, strerror(errno)); + } ++ } ++ // close the directory and reset the current working directory ++ close_directory_secure_cwd(dirp, saved_cwd_fd); ++ + return -1; + } ++ // close the directory and reset the current working directory ++ close_directory_secure_cwd(dirp, saved_cwd_fd); + + // save the file descriptor + int fd = result; + ++ // check to see if the file is secure ++ if (!is_file_secure(fd, filename)) { ++ ::close(fd); ++ return -1; ++ } ++ ++ // truncate the file to get rid of any existing data ++ RESTARTABLE(::ftruncate(fd, (off_t)0), result); ++ if (result == OS_ERR) { ++ if (PrintMiscellaneous && Verbose) { ++ warning("could not truncate shared memory file: %s\n", strerror(errno)); ++ } ++ ::close(fd); ++ return -1; ++ } + // set the file size + RESTARTABLE(::ftruncate(fd, (off_t)size), result); + if (result == OS_ERR) { +@@ -683,8 +887,15 @@ + THROW_MSG_(vmSymbols::java_io_IOException(), strerror(errno), OS_ERR); + } + } ++ int fd = result; + +- return result; ++ // check to see if the file is secure ++ if (!is_file_secure(fd, filename)) { ++ ::close(fd); ++ return -1; ++ } ++ ++ return fd; + } + + // create a named shared memory region. returns the address of the +@@ -715,6 +926,13 @@ + + char* dirname = get_user_tmp_dir(user_name); + char* filename = get_sharedmem_filename(dirname, vmid); ++ // get the short filename ++ char* short_filename = strrchr(filename, '/'); ++ if (short_filename == NULL) { ++ short_filename = filename; ++ } else { ++ short_filename++; ++ } + + // cleanup any stale shared memory files + cleanup_sharedmem_resources(dirname); +@@ -722,7 +940,7 @@ + assert(((size > 0) && (size % os::vm_page_size() == 0)), + "unexpected PerfMemory region size"); + +- fd = create_sharedmem_resources(dirname, filename, size); ++ fd = create_sharedmem_resources(dirname, short_filename, size); + + FREE_C_HEAP_ARRAY(char, user_name, mtInternal); + FREE_C_HEAP_ARRAY(char, dirname, mtInternal); +@@ -837,12 +1055,12 @@ + // constructs for the file and the shared memory mapping. + if (mode == PerfMemory::PERF_MODE_RO) { + mmap_prot = PROT_READ; +- file_flags = O_RDONLY; ++ file_flags = O_RDONLY | O_NOFOLLOW; + } + else if (mode == PerfMemory::PERF_MODE_RW) { + #ifdef LATER + mmap_prot = PROT_READ | PROT_WRITE; +- file_flags = O_RDWR; ++ file_flags = O_RDWR | O_NOFOLLOW; + #else + THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), + "Unsupported access mode"); +--- jdk8/hotspot/src/share/vm/c1/c1_globals.hpp 2015-01-27 08:42:53.977818111 +0100 ++++ jdk8/hotspot/src/share/vm/c1/c1_globals.hpp 2015-01-27 08:43:45.226625502 +0100 @@ -290,9 +290,6 @@ develop(bool, InstallMethods, true, \ "Install methods at the end of successful compilations") \ @@ -56,8 +504,21 @@ develop(intx, NMethodSizeLimit, (64*K)*wordSize, \ "Maximum size of a compiled method.") \ \ ---- jdk8/hotspot/src/share/vm/ci/ciEnv.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/ci/ciEnv.cpp 2015-01-08 21:23:31.145148985 +0100 +--- jdk8/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp 2015-01-27 08:42:53.977818111 +0100 ++++ jdk8/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp 2015-01-27 08:43:45.227625479 +0100 +@@ -89,8 +89,8 @@ + public: + ArgumentMap *_vars; + ArgumentMap *_stack; +- short _stack_height; +- short _max_stack; ++ int _stack_height; ++ int _max_stack; + bool _initialized; + ArgumentMap empty_map; + +--- jdk8/hotspot/src/share/vm/ci/ciEnv.cpp 2015-01-27 08:42:53.977818111 +0100 ++++ jdk8/hotspot/src/share/vm/ci/ciEnv.cpp 2015-01-27 08:43:45.227625479 +0100 @@ -559,8 +559,13 @@ oop obj = cpool->resolved_references()->obj_at(cache_index); if (obj != NULL) { @@ -85,8 +546,8 @@ } else if (tag.is_klass() || tag.is_unresolved_klass()) { // 4881222: allow ldc to take a class type ciKlass* klass = get_klass_by_index_impl(cpool, index, ignore_will_link, accessor); ---- jdk8/hotspot/src/share/vm/ci/ciMethod.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/ci/ciMethod.cpp 2015-01-08 21:23:31.148148913 +0100 +--- jdk8/hotspot/src/share/vm/ci/ciMethod.cpp 2015-01-27 08:42:53.978818087 +0100 ++++ jdk8/hotspot/src/share/vm/ci/ciMethod.cpp 2015-01-27 08:43:45.228625455 +0100 @@ -68,7 +68,10 @@ // ciMethod::ciMethod // @@ -107,8 +568,8 @@ ciSymbol* sig_symbol = env->get_symbol(h_m()->signature()); constantPoolHandle cpool = h_m()->constants(); _signature = new (env->arena()) ciSignature(_holder, cpool, sig_symbol); ---- jdk8/hotspot/src/share/vm/ci/ciMethod.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/ci/ciMethod.hpp 2015-01-08 21:23:31.148148913 +0100 +--- jdk8/hotspot/src/share/vm/ci/ciMethod.hpp 2015-01-27 08:42:53.978818087 +0100 ++++ jdk8/hotspot/src/share/vm/ci/ciMethod.hpp 2015-01-27 08:43:45.228625455 +0100 @@ -90,7 +90,7 @@ BCEscapeAnalyzer* _bcea; #endif @@ -118,8 +579,8 @@ ciMethod(ciInstanceKlass* holder, ciSymbol* name, ciSymbol* signature, ciInstanceKlass* accessor); Method* get_Method() const { ---- jdk8/hotspot/src/share/vm/ci/ciObjectFactory.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/ci/ciObjectFactory.cpp 2015-01-08 21:23:31.148148913 +0100 +--- jdk8/hotspot/src/share/vm/ci/ciObjectFactory.cpp 2015-01-27 08:42:53.978818087 +0100 ++++ jdk8/hotspot/src/share/vm/ci/ciObjectFactory.cpp 2015-01-27 08:43:45.229625432 +0100 @@ -239,7 +239,7 @@ ciObject* ciObjectFactory::get(oop key) { ASSERT_IN_VM; @@ -129,6 +590,20 @@ NonPermObject* &bucket = find_non_perm(key); if (bucket != NULL) { +@@ -260,10 +260,10 @@ + } + + // ------------------------------------------------------------------ +-// ciObjectFactory::get ++// ciObjectFactory::get_metadata + // +-// Get the ciObject corresponding to some oop. If the ciObject has +-// already been created, it is returned. Otherwise, a new ciObject ++// Get the ciMetadata corresponding to some Metadata. If the ciMetadata has ++// already been created, it is returned. Otherwise, a new ciMetadata + // is created. + ciMetadata* ciObjectFactory::get_metadata(Metadata* key) { + ASSERT_IN_VM; @@ -290,9 +290,9 @@ } #endif @@ -203,8 +678,8 @@ ciMetadata* klass = get_metadata(key->klass()); NonPermObject* *bp = &_non_perm_bucket[(unsigned) klass->hash() % NON_PERM_BUCKETS]; for (NonPermObject* p; (p = (*bp)) != NULL; bp = &p->next()) { ---- jdk8/hotspot/src/share/vm/ci/ciObjectFactory.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/ci/ciObjectFactory.hpp 2015-01-08 21:23:31.148148913 +0100 +--- jdk8/hotspot/src/share/vm/ci/ciObjectFactory.hpp 2015-01-27 08:42:53.978818087 +0100 ++++ jdk8/hotspot/src/share/vm/ci/ciObjectFactory.hpp 2015-01-27 08:43:45.229625432 +0100 @@ -73,7 +73,7 @@ void insert(int index, ciMetadata* obj, GrowableArray* objects); @@ -214,8 +689,8 @@ void ensure_metadata_alive(ciMetadata* m); ---- jdk8/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2015-01-08 21:23:31.149148889 +0100 +--- jdk8/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2015-01-27 08:42:53.978818087 +0100 ++++ jdk8/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2015-01-27 08:43:45.230625409 +0100 @@ -35,6 +35,7 @@ #include "interpreter/bytecode.hpp" #include "interpreter/bytecodes.hpp" @@ -242,8 +717,8 @@ // Too many basic blocks. Bail out. // This can happen when try/finally constructs are nested to depth N, // and there is O(2**N) cloning of jsr bodies. See bug 4697245! ---- jdk8/hotspot/src/share/vm/classfile/classFileParser.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/classFileParser.cpp 2015-01-08 21:23:31.150148864 +0100 +--- jdk8/hotspot/src/share/vm/classfile/classFileParser.cpp 2015-01-27 08:42:53.979818064 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/classFileParser.cpp 2015-01-27 08:43:45.231625386 +0100 @@ -2529,7 +2529,7 @@ Array* ClassFileParser::parse_methods(bool is_interface, AccessFlags* promoted_flags, @@ -392,8 +867,8 @@ clear_class_metadata(); ---- jdk8/hotspot/src/share/vm/classfile/classFileParser.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/classFileParser.hpp 2015-01-08 21:23:31.150148864 +0100 +--- jdk8/hotspot/src/share/vm/classfile/classFileParser.hpp 2015-01-27 08:42:53.979818064 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/classFileParser.hpp 2015-01-27 08:43:45.232625362 +0100 @@ -75,6 +75,7 @@ Array* _inner_classes; Array* _local_interfaces; @@ -428,8 +903,8 @@ TRAPS); intArray* sort_methods(Array* methods); ---- jdk8/hotspot/src/share/vm/classfile/classLoader.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/classLoader.cpp 2015-01-08 21:23:31.151148840 +0100 +--- jdk8/hotspot/src/share/vm/classfile/classLoader.cpp 2015-01-27 08:42:53.979818064 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/classLoader.cpp 2015-01-27 08:43:45.232625362 +0100 @@ -610,7 +610,7 @@ } #endif @@ -463,8 +938,8 @@ } } ---- jdk8/hotspot/src/share/vm/classfile/classLoaderData.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/classLoaderData.cpp 2015-01-08 21:23:31.151148840 +0100 +--- jdk8/hotspot/src/share/vm/classfile/classLoaderData.cpp 2015-01-27 08:42:53.979818064 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/classLoaderData.cpp 2015-01-27 08:43:45.233625339 +0100 @@ -747,7 +746,7 @@ // Move class loader data from main list to the unloaded list for unloading @@ -551,8 +1026,8 @@ -#endif /* INCLUDE_TRACE */ +#endif // INCLUDE_TRACE ---- jdk8/hotspot/src/share/vm/classfile/classLoaderData.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/classLoaderData.hpp 2015-01-08 21:23:31.151148840 +0100 +--- jdk8/hotspot/src/share/vm/classfile/classLoaderData.hpp 2015-01-27 08:42:53.979818064 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/classLoaderData.hpp 2015-01-27 08:43:45.234625316 +0100 @@ -31,6 +31,7 @@ #include "memory/metaspaceCounters.hpp" #include "runtime/mutex.hpp" @@ -587,8 +1062,8 @@ static void dump_on(outputStream * const out) PRODUCT_RETURN; static void dump() { dump_on(tty); } static void verify(); ---- jdk8/hotspot/src/share/vm/classfile/classLoaderExt.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/classLoaderExt.hpp 2015-01-08 21:23:31.151148840 +0100 +--- jdk8/hotspot/src/share/vm/classfile/classLoaderExt.hpp 2015-01-27 08:42:53.979818064 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/classLoaderExt.hpp 2015-01-27 08:43:45.234625316 +0100 @@ -63,7 +63,19 @@ ClassPathEntry* new_entry) { ClassLoader::add_to_list(new_entry); @@ -609,8 +1084,8 @@ }; #endif // SHARE_VM_CLASSFILE_CLASSLOADEREXT_HPP ---- jdk8/hotspot/src/share/vm/classfile/classLoader.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/classLoader.hpp 2015-01-08 21:23:31.151148840 +0100 +--- jdk8/hotspot/src/share/vm/classfile/classLoader.hpp 2015-01-27 08:42:53.979818064 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/classLoader.hpp 2015-01-27 08:43:45.233625339 +0100 @@ -129,8 +129,8 @@ bool _has_error; bool _throw_exception; @@ -641,8 +1116,8 @@ #if INCLUDE_CDS // Sharing dump and restore static void copy_package_info_buckets(char** top, char* end); ---- jdk8/hotspot/src/share/vm/classfile/dictionary.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/dictionary.cpp 2015-01-08 21:23:31.152148816 +0100 +--- jdk8/hotspot/src/share/vm/classfile/dictionary.cpp 2015-01-27 08:42:53.979818064 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/dictionary.cpp 2015-01-27 08:43:45.234625316 +0100 @@ -223,7 +223,7 @@ } free_entry(probe); @@ -652,8 +1127,8 @@ continue; } ---- jdk8/hotspot/src/share/vm/classfile/javaClasses.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/javaClasses.cpp 2015-01-08 21:23:31.152148816 +0100 +--- jdk8/hotspot/src/share/vm/classfile/javaClasses.cpp 2015-01-27 08:42:53.980818041 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/javaClasses.cpp 2015-01-27 08:43:45.235625293 +0100 @@ -41,6 +41,7 @@ #include "oops/method.hpp" #include "oops/symbol.hpp" @@ -701,8 +1176,8 @@ } #endif // INCLUDE_JVMTI ---- jdk8/hotspot/src/share/vm/classfile/javaClasses.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/javaClasses.hpp 2015-01-08 21:23:31.153148792 +0100 +--- jdk8/hotspot/src/share/vm/classfile/javaClasses.hpp 2015-01-27 08:42:53.980818041 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/javaClasses.hpp 2015-01-27 08:43:45.236625269 +0100 @@ -1096,7 +1096,8 @@ static Metadata* vmtarget(oop mname); static void set_vmtarget(oop mname, Metadata* target); @@ -722,8 +1197,8 @@ // Relevant integer codes (keep these in synch. with MethodHandleNatives.Constants): enum { MN_IS_METHOD = 0x00010000, // method (not constructor) ---- jdk8/hotspot/src/share/vm/classfile/metadataOnStackMark.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/metadataOnStackMark.cpp 2015-01-08 21:23:31.153148792 +0100 +--- jdk8/hotspot/src/share/vm/classfile/metadataOnStackMark.cpp 2015-01-27 08:42:53.980818041 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/metadataOnStackMark.cpp 2015-01-27 08:43:45.236625269 +0100 @@ -31,25 +31,23 @@ #include "runtime/synchronizer.hpp" #include "runtime/thread.hpp" @@ -855,8 +1330,8 @@ + + buffer->push(m); } ---- jdk8/hotspot/src/share/vm/classfile/metadataOnStackMark.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/metadataOnStackMark.hpp 2015-01-08 21:23:31.153148792 +0100 +--- jdk8/hotspot/src/share/vm/classfile/metadataOnStackMark.hpp 2015-01-27 08:42:53.980818041 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/metadataOnStackMark.hpp 2015-01-27 08:43:45.237625246 +0100 @@ -26,9 +26,12 @@ #define SHARE_VM_CLASSFILE_METADATAONSTACKMARK_HPP @@ -893,8 +1368,8 @@ }; #endif // SHARE_VM_CLASSFILE_METADATAONSTACKMARK_HPP ---- jdk8/hotspot/src/share/vm/classfile/systemDictionary.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/systemDictionary.cpp 2015-01-08 21:23:31.153148792 +0100 +--- jdk8/hotspot/src/share/vm/classfile/systemDictionary.cpp 2015-01-27 08:42:53.980818041 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/systemDictionary.cpp 2015-01-27 08:43:45.238625223 +0100 @@ -1691,9 +1690,9 @@ // Assumes classes in the SystemDictionary are only unloaded at a safepoint @@ -907,7 +1382,21 @@ if (unloading_occurred) { dictionary()->do_unloading(); constraints()->purge_loader_constraints(); -@@ -2664,7 +2663,7 @@ +@@ -1908,11 +1907,12 @@ + InstanceKlass::cast(WK_KLASS(Reference_klass))->set_reference_type(REF_OTHER); + InstanceRefKlass::update_nonstatic_oop_maps(WK_KLASS(Reference_klass)); + +- initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(PhantomReference_klass), scan, CHECK); ++ initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Cleaner_klass), scan, CHECK); + InstanceKlass::cast(WK_KLASS(SoftReference_klass))->set_reference_type(REF_SOFT); + InstanceKlass::cast(WK_KLASS(WeakReference_klass))->set_reference_type(REF_WEAK); + InstanceKlass::cast(WK_KLASS(FinalReference_klass))->set_reference_type(REF_FINAL); + InstanceKlass::cast(WK_KLASS(PhantomReference_klass))->set_reference_type(REF_PHANTOM); ++ InstanceKlass::cast(WK_KLASS(Cleaner_klass))->set_reference_type(REF_CLEANER); + + // JSR 292 classes + WKID jsr292_group_start = WK_KLASS_ENUM_NAME(MethodHandle_klass); +@@ -2664,7 +2664,7 @@ class_loader->klass() : (Klass*)NULL); event.commit(); } @@ -916,9 +1405,17 @@ } #ifndef PRODUCT ---- jdk8/hotspot/src/share/vm/classfile/systemDictionary.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/systemDictionary.hpp 2015-01-08 21:23:31.154148768 +0100 -@@ -175,6 +175,8 @@ +--- jdk8/hotspot/src/share/vm/classfile/systemDictionary.hpp 2015-01-27 08:42:53.980818041 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/systemDictionary.hpp 2015-01-27 08:43:45.238625223 +0100 +@@ -128,6 +128,7 @@ + do_klass(WeakReference_klass, java_lang_ref_WeakReference, Pre ) \ + do_klass(FinalReference_klass, java_lang_ref_FinalReference, Pre ) \ + do_klass(PhantomReference_klass, java_lang_ref_PhantomReference, Pre ) \ ++ do_klass(Cleaner_klass, sun_misc_Cleaner, Pre ) \ + do_klass(Finalizer_klass, java_lang_ref_Finalizer, Pre ) \ + \ + do_klass(Thread_klass, java_lang_Thread, Pre ) \ +@@ -175,6 +176,8 @@ do_klass(URL_klass, java_net_URL, Pre ) \ do_klass(Jar_Manifest_klass, java_util_jar_Manifest, Pre ) \ do_klass(sun_misc_Launcher_klass, sun_misc_Launcher, Pre ) \ @@ -927,7 +1424,7 @@ do_klass(CodeSource_klass, java_security_CodeSource, Pre ) \ \ /* It's NULL in non-1.4 JDKs. */ \ -@@ -339,7 +341,7 @@ +@@ -339,7 +342,7 @@ // Unload (that is, break root links to) all unmarked classes and // loaders. Returns "true" iff something was unloaded. @@ -936,9 +1433,138 @@ // Used by DumpSharedSpaces only to remove classes that failed verification static void remove_classes_in_error_state(); ---- jdk8/hotspot/src/share/vm/classfile/vmSymbols.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/classfile/vmSymbols.hpp 2015-01-08 21:23:31.154148768 +0100 -@@ -116,6 +116,7 @@ +--- jdk8/hotspot/src/share/vm/classfile/verifier.cpp 2015-01-27 08:42:53.980818041 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/verifier.cpp 2015-01-27 08:43:45.239625200 +0100 +@@ -1556,14 +1556,14 @@ + case Bytecodes::_invokespecial : + case Bytecodes::_invokestatic : + verify_invoke_instructions( +- &bcs, code_length, ¤t_frame, +- &this_uninit, return_type, cp, CHECK_VERIFY(this)); ++ &bcs, code_length, ¤t_frame, (bci >= ex_min && bci < ex_max), ++ &this_uninit, return_type, cp, &stackmap_table, CHECK_VERIFY(this)); + no_control_flow = false; break; + case Bytecodes::_invokeinterface : + case Bytecodes::_invokedynamic : + verify_invoke_instructions( +- &bcs, code_length, ¤t_frame, +- &this_uninit, return_type, cp, CHECK_VERIFY(this)); ++ &bcs, code_length, ¤t_frame, (bci >= ex_min && bci < ex_max), ++ &this_uninit, return_type, cp, &stackmap_table, CHECK_VERIFY(this)); + no_control_flow = false; break; + case Bytecodes::_new : + { +@@ -2411,8 +2411,9 @@ + + void ClassVerifier::verify_invoke_init( + RawBytecodeStream* bcs, u2 ref_class_index, VerificationType ref_class_type, +- StackMapFrame* current_frame, u4 code_length, bool *this_uninit, +- constantPoolHandle cp, TRAPS) { ++ StackMapFrame* current_frame, u4 code_length, bool in_try_block, ++ bool *this_uninit, constantPoolHandle cp, StackMapTable* stackmap_table, ++ TRAPS) { + u2 bci = bcs->bci(); + VerificationType type = current_frame->pop_stack( + VerificationType::reference_check(), CHECK_VERIFY(this)); +@@ -2428,9 +2429,10 @@ + return; + } + +- // Check if this call is done from inside of a TRY block. If so, make +- // sure that all catch clause paths end in a throw. Otherwise, this +- // can result in returning an incomplete object. ++ // If this invokespecial call is done from inside of a TRY block then make ++ // sure that all catch clause paths end in a throw. Otherwise, this can ++ // result in returning an incomplete object. ++ if (in_try_block) { + ExceptionTable exhandlers(_method()); + int exlength = exhandlers.length(); + for(int i = 0; i < exlength; i++) { +@@ -2451,6 +2453,13 @@ + } + } + ++ // Check the exception handler target stackmaps with the locals from the ++ // incoming stackmap (before initialize_object() changes them to outgoing ++ // state). ++ verify_exception_handler_targets(bci, true, current_frame, ++ stackmap_table, CHECK_VERIFY(this)); ++ } // in_try_block ++ + current_frame->initialize_object(type, current_type()); + *this_uninit = true; + } else if (type.is_uninitialized()) { +@@ -2503,6 +2512,13 @@ + } + } + } ++ // Check the exception handler target stackmaps with the locals from the ++ // incoming stackmap (before initialize_object() changes them to outgoing ++ // state). ++ if (in_try_block) { ++ verify_exception_handler_targets(bci, *this_uninit, current_frame, ++ stackmap_table, CHECK_VERIFY(this)); ++ } + current_frame->initialize_object(type, new_class_type); + } else { + verify_error(ErrorContext::bad_type(bci, current_frame->stack_top_ctx()), +@@ -2531,8 +2547,8 @@ + + void ClassVerifier::verify_invoke_instructions( + RawBytecodeStream* bcs, u4 code_length, StackMapFrame* current_frame, +- bool *this_uninit, VerificationType return_type, +- constantPoolHandle cp, TRAPS) { ++ bool in_try_block, bool *this_uninit, VerificationType return_type, ++ constantPoolHandle cp, StackMapTable* stackmap_table, TRAPS) { + // Make sure the constant pool item is the right type + u2 index = bcs->get_index_u2(); + Bytecodes::Code opcode = bcs->raw_code(); +@@ -2702,7 +2718,8 @@ + opcode != Bytecodes::_invokedynamic) { + if (method_name == vmSymbols::object_initializer_name()) { // method + verify_invoke_init(bcs, index, ref_class_type, current_frame, +- code_length, this_uninit, cp, CHECK_VERIFY(this)); ++ code_length, in_try_block, this_uninit, cp, stackmap_table, ++ CHECK_VERIFY(this)); + } else { // other methods + // Ensures that target class is assignable to method class. + if (opcode == Bytecodes::_invokespecial) { +--- jdk8/hotspot/src/share/vm/classfile/verifier.hpp 2015-01-27 08:42:53.981818018 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/verifier.hpp 2015-01-27 08:43:45.240625176 +0100 +@@ -301,8 +301,9 @@ + + void verify_invoke_init( + RawBytecodeStream* bcs, u2 ref_index, VerificationType ref_class_type, +- StackMapFrame* current_frame, u4 code_length, bool* this_uninit, +- constantPoolHandle cp, TRAPS); ++ StackMapFrame* current_frame, u4 code_length, bool in_try_block, ++ bool* this_uninit, constantPoolHandle cp, StackMapTable* stackmap_table, ++ TRAPS); + + // Used by ends_in_athrow() to push all handlers that contain bci onto + // the handler_stack, if the handler is not already on the stack. +@@ -316,8 +317,8 @@ + + void verify_invoke_instructions( + RawBytecodeStream* bcs, u4 code_length, StackMapFrame* current_frame, +- bool* this_uninit, VerificationType return_type, +- constantPoolHandle cp, TRAPS); ++ bool in_try_block, bool* this_uninit, VerificationType return_type, ++ constantPoolHandle cp, StackMapTable* stackmap_table, TRAPS); + + VerificationType get_newarray_type(u2 index, u2 bci, TRAPS); + void verify_anewarray(u2 bci, u2 index, constantPoolHandle cp, +--- jdk8/hotspot/src/share/vm/classfile/vmSymbols.hpp 2015-01-27 08:42:53.981818018 +0100 ++++ jdk8/hotspot/src/share/vm/classfile/vmSymbols.hpp 2015-01-27 08:43:45.240625176 +0100 +@@ -79,6 +79,7 @@ + template(java_lang_ref_WeakReference, "java/lang/ref/WeakReference") \ + template(java_lang_ref_FinalReference, "java/lang/ref/FinalReference") \ + template(java_lang_ref_PhantomReference, "java/lang/ref/PhantomReference") \ ++ template(sun_misc_Cleaner, "sun/misc/Cleaner") \ + template(java_lang_ref_Finalizer, "java/lang/ref/Finalizer") \ + template(java_lang_reflect_AccessibleObject, "java/lang/reflect/AccessibleObject") \ + template(java_lang_reflect_Method, "java/lang/reflect/Method") \ +@@ -116,6 +117,7 @@ template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \ template(getBootClassPathEntryForClass_name, "getBootClassPathEntryForClass") \ template(sun_misc_PostVMInitHook, "sun/misc/PostVMInitHook") \ @@ -946,18 +1572,52 @@ template(sun_misc_Launcher_ExtClassLoader, "sun/misc/Launcher$ExtClassLoader") \ \ /* Java runtime version access */ \ ---- jdk8/hotspot/src/share/vm/code/dependencies.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/code/dependencies.cpp 2015-01-08 21:23:31.154148768 +0100 -@@ -879,6 +879,8 @@ +--- jdk8/hotspot/src/share/vm/code/dependencies.cpp 2015-01-27 08:42:53.981818018 +0100 ++++ jdk8/hotspot/src/share/vm/code/dependencies.cpp 2015-01-27 08:43:45.241625153 +0100 +@@ -560,7 +560,7 @@ + put_star = !Dependencies::is_concrete_klass((Klass*)arg.metadata_value()); + } else if (arg.is_method()) { + what = "method "; +- put_star = !Dependencies::is_concrete_method((Method*)arg.metadata_value()); ++ put_star = !Dependencies::is_concrete_method((Method*)arg.metadata_value(), NULL); + } else if (arg.is_klass()) { + what = "class "; + } else { +@@ -845,8 +845,8 @@ + // Static methods don't override non-static so punt + return true; + } +- if ( !Dependencies::is_concrete_method(lm) +- && !Dependencies::is_concrete_method(m) ++ if ( !Dependencies::is_concrete_method(lm, k) ++ && !Dependencies::is_concrete_method(m, ctxk) + && lm->method_holder()->is_subtype_of(m->method_holder())) + // Method m is overridden by lm, but both are non-concrete. + return true; +@@ -879,9 +879,20 @@ bool is_witness(Klass* k) { if (doing_subtype_search()) { return Dependencies::is_concrete_klass(k); + } else if (!k->oop_is_instance()) { + return false; // no methods to find in an array type } else { - Method* m = InstanceKlass::cast(k)->find_method(_name, _signature); - if (m == NULL || !Dependencies::is_concrete_method(m)) return false; -@@ -1085,7 +1087,7 @@ +- Method* m = InstanceKlass::cast(k)->find_method(_name, _signature); +- if (m == NULL || !Dependencies::is_concrete_method(m)) return false; ++ // Search class hierarchy first. ++ Method* m = InstanceKlass::cast(k)->find_instance_method(_name, _signature); ++ if (!Dependencies::is_concrete_method(m, k)) { ++ // Check interface defaults also, if any exist. ++ Array* default_methods = InstanceKlass::cast(k)->default_methods(); ++ if (default_methods == NULL) ++ return false; ++ m = InstanceKlass::cast(k)->find_method(default_methods, _name, _signature); ++ if (!Dependencies::is_concrete_method(m, NULL)) ++ return false; ++ } + _found_methods[_num_participants] = m; + // Note: If add_participant(k) is called, + // the method m will already be memoized for it. +@@ -1085,7 +1096,7 @@ Klass* chain; // scratch variable #define ADD_SUBCLASS_CHAIN(k) { \ assert(chaini < CHAINMAX, "oob"); \ @@ -966,7 +1626,7 @@ if (chain != NULL) chains[chaini++] = chain; } // Look for non-abstract subclasses. -@@ -1096,6 +1098,7 @@ +@@ -1096,6 +1107,7 @@ // (Their subclasses are additional indirect implementors. // See InstanceKlass::add_implementor.) // (Note: nof_implementors is always zero for non-interfaces.) @@ -974,7 +1634,7 @@ int nof_impls = InstanceKlass::cast(context_type)->nof_implementors(); if (nof_impls > 1) { // Avoid this case: *I.m > { A.m, C }; B.m > C -@@ -1127,6 +1130,7 @@ +@@ -1127,6 +1139,7 @@ ADD_SUBCLASS_CHAIN(impl); } } @@ -982,8 +1642,150 @@ // Recursively process each non-trivial sibling chain. while (chaini > 0) { ---- jdk8/hotspot/src/share/vm/code/nmethod.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/code/nmethod.cpp 2015-01-08 21:23:31.155148744 +0100 +@@ -1172,15 +1185,17 @@ + return true; + } + +-bool Dependencies::is_concrete_method(Method* m) { +- // Statics are irrelevant to virtual call sites. +- if (m->is_static()) return false; +- +- // We could also return false if m does not yet appear to be +- // executed, if the VM version supports this distinction also. +- // Default methods are considered "concrete" as well. +- return !m->is_abstract() && +- !m->is_overpass(); // error functions aren't concrete ++bool Dependencies::is_concrete_method(Method* m, Klass * k) { ++ // NULL is not a concrete method, ++ // statics are irrelevant to virtual call sites, ++ // abstract methods are not concrete, ++ // overpass (error) methods are not concrete if k is abstract ++ // ++ // note "true" is conservative answer -- ++ // overpass clause is false if k == NULL, implies return true if ++ // answer depends on overpass clause. ++ return ! ( m == NULL || m -> is_static() || m -> is_abstract() || ++ m->is_overpass() && k != NULL && k -> is_abstract() ); + } + + +@@ -1205,16 +1220,6 @@ + return true; + } + +-bool Dependencies::is_concrete_method(ciMethod* m) { +- // Statics are irrelevant to virtual call sites. +- if (m->is_static()) return false; +- +- // We could also return false if m does not yet appear to be +- // executed, if the VM version supports this distinction also. +- return !m->is_abstract(); +-} +- +- + bool Dependencies::has_finalizable_subclass(ciInstanceKlass* k) { + return k->has_finalizable_subclass(); + } +@@ -1428,7 +1433,7 @@ + Klass* wit = wf.find_witness_definer(ctxk); + if (wit != NULL) return NULL; // Too many witnesses. + Method* fm = wf.found_method(0); // Will be NULL if num_parts == 0. +- if (Dependencies::is_concrete_method(m)) { ++ if (Dependencies::is_concrete_method(m, ctxk)) { + if (fm == NULL) { + // It turns out that m was always the only implementation. + fm = m; +@@ -1458,61 +1463,6 @@ + return wf.find_witness_definer(ctxk, changes); + } + +-// Find the set of all non-abstract methods under ctxk that match m[0]. +-// (The method m[0] must be defined or inherited in ctxk.) +-// Include m itself in the set, unless it is abstract. +-// Fill the given array m[0..(mlen-1)] with this set, and return the length. +-// (The length may be zero if no concrete methods are found anywhere.) +-// If there are too many concrete methods to fit in marray, return -1. +-int Dependencies::find_exclusive_concrete_methods(Klass* ctxk, +- int mlen, +- Method* marray[]) { +- Method* m0 = marray[0]; +- ClassHierarchyWalker wf(m0); +- assert(wf.check_method_context(ctxk, m0), "proper context"); +- wf.record_witnesses(mlen); +- bool participants_hide_witnesses = true; +- Klass* wit = wf.find_witness_definer(ctxk); +- if (wit != NULL) return -1; // Too many witnesses. +- int num = wf.num_participants(); +- assert(num <= mlen, "oob"); +- // Keep track of whether m is also part of the result set. +- int mfill = 0; +- assert(marray[mfill] == m0, "sanity"); +- if (Dependencies::is_concrete_method(m0)) +- mfill++; // keep m0 as marray[0], the first result +- for (int i = 0; i < num; i++) { +- Method* fm = wf.found_method(i); +- if (fm == m0) continue; // Already put this guy in the list. +- if (mfill == mlen) { +- return -1; // Oops. Too many methods after all! +- } +- marray[mfill++] = fm; +- } +-#ifndef PRODUCT +- // Make sure the dependency mechanism will pass this discovery: +- if (VerifyDependencies) { +- // Turn off dependency tracing while actually testing deps. +- FlagSetting fs(TraceDependencies, false); +- switch (mfill) { +- case 1: +- guarantee(NULL == (void *)check_unique_concrete_method(ctxk, marray[0]), +- "verify dep."); +- break; +- case 2: +- guarantee(NULL == (void *) +- check_exclusive_concrete_methods(ctxk, marray[0], marray[1]), +- "verify dep."); +- break; +- default: +- ShouldNotReachHere(); // mlen > 2 yet supported +- } +- } +-#endif //PRODUCT +- return mfill; +-} +- +- + Klass* Dependencies::check_has_no_finalizable_subclasses(Klass* ctxk, KlassDepChange* changes) { + Klass* search_at = ctxk; + if (changes != NULL) +--- jdk8/hotspot/src/share/vm/code/dependencies.hpp 2015-01-27 08:42:53.981818018 +0100 ++++ jdk8/hotspot/src/share/vm/code/dependencies.hpp 2015-01-27 08:43:45.242625130 +0100 +@@ -287,7 +287,7 @@ + // In that case, there would be a middle ground between concrete + // and abstract (as defined by the Java language and VM). + static bool is_concrete_klass(Klass* k); // k is instantiable +- static bool is_concrete_method(Method* m); // m is invocable ++ static bool is_concrete_method(Method* m, Klass* k); // m is invocable + static Klass* find_finalizable_subclass(Klass* k); + + // These versions of the concreteness queries work through the CI. +@@ -301,7 +301,6 @@ + // not go back into the VM to get their value; they must cache the + // bit in the CI, either eagerly or lazily.) + static bool is_concrete_klass(ciInstanceKlass* k); // k appears instantiable +- static bool is_concrete_method(ciMethod* m); // m appears invocable + static bool has_finalizable_subclass(ciInstanceKlass* k); + + // As a general rule, it is OK to compile under the assumption that +@@ -348,7 +347,6 @@ + static Klass* find_unique_concrete_subtype(Klass* ctxk); + static Method* find_unique_concrete_method(Klass* ctxk, Method* m); + static int find_exclusive_concrete_subtypes(Klass* ctxk, int klen, Klass* k[]); +- static int find_exclusive_concrete_methods(Klass* ctxk, int mlen, Method* m[]); + + // Create the encoding which will be stored in an nmethod. + void encode_content_bytes(); +--- jdk8/hotspot/src/share/vm/code/nmethod.cpp 2015-01-27 08:42:53.981818018 +0100 ++++ jdk8/hotspot/src/share/vm/code/nmethod.cpp 2015-01-27 08:43:45.243625106 +0100 @@ -1741,11 +1741,17 @@ set_unload_reported(); } @@ -1149,8 +1951,8 @@ if (_method != NULL) f(_method); } ---- jdk8/hotspot/src/share/vm/code/nmethod.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/code/nmethod.hpp 2015-01-08 21:23:31.155148744 +0100 +--- jdk8/hotspot/src/share/vm/code/nmethod.hpp 2015-01-27 08:42:53.982817994 +0100 ++++ jdk8/hotspot/src/share/vm/code/nmethod.hpp 2015-01-27 08:43:45.243625106 +0100 @@ -614,9 +614,16 @@ // The parallel versions are used by G1. bool do_unloading_parallel(BoolObjectClosure* is_alive, bool unloading_occurred); @@ -1168,8 +1970,8 @@ void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f); void oops_do(OopClosure* f) { oops_do(f, false); } ---- jdk8/hotspot/src/share/vm/compiler/compileBroker.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/compiler/compileBroker.cpp 2015-01-08 21:23:31.156148720 +0100 +--- jdk8/hotspot/src/share/vm/compiler/compileBroker.cpp 2015-01-27 08:42:53.982817994 +0100 ++++ jdk8/hotspot/src/share/vm/compiler/compileBroker.cpp 2015-01-27 08:43:45.245625060 +0100 @@ -183,9 +183,8 @@ long CompileBroker::_peak_compilation_time = 0; @@ -1677,8 +2479,8 @@ if (fp != NULL) { if (LogCompilation && Verbose) { tty->print_cr("Opening compilation log %s", file_name); ---- jdk8/hotspot/src/share/vm/compiler/compileBroker.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/compiler/compileBroker.hpp 2015-01-08 21:23:31.156148720 +0100 +--- jdk8/hotspot/src/share/vm/compiler/compileBroker.hpp 2015-01-27 08:42:53.982817994 +0100 ++++ jdk8/hotspot/src/share/vm/compiler/compileBroker.hpp 2015-01-27 08:43:45.245625060 +0100 @@ -40,6 +40,11 @@ friend class VMStructs; @@ -1780,8 +2582,8 @@ static int queue_size(int comp_level) { CompileQueue *q = compile_queue(comp_level); return q != NULL ? q->size() : 0; ---- jdk8/hotspot/src/share/vm/compiler/compileLog.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/compiler/compileLog.cpp 2015-01-08 21:23:31.156148720 +0100 +--- jdk8/hotspot/src/share/vm/compiler/compileLog.cpp 2015-01-27 08:42:53.982817994 +0100 ++++ jdk8/hotspot/src/share/vm/compiler/compileLog.cpp 2015-01-27 08:43:45.245625060 +0100 @@ -55,8 +55,10 @@ } @@ -1806,8 +2608,8 @@ log = next_log; } _first = NULL; ---- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2015-01-08 21:23:31.157148696 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2015-01-27 08:42:53.983817971 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2015-01-27 08:43:45.246625037 +0100 @@ -2641,7 +2641,7 @@ // Get the #blocks we want to claim size_t n_blks = (size_t)_blocks_to_claim[word_sz].average(); @@ -1817,8 +2619,45 @@ // In some cases, when the application has a phase change, // there may be a sudden and sharp shift in the object survival // profile, and updating the counts at the end of a scavenge ---- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp 2015-01-08 21:23:31.157148696 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2015-01-27 08:42:53.983817971 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2015-01-27 08:43:45.248624990 +0100 +@@ -738,7 +738,7 @@ + // Support for parallelizing survivor space rescan + if ((CMSParallelRemarkEnabled && CMSParallelSurvivorRemarkEnabled) || CMSParallelInitialMarkEnabled) { + const size_t max_plab_samples = +- ((DefNewGeneration*)_young_gen)->max_survivor_size()/MinTLABSize; ++ ((DefNewGeneration*)_young_gen)->max_survivor_size() / plab_sample_minimum_size(); + + _survivor_plab_array = NEW_C_HEAP_ARRAY(ChunkArray, ParallelGCThreads, mtGC); + _survivor_chunk_array = NEW_C_HEAP_ARRAY(HeapWord*, 2*max_plab_samples, mtGC); +@@ -796,6 +796,12 @@ + _inter_sweep_timer.start(); // start of time + } + ++size_t CMSCollector::plab_sample_minimum_size() { ++ // The default value of MinTLABSize is 2k, but there is ++ // no way to get the default value if the flag has been overridden. ++ return MAX2(ThreadLocalAllocBuffer::min_size() * HeapWordSize, 2 * K); ++} ++ + const char* ConcurrentMarkSweepGeneration::name() const { + return "concurrent mark-sweep generation"; + } +--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp 2015-01-27 08:42:53.983817971 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp 2015-01-27 08:43:45.249624967 +0100 +@@ -764,6 +764,10 @@ + size_t* _cursor; + ChunkArray* _survivor_plab_array; + ++ // A bounded minimum size of PLABs, should not return too small values since ++ // this will affect the size of the data structures used for parallel young gen rescan ++ size_t plab_sample_minimum_size(); ++ + // Support for marking stack overflow handling + bool take_from_overflow_list(size_t num, CMSMarkStack* to_stack); + bool par_take_from_overflow_list(size_t num, +--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp 2015-01-27 08:42:53.984817948 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp 2015-01-27 08:43:45.249624967 +0100 @@ -50,8 +50,12 @@ void VM_CMS_Operation::acquire_pending_list_lock() { // The caller may block while communicating @@ -1834,8 +2673,8 @@ } void VM_CMS_Operation::release_and_notify_pending_list_lock() { ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2015-01-08 21:23:31.158148672 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2015-01-27 08:42:53.984817948 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2015-01-27 08:43:45.249624967 +0100 @@ -23,6 +23,7 @@ */ @@ -1889,8 +2728,24 @@ } // Clear the per-worker arrays used to store the per-region counting data ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1AllocationContext.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1AllocationContext.hpp 2015-01-08 21:23:31.158148672 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp 2015-01-27 08:42:53.984817948 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp 2015-01-27 08:43:45.250624944 +0100 +@@ -47,6 +47,13 @@ + // active field set to true. + PtrQueue(qset_, perm, true /* active */) { } + ++ // Flush before destroying; queue may be used to capture pending work while ++ // doing something else, with auto-flush on completion. ++ ~DirtyCardQueue() { if (!is_permanent()) flush(); } ++ ++ // Process queue entries and release resources. ++ void flush() { flush_impl(); } ++ + // Apply the closure to all elements, and reset the index to make the + // buffer empty. If a closure application returns "false", return + // "false" immediately, halting the iteration. If "consume" is true, +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1AllocationContext.hpp 2015-01-27 08:42:53.985817924 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1AllocationContext.hpp 2015-01-27 08:43:45.250624944 +0100 @@ -45,7 +45,7 @@ public: inline void clear() { } @@ -1900,8 +2755,8 @@ inline bool available() { return false; } }; ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2015-01-08 21:23:31.159148648 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2015-01-27 08:42:53.985817924 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2015-01-27 08:43:45.251624920 +0100 @@ -27,6 +27,7 @@ #endif @@ -1986,8 +2841,8 @@ } }; ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp 2015-01-08 21:23:31.160148624 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp 2015-01-27 08:42:53.985817924 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp 2015-01-27 08:43:45.251624920 +0100 @@ -25,8 +25,9 @@ #include "precompiled.hpp" #include "gc_implementation/g1/g1CollectedHeap.hpp" @@ -1999,8 +2854,8 @@ jint len) { + return false; } ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp 2015-01-08 21:23:31.160148624 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp 2015-01-27 08:42:53.985817924 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp 2015-01-27 08:43:45.251624920 +0100 @@ -1249,7 +1249,7 @@ // The same as above but assume that the caller holds the Heap_lock. void collect_locked(GCCause::Cause cause); @@ -2010,8 +2865,8 @@ jlong* totals, jbyte* accuracy, jint len); ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2015-01-08 21:23:31.160148624 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2015-01-27 08:42:53.985817924 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2015-01-27 08:43:45.252624897 +0100 @@ -1425,6 +1425,18 @@ #endif // PRODUCT } @@ -2032,7 +2887,7 @@ switch (purpose) { case GCAllocForSurvived: --- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy_ext.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy_ext.hpp 2015-01-08 21:23:31.161148600 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy_ext.hpp 2015-01-27 08:43:45.252624897 +0100 @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. @@ -2066,8 +2921,8 @@ +class G1CollectorPolicyExt : public G1CollectorPolicy { }; + +#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTORPOLICY_EXT_HPP ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp 2015-01-08 21:23:31.161148600 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp 2015-01-27 08:42:53.985817924 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp 2015-01-27 08:43:45.252624897 +0100 @@ -26,6 +26,7 @@ #define SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTORPOLICY_HPP @@ -2105,8 +2960,153 @@ uint young_list_max_length() { return _young_list_max_length; ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2015-01-08 21:23:31.161148600 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp 2015-01-27 08:42:53.986817901 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp 2015-01-27 08:43:45.252624897 +0100 +@@ -45,7 +45,8 @@ + #include "utilities/bitMap.inline.hpp" + + G1PageBasedVirtualSpace::G1PageBasedVirtualSpace() : _low_boundary(NULL), +- _high_boundary(NULL), _committed(), _page_size(0), _special(false), _executable(false) { ++ _high_boundary(NULL), _committed(), _page_size(0), _special(false), ++ _dirty(), _executable(false) { + } + + bool G1PageBasedVirtualSpace::initialize_with_granularity(ReservedSpace rs, size_t page_size) { +@@ -66,6 +67,9 @@ + assert(_committed.size() == 0, "virtual space initialized more than once"); + uintx size_in_bits = rs.size() / page_size; + _committed.resize(size_in_bits, /* in_resource_area */ false); ++ if (_special) { ++ _dirty.resize(size_in_bits, /* in_resource_area */ false); ++ } + + return true; + } +@@ -84,6 +88,7 @@ + _executable = false; + _page_size = 0; + _committed.resize(0, false); ++ _dirty.resize(0, false); + } + + size_t G1PageBasedVirtualSpace::committed_size() const { +@@ -120,31 +125,40 @@ + return num * _page_size; + } + +-MemRegion G1PageBasedVirtualSpace::commit(uintptr_t start, size_t size_in_pages) { ++bool G1PageBasedVirtualSpace::commit(uintptr_t start, size_t size_in_pages) { + // We need to make sure to commit all pages covered by the given area. + guarantee(is_area_uncommitted(start, size_in_pages), "Specified area is not uncommitted"); + +- if (!_special) { ++ bool zero_filled = true; ++ uintptr_t end = start + size_in_pages; ++ ++ if (_special) { ++ // Check for dirty pages and update zero_filled if any found. ++ if (_dirty.get_next_one_offset(start,end) < end) { ++ zero_filled = false; ++ _dirty.clear_range(start, end); ++ } ++ } else { + os::commit_memory_or_exit(page_start(start), byte_size_for_pages(size_in_pages), _executable, + err_msg("Failed to commit pages from "SIZE_FORMAT" of length "SIZE_FORMAT, start, size_in_pages)); + } +- _committed.set_range(start, start + size_in_pages); ++ _committed.set_range(start, end); + +- MemRegion result((HeapWord*)page_start(start), byte_size_for_pages(size_in_pages) / HeapWordSize); +- return result; ++ return zero_filled; + } + +-MemRegion G1PageBasedVirtualSpace::uncommit(uintptr_t start, size_t size_in_pages) { ++void G1PageBasedVirtualSpace::uncommit(uintptr_t start, size_t size_in_pages) { + guarantee(is_area_committed(start, size_in_pages), "checking"); + +- if (!_special) { ++ if (_special) { ++ // Mark that memory is dirty. If committed again the memory might ++ // need to be cleared explicitly. ++ _dirty.set_range(start, start + size_in_pages); ++ } else { + os::uncommit_memory(page_start(start), byte_size_for_pages(size_in_pages)); + } + + _committed.clear_range(start, start + size_in_pages); +- +- MemRegion result((HeapWord*)page_start(start), byte_size_for_pages(size_in_pages) / HeapWordSize); +- return result; + } + + bool G1PageBasedVirtualSpace::contains(const void* p) const { +@@ -154,7 +168,7 @@ + #ifndef PRODUCT + void G1PageBasedVirtualSpace::print_on(outputStream* out) { + out->print ("Virtual space:"); +- if (special()) out->print(" (pinned in memory)"); ++ if (_special) out->print(" (pinned in memory)"); + out->cr(); + out->print_cr(" - committed: " SIZE_FORMAT, committed_size()); + out->print_cr(" - reserved: " SIZE_FORMAT, reserved_size()); +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp 2015-01-27 08:42:53.986817901 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp 2015-01-27 08:43:45.252624897 +0100 +@@ -49,6 +49,12 @@ + // Bitmap used for verification of commit/uncommit operations. + BitMap _committed; + ++ // Bitmap used to keep track of which pages are dirty or not for _special ++ // spaces. This is needed because for those spaces the underlying memory ++ // will only be zero filled the first time it is committed. Calls to commit ++ // will use this bitmap and return whether or not the memory is zero filled. ++ BitMap _dirty; ++ + // Indicates that the entire space has been committed and pinned in memory, + // os::commit_memory() or os::uncommit_memory() have no function. + bool _special; +@@ -71,12 +77,11 @@ + public: + + // Commit the given area of pages starting at start being size_in_pages large. +- MemRegion commit(uintptr_t start, size_t size_in_pages); ++ // Returns true if the given area is zero filled upon completion. ++ bool commit(uintptr_t start, size_t size_in_pages); + + // Uncommit the given area of pages starting at start being size_in_pages large. +- MemRegion uncommit(uintptr_t start, size_t size_in_pages); +- +- bool special() const { return _special; } ++ void uncommit(uintptr_t start, size_t size_in_pages); + + // Initialization + G1PageBasedVirtualSpace(); +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp 2015-01-27 08:42:53.986817901 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp 2015-01-27 08:43:45.253624874 +0100 +@@ -67,9 +67,9 @@ + } + + virtual void commit_regions(uintptr_t start_idx, size_t num_regions) { +- _storage.commit(start_idx * _pages_per_region, num_regions * _pages_per_region); ++ bool zero_filled = _storage.commit(start_idx * _pages_per_region, num_regions * _pages_per_region); + _commit_map.set_range(start_idx, start_idx + num_regions); +- fire_on_commit(start_idx, num_regions, true); ++ fire_on_commit(start_idx, num_regions, zero_filled); + } + + virtual void uncommit_regions(uintptr_t start_idx, size_t num_regions) { +@@ -117,8 +117,7 @@ + uint old_refcount = _refcounts.get_by_index(idx); + bool zero_filled = false; + if (old_refcount == 0) { +- _storage.commit(idx, 1); +- zero_filled = true; ++ zero_filled = _storage.commit(idx, 1); + } + _refcounts.set_by_index(idx, old_refcount + 1); + _commit_map.set_bit(i); +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2015-01-27 08:42:53.987817878 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2015-01-27 08:43:45.253624874 +0100 @@ -1015,11 +1015,14 @@ HeapWord* G1OffsetTableContigSpace::saved_mark_word() const { G1CollectedHeap* g1h = G1CollectedHeap::heap(); @@ -2125,8 +3125,78 @@ void G1OffsetTableContigSpace::record_top_and_timestamp() { G1CollectedHeap* g1h = G1CollectedHeap::heap(); ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp 2015-01-08 21:23:31.161148600 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp 2015-01-27 08:42:53.987817878 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp 2015-01-27 08:43:45.253624874 +0100 +@@ -31,11 +31,15 @@ + #include "runtime/thread.inline.hpp" + + PtrQueue::PtrQueue(PtrQueueSet* qset, bool perm, bool active) : +- _qset(qset), _buf(NULL), _index(0), _active(active), ++ _qset(qset), _buf(NULL), _index(0), _sz(0), _active(active), + _perm(perm), _lock(NULL) + {} + +-void PtrQueue::flush() { ++PtrQueue::~PtrQueue() { ++ assert(_perm || (_buf == NULL), "queue must be flushed before delete"); ++} ++ ++void PtrQueue::flush_impl() { + if (!_perm && _buf != NULL) { + if (_index == _sz) { + // No work to do. +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp 2015-01-27 08:42:53.987817878 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp 2015-01-27 08:43:45.253624874 +0100 +@@ -65,15 +65,18 @@ + Mutex* _lock; + + PtrQueueSet* qset() { return _qset; } ++ bool is_permanent() const { return _perm; } ++ ++ // Process queue entries and release resources, if not permanent. ++ void flush_impl(); + + public: + // Initialize this queue to contain a null buffer, and be part of the + // given PtrQueueSet. + PtrQueue(PtrQueueSet* qset, bool perm = false, bool active = false); +- // Release any contained resources. +- virtual void flush(); +- // Calls flush() when destroyed. +- ~PtrQueue() { flush(); } ++ ++ // Requires queue flushed or permanent. ++ ~PtrQueue(); + + // Associate a lock with a ptr queue. + void set_lock(Mutex* lock) { _lock = lock; } +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp 2015-01-27 08:42:53.987817878 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp 2015-01-27 08:43:45.253624874 +0100 +@@ -39,7 +39,7 @@ + // first before we flush it, otherwise we might end up with an + // enqueued buffer with refs into the CSet which breaks our invariants. + filter(); +- PtrQueue::flush(); ++ flush_impl(); + } + + // This method removes entries from an SATB buffer that will not be +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp 2015-01-27 08:42:53.987817878 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp 2015-01-27 08:43:45.253624874 +0100 +@@ -60,9 +60,8 @@ + // field to true. This is done in JavaThread::initialize_queues(). + PtrQueue(qset, perm, false /* active */) { } + +- // Overrides PtrQueue::flush() so that it can filter the buffer +- // before it is flushed. +- virtual void flush(); ++ // Process queue entries and free resources. ++ void flush(); + + // Overrides PtrQueue::should_enqueue_buffer(). See the method's + // definition for more information. +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp 2015-01-27 08:42:53.987817878 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp 2015-01-27 08:43:45.254624850 +0100 @@ -213,8 +213,12 @@ assert(_needs_pll, "don't call this otherwise"); // The caller may block while communicating @@ -2142,8 +3212,8 @@ } void VM_CGC_Operation::release_and_notify_pending_list_lock() { ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp 2015-01-08 21:23:31.161148600 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp 2015-01-27 08:42:53.987817878 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp 2015-01-27 08:43:45.254624850 +0100 @@ -60,7 +60,7 @@ VM_G1CollectFull(unsigned int gc_count_before, unsigned int full_gc_count_before, @@ -2153,8 +3223,8 @@ virtual VMOp_Type type() const { return VMOp_G1CollectFull; } virtual void doit(); virtual const char* name() const { ---- jdk8/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp 2015-01-08 21:23:31.161148600 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp 2015-01-27 08:42:53.990817808 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp 2015-01-27 08:43:45.254624850 +0100 @@ -137,6 +137,13 @@ return res; } @@ -2169,8 +3239,8 @@ void SurrogateLockerThread::manipulatePLL(SLT_msg_type msg) { MutexLockerEx x(&_monitor, Mutex::_no_safepoint_check_flag); assert(_buffer == empty, "Should be empty"); ---- jdk8/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp 2015-01-08 21:23:31.162148576 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp 2015-01-27 08:42:53.990817808 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp 2015-01-27 08:43:45.254624850 +0100 @@ -93,6 +93,9 @@ public: static SurrogateLockerThread* make(TRAPS); @@ -2181,8 +3251,8 @@ SurrogateLockerThread(); bool is_hidden_from_external_view() const { return true; } ---- jdk8/hotspot/src/share/vm/gc_implementation/shared/objectCountEventSender.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_implementation/shared/objectCountEventSender.cpp 2015-01-08 21:23:31.162148576 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/shared/objectCountEventSender.cpp 2015-01-27 08:42:53.991817785 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/shared/objectCountEventSender.cpp 2015-01-27 08:43:45.254624850 +0100 @@ -29,8 +29,8 @@ #include "memory/heapInspection.hpp" #include "trace/tracing.hpp" @@ -2193,8 +3263,20 @@ #if INCLUDE_SERVICES void ObjectCountEventSender::send(const KlassInfoEntry* entry, GCId gc_id, const Ticks& timestamp) { ---- jdk8/hotspot/src/share/vm/gc_interface/collectedHeap.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/gc_interface/collectedHeap.hpp 2015-01-08 21:23:31.162148576 +0100 +--- jdk8/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp 2015-01-27 08:42:53.991817785 +0100 ++++ jdk8/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp 2015-01-27 08:43:45.254624850 +0100 +@@ -63,7 +63,8 @@ + virtual ~ParGCAllocBuffer() {} + + static const size_t min_size() { +- return ThreadLocalAllocBuffer::min_size(); ++ // Make sure that we return something that is larger than AlignmentReserve ++ return align_object_size(MAX2(MinTLABSize / HeapWordSize, (uintx)oopDesc::header_size())) + AlignmentReserve; + } + + static const size_t max_size() { +--- jdk8/hotspot/src/share/vm/gc_interface/collectedHeap.hpp 2015-01-27 08:42:53.991817785 +0100 ++++ jdk8/hotspot/src/share/vm/gc_interface/collectedHeap.hpp 2015-01-27 08:43:45.254624850 +0100 @@ -641,10 +641,13 @@ // For each context in contexts, set the corresponding entries in the totals // and accuracy arrays to the current values held by the statistics. Each @@ -2211,8 +3293,8 @@ /////////////// Unit tests /////////////// ---- jdk8/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp 2015-01-08 21:23:31.163148552 +0100 +--- jdk8/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp 2015-01-27 08:42:53.992817762 +0100 ++++ jdk8/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp 2015-01-27 08:43:45.255624827 +0100 @@ -2813,11 +2813,11 @@ if (TraceExceptions) { ttyLocker ttyl; @@ -2252,8 +3334,8 @@ tty->print_cr("stack_base: " INTPTR_FORMAT, (uintptr_t) this->_stack_base); tty->print_cr("stack_limit: " INTPTR_FORMAT, (uintptr_t) this->_stack_limit); tty->print_cr("monitor_base: " INTPTR_FORMAT, (uintptr_t) this->_monitor_base); ---- jdk8/hotspot/src/share/vm/interpreter/bytecodeInterpreterProfiling.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/interpreter/bytecodeInterpreterProfiling.hpp 2015-01-08 21:23:31.163148552 +0100 +--- jdk8/hotspot/src/share/vm/interpreter/bytecodeInterpreterProfiling.hpp 2015-01-27 08:42:53.992817762 +0100 ++++ jdk8/hotspot/src/share/vm/interpreter/bytecodeInterpreterProfiling.hpp 2015-01-27 08:43:45.255624827 +0100 @@ -86,11 +86,11 @@ " \t-> " PTR_FORMAT "(%d)", \ (int) THREAD->osthread()->thread_id(), \ @@ -2286,8 +3368,8 @@ istate->method()->method_data()->dp_to_di(mdx)); \ } \ } else { \ ---- jdk8/hotspot/src/share/vm/interpreter/bytecodes.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/interpreter/bytecodes.hpp 2015-01-08 21:23:31.163148552 +0100 +--- jdk8/hotspot/src/share/vm/interpreter/bytecodes.hpp 2015-01-27 08:42:53.992817762 +0100 ++++ jdk8/hotspot/src/share/vm/interpreter/bytecodes.hpp 2015-01-27 08:43:45.255624827 +0100 @@ -423,8 +423,10 @@ static bool is_astore (Code code) { return (code == _astore || code == _astore_0 || code == _astore_1 || code == _astore_2 || code == _astore_3); } @@ -2299,9 +3381,9 @@ static bool is_invoke (Code code) { return (_invokevirtual <= code && code <= _invokedynamic); } static bool has_receiver (Code code) { assert(is_invoke(code), ""); return code == _invokevirtual || code == _invokespecial || ---- jdk8/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp Thu Oct 23 15:32:14 2014 -0700 -+++ jdk8/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp Wed Dec 17 10:43:38 2014 -0800 -@@ -398,6 +398,18 @@ +--- jdk8/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp 2015-01-27 08:42:53.992817762 +0100 ++++ jdk8/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp 2015-01-27 08:43:45.256624804 +0100 +@@ -401,6 +401,18 @@ int handler_bci; int current_bci = bci(thread); @@ -2320,8 +3402,19 @@ // Need to do this check first since when _do_not_unlock_if_synchronized // is set, we don't want to trigger any classloading which may make calls // into java, or surprisingly find a matching exception handler for bci 0 ---- jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp 2015-01-08 21:23:31.164148528 +0100 +--- jdk8/hotspot/src/share/vm/interpreter/linkResolver.cpp 2015-01-27 08:42:53.992817762 +0100 ++++ jdk8/hotspot/src/share/vm/interpreter/linkResolver.cpp 2015-01-27 08:43:45.256624804 +0100 +@@ -320,7 +320,7 @@ + // First check in default method array + if (!resolved_method->is_abstract() && + (InstanceKlass::cast(klass())->default_methods() != NULL)) { +- int index = InstanceKlass::find_method_index(InstanceKlass::cast(klass())->default_methods(), name, signature, false); ++ int index = InstanceKlass::find_method_index(InstanceKlass::cast(klass())->default_methods(), name, signature, false, false); + if (index >= 0 ) { + vtable_index = InstanceKlass::cast(klass())->default_vtable_indices()->at(index); + } +--- jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp 2015-01-27 08:42:53.994817715 +0100 ++++ jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp 2015-01-27 08:43:45.256624804 +0100 @@ -183,13 +183,9 @@ // Requirements of any new remembered set implementations must be added here. size_t alignment = GenRemSet::max_alignment_constraint(GenRemSet::CardTable); @@ -2339,8 +3432,8 @@ alignment = lcm(os::large_page_size(), alignment); } ---- jdk8/hotspot/src/share/vm/memory/filemap.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/memory/filemap.cpp 2015-01-08 21:23:31.164148528 +0100 +--- jdk8/hotspot/src/share/vm/memory/filemap.cpp 2015-01-27 08:42:53.994817715 +0100 ++++ jdk8/hotspot/src/share/vm/memory/filemap.cpp 2015-01-27 08:43:45.257624781 +0100 @@ -97,12 +97,12 @@ tty->print_cr("UseSharedSpaces: %s", msg); } @@ -2356,8 +3449,8 @@ // Fill in the fileMapInfo structure with data about this VM instance. ---- jdk8/hotspot/src/share/vm/memory/metadataFactory.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/memory/metadataFactory.hpp 2015-01-08 21:23:31.164148528 +0100 +--- jdk8/hotspot/src/share/vm/memory/metadataFactory.hpp 2015-01-27 08:42:53.995817692 +0100 ++++ jdk8/hotspot/src/share/vm/memory/metadataFactory.hpp 2015-01-27 08:43:45.257624781 +0100 @@ -64,6 +64,12 @@ template @@ -2371,8 +3464,8 @@ if (data != NULL) { assert(loader_data != NULL, "shouldn't pass null"); assert(!data->is_shared(), "cannot deallocate array in shared spaces"); ---- jdk8/hotspot/src/share/vm/memory/metaspace.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/memory/metaspace.cpp 2015-01-08 21:23:31.165148504 +0100 +--- jdk8/hotspot/src/share/vm/memory/metaspace.cpp 2015-01-27 08:42:53.995817692 +0100 ++++ jdk8/hotspot/src/share/vm/memory/metaspace.cpp 2015-01-27 08:43:45.257624781 +0100 @@ -3181,7 +3181,7 @@ MetaspaceGC::initialize(); @@ -2399,8 +3492,8 @@ // Initialize with the sum of the shared space sizes. The read-only // and read write metaspace chunks will be allocated out of this and the // remainder is the misc code and data chunks. ---- jdk8/hotspot/src/share/vm/memory/metaspaceShared.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/memory/metaspaceShared.cpp 2015-01-08 21:23:31.165148504 +0100 +--- jdk8/hotspot/src/share/vm/memory/metaspaceShared.cpp 2015-01-27 08:42:53.995817692 +0100 ++++ jdk8/hotspot/src/share/vm/memory/metaspaceShared.cpp 2015-01-27 08:43:45.258624758 +0100 @@ -24,6 +24,7 @@ #include "precompiled.hpp" @@ -2462,8 +3555,8 @@ intptr_t* array = (intptr_t*)buffer; ReadClosure rc(&array); serialize(&rc); ---- jdk8/hotspot/src/share/vm/memory/metaspaceShared.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/memory/metaspaceShared.hpp 2015-01-08 21:23:31.165148504 +0100 +--- jdk8/hotspot/src/share/vm/memory/metaspaceShared.hpp 2015-01-27 08:42:53.995817692 +0100 ++++ jdk8/hotspot/src/share/vm/memory/metaspaceShared.hpp 2015-01-27 08:43:45.258624758 +0100 @@ -32,9 +32,9 @@ #define LargeSharedArchiveSize (300*M) @@ -2494,8 +3587,142 @@ }; enum { ---- jdk8/hotspot/src/share/vm/memory/universe.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/memory/universe.cpp 2015-01-08 21:23:31.166148480 +0100 +--- jdk8/hotspot/src/share/vm/memory/referenceProcessor.cpp 2015-01-27 08:42:53.995817692 +0100 ++++ jdk8/hotspot/src/share/vm/memory/referenceProcessor.cpp 2015-01-27 08:43:45.258624758 +0100 +@@ -118,6 +118,7 @@ + _discoveredWeakRefs = &_discoveredSoftRefs[_max_num_q]; + _discoveredFinalRefs = &_discoveredWeakRefs[_max_num_q]; + _discoveredPhantomRefs = &_discoveredFinalRefs[_max_num_q]; ++ _discoveredCleanerRefs = &_discoveredPhantomRefs[_max_num_q]; + + // Initialize all entries to NULL + for (uint i = 0; i < _max_num_q * number_of_subclasses_of_ref(); i++) { +@@ -246,6 +247,13 @@ + phantom_count = + process_discovered_reflist(_discoveredPhantomRefs, NULL, false, + is_alive, keep_alive, complete_gc, task_executor); ++ ++ // Process cleaners, but include them in phantom statistics. We expect ++ // Cleaner references to be temporary, and don't want to deal with ++ // possible incompatibilities arising from making it more visible. ++ phantom_count += ++ process_discovered_reflist(_discoveredCleanerRefs, NULL, false, ++ is_alive, keep_alive, complete_gc, task_executor); + } + + // Weak global JNI references. It would make more sense (semantically) to +@@ -883,6 +891,7 @@ + balance_queues(_discoveredWeakRefs); + balance_queues(_discoveredFinalRefs); + balance_queues(_discoveredPhantomRefs); ++ balance_queues(_discoveredCleanerRefs); + } + + size_t +@@ -1042,6 +1051,9 @@ + case REF_PHANTOM: + list = &_discoveredPhantomRefs[id]; + break; ++ case REF_CLEANER: ++ list = &_discoveredCleanerRefs[id]; ++ break; + case REF_NONE: + // we should not reach here if we are an InstanceRefKlass + default: +@@ -1307,6 +1319,17 @@ + preclean_discovered_reflist(_discoveredPhantomRefs[i], is_alive, + keep_alive, complete_gc, yield); + } ++ ++ // Cleaner references. Included in timing for phantom references. We ++ // expect Cleaner references to be temporary, and don't want to deal with ++ // possible incompatibilities arising from making it more visible. ++ for (uint i = 0; i < _max_num_q; i++) { ++ if (yield->should_return()) { ++ return; ++ } ++ preclean_discovered_reflist(_discoveredCleanerRefs[i], is_alive, ++ keep_alive, complete_gc, yield); ++ } + } + } + +@@ -1375,6 +1398,7 @@ + case 1: return "WeakRef"; + case 2: return "FinalRef"; + case 3: return "PhantomRef"; ++ case 4: return "CleanerRef"; + } + ShouldNotReachHere(); + return NULL; +--- jdk8/hotspot/src/share/vm/memory/referenceProcessor.hpp 2015-01-27 08:42:53.995817692 +0100 ++++ jdk8/hotspot/src/share/vm/memory/referenceProcessor.hpp 2015-01-27 08:43:45.258624758 +0100 +@@ -264,9 +264,10 @@ + DiscoveredList* _discoveredWeakRefs; + DiscoveredList* _discoveredFinalRefs; + DiscoveredList* _discoveredPhantomRefs; ++ DiscoveredList* _discoveredCleanerRefs; + + public: +- static int number_of_subclasses_of_ref() { return (REF_PHANTOM - REF_OTHER); } ++ static int number_of_subclasses_of_ref() { return (REF_CLEANER - REF_OTHER); } + + uint num_q() { return _num_q; } + uint max_num_q() { return _max_num_q; } +--- jdk8/hotspot/src/share/vm/memory/referenceType.hpp 2015-01-27 08:42:53.995817692 +0100 ++++ jdk8/hotspot/src/share/vm/memory/referenceType.hpp 2015-01-27 08:43:45.259624734 +0100 +@@ -35,7 +35,8 @@ + REF_SOFT, // Subclass of java/lang/ref/SoftReference + REF_WEAK, // Subclass of java/lang/ref/WeakReference + REF_FINAL, // Subclass of java/lang/ref/FinalReference +- REF_PHANTOM // Subclass of java/lang/ref/PhantomReference ++ REF_PHANTOM, // Subclass of java/lang/ref/PhantomReference ++ REF_CLEANER // Subclass of sun/misc/Cleaner + }; + + #endif // SHARE_VM_MEMORY_REFRERENCETYPE_HPP +--- jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2015-01-27 08:42:53.996817669 +0100 ++++ jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2015-01-27 08:43:45.259624734 +0100 +@@ -235,22 +235,19 @@ + } + + size_t ThreadLocalAllocBuffer::initial_desired_size() { +- size_t init_sz; ++ size_t init_sz = 0; + + if (TLABSize > 0) { +- init_sz = MIN2(TLABSize / HeapWordSize, max_size()); +- } else if (global_stats() == NULL) { +- // Startup issue - main thread initialized before heap initialized. +- init_sz = min_size(); +- } else { ++ init_sz = TLABSize / HeapWordSize; ++ } else if (global_stats() != NULL) { + // Initial size is a function of the average number of allocating threads. + unsigned nof_threads = global_stats()->allocating_threads_avg(); + + init_sz = (Universe::heap()->tlab_capacity(myThread()) / HeapWordSize) / + (nof_threads * target_refills()); + init_sz = align_object_size(init_sz); +- init_sz = MIN2(MAX2(init_sz, min_size()), max_size()); + } ++ init_sz = MIN2(MAX2(init_sz, min_size()), max_size()); + return init_sz; + } + +--- jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp 2015-01-27 08:42:53.996817669 +0100 ++++ jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp 2015-01-27 08:43:45.259624734 +0100 +@@ -105,7 +105,7 @@ + // do nothing. tlabs must be inited by initialize() calls + } + +- static const size_t min_size() { return align_object_size(MinTLABSize / HeapWordSize); } ++ static const size_t min_size() { return align_object_size(MinTLABSize / HeapWordSize) + alignment_reserve(); } + static const size_t max_size() { assert(_max_size != 0, "max_size not set up"); return _max_size; } + static void set_max_size(size_t max_size) { _max_size = max_size; } + +--- jdk8/hotspot/src/share/vm/memory/universe.cpp 2015-01-27 08:42:53.996817669 +0100 ++++ jdk8/hotspot/src/share/vm/memory/universe.cpp 2015-01-27 08:43:45.259624734 +0100 @@ -78,7 +78,7 @@ #include "gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp" #include "gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.hpp" @@ -2558,8 +3785,8 @@ msg = java_lang_String::create_from_str("/ by zero", CHECK_false); java_lang_Throwable::set_message(Universe::_arithmetic_exception_instance, msg()); ---- jdk8/hotspot/src/share/vm/memory/universe.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/memory/universe.hpp 2015-01-08 21:23:31.166148480 +0100 +--- jdk8/hotspot/src/share/vm/memory/universe.hpp 2015-01-27 08:42:53.996817669 +0100 ++++ jdk8/hotspot/src/share/vm/memory/universe.hpp 2015-01-27 08:43:45.259624734 +0100 @@ -157,6 +157,7 @@ static oop _out_of_memory_error_class_metaspace; static oop _out_of_memory_error_array_size; @@ -2576,8 +3803,8 @@ // Accessors needed for fast allocation static Klass** boolArrayKlassObj_addr() { return &_boolArrayKlassObj; } ---- jdk8/hotspot/src/share/vm/oops/constantPool.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/oops/constantPool.cpp 2015-01-08 21:23:31.166148480 +0100 +--- jdk8/hotspot/src/share/vm/oops/constantPool.cpp 2015-01-27 08:42:53.996817669 +0100 ++++ jdk8/hotspot/src/share/vm/oops/constantPool.cpp 2015-01-27 08:43:45.260624711 +0100 @@ -1817,11 +1817,22 @@ void ConstantPool::set_on_stack(const bool value) { @@ -2603,8 +3830,8 @@ } // JSR 292 support for patching constant pool oops after the class is linked and ---- jdk8/hotspot/src/share/vm/oops/instanceKlass.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/oops/instanceKlass.cpp 2015-01-08 21:23:31.167148456 +0100 +--- jdk8/hotspot/src/share/vm/oops/instanceKlass.cpp 2015-01-27 08:42:53.997817645 +0100 ++++ jdk8/hotspot/src/share/vm/oops/instanceKlass.cpp 2015-01-27 08:43:45.261624688 +0100 @@ -780,6 +780,41 @@ } } @@ -2685,7 +3912,100 @@ } // Step 8 -@@ -2877,6 +2890,22 @@ +@@ -1440,32 +1453,41 @@ + } + + Method* InstanceKlass::find_method_impl(Symbol* name, Symbol* signature, bool skipping_overpass) const { +- return InstanceKlass::find_method_impl(methods(), name, signature, skipping_overpass); ++ return InstanceKlass::find_method_impl(methods(), name, signature, skipping_overpass, false); + } + + // find_instance_method looks up the name/signature in the local methods array + // and skips over static methods + Method* InstanceKlass::find_instance_method( + Array* methods, Symbol* name, Symbol* signature) { +- Method* meth = InstanceKlass::find_method(methods, name, signature); +- if (meth != NULL && meth->is_static()) { +- meth = NULL; +- } ++ Method* meth = InstanceKlass::find_method_impl(methods, name, signature, false, true); + return meth; + } + ++// find_instance_method looks up the name/signature in the local methods array ++// and skips over static methods ++Method* InstanceKlass::find_instance_method(Symbol* name, Symbol* signature) { ++ return InstanceKlass::find_instance_method(methods(), name, signature); ++} ++ + // find_method looks up the name/signature in the local methods array + Method* InstanceKlass::find_method( + Array* methods, Symbol* name, Symbol* signature) { +- return InstanceKlass::find_method_impl(methods, name, signature, false); ++ return InstanceKlass::find_method_impl(methods, name, signature, false, false); + } + + Method* InstanceKlass::find_method_impl( +- Array* methods, Symbol* name, Symbol* signature, bool skipping_overpass) { +- int hit = find_method_index(methods, name, signature, skipping_overpass); ++ Array* methods, Symbol* name, Symbol* signature, bool skipping_overpass, bool skipping_static) { ++ int hit = find_method_index(methods, name, signature, skipping_overpass, skipping_static); + return hit >= 0 ? methods->at(hit): NULL; + } + ++bool InstanceKlass::method_matches(Method* m, Symbol* signature, bool skipping_overpass, bool skipping_static) { ++ return (m->signature() == signature) && ++ (!skipping_overpass || !m->is_overpass()) && ++ (!skipping_static || !m->is_static()); ++} ++ + // Used directly for default_methods to find the index into the + // default_vtable_indices, and indirectly by find_method + // find_method_index looks in the local methods array to return the index +@@ -1474,7 +1496,7 @@ + // is important during method resolution to prefer a static method, for example, + // over an overpass method. + int InstanceKlass::find_method_index( +- Array* methods, Symbol* name, Symbol* signature, bool skipping_overpass) { ++ Array* methods, Symbol* name, Symbol* signature, bool skipping_overpass, bool skipping_static) { + int hit = binary_search(methods, name); + if (hit != -1) { + Method* m = methods->at(hit); +@@ -1478,9 +1500,10 @@ + int hit = binary_search(methods, name); + if (hit != -1) { + Method* m = methods->at(hit); ++ + // Do linear search to find matching signature. First, quick check + // for common case, ignoring overpasses if requested. +- if ((m->signature() == signature) && (!skipping_overpass || !m->is_overpass())) return hit; ++ if (method_matches(m, signature, skipping_overpass, skipping_static)) return hit; + + // search downwards through overloaded methods + int i; +@@ -1488,18 +1511,18 @@ + Method* m = methods->at(i); + assert(m->is_method(), "must be method"); + if (m->name() != name) break; +- if ((m->signature() == signature) && (!skipping_overpass || !m->is_overpass())) return i; ++ if (method_matches(m, signature, skipping_overpass, skipping_static)) return i; + } + // search upwards + for (i = hit + 1; i < methods->length(); ++i) { + Method* m = methods->at(i); + assert(m->is_method(), "must be method"); + if (m->name() != name) break; +- if ((m->signature() == signature) && (!skipping_overpass || !m->is_overpass())) return i; ++ if (method_matches(m, signature, skipping_overpass, skipping_static)) return i; + } + // not found + #ifdef ASSERT +- int index = skipping_overpass ? -1 : linear_search(methods, name, signature); ++ int index = skipping_overpass || skipping_static ? -1 : linear_search(methods, name, signature); + assert(index == -1, err_msg("binary search should have found entry %d", index)); + #endif + } +@@ -2877,6 +2900,22 @@ OsrList_lock->unlock(); } @@ -2708,7 +4028,7 @@ nmethod* InstanceKlass::lookup_osr_nmethod(const Method* m, int bci, int comp_level, bool match_level) const { // This is a short non-blocking critical region, so the no safepoint check is ok. OsrList_lock->lock_without_safepoint_check(); -@@ -2918,28 +2947,27 @@ +@@ -2918,28 +2957,27 @@ return NULL; } @@ -2750,8 +4070,8 @@ } // ----------------------------------------------------------------------------------------------------- ---- jdk8/hotspot/src/share/vm/oops/instanceKlass.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/oops/instanceKlass.hpp 2015-01-08 21:23:31.167148456 +0100 +--- jdk8/hotspot/src/share/vm/oops/instanceKlass.hpp 2015-01-27 08:42:53.997817645 +0100 ++++ jdk8/hotspot/src/share/vm/oops/instanceKlass.hpp 2015-01-27 08:43:45.261624688 +0100 @@ -234,7 +234,8 @@ _misc_should_verify_class = 1 << 2, // allow caching of preverification _misc_is_anonymous = 1 << 3, // has embedded _host_klass field @@ -2762,7 +4082,25 @@ }; u2 _misc_flags; u2 _minor_version; // minor version number of class file -@@ -680,6 +681,17 @@ +@@ -519,10 +520,16 @@ + // find a local method (returns NULL if not found) + Method* find_method(Symbol* name, Symbol* signature) const; + static Method* find_method(Array* methods, Symbol* name, Symbol* signature); ++ ++ // find a local method, but skip static methods ++ Method* find_instance_method(Symbol* name, Symbol* signature); + static Method* find_instance_method(Array* methods, Symbol* name, Symbol* signature); + ++ // true if method matches signature and conforms to skipping_X conditions. ++ static bool method_matches(Method* m, Symbol* signature, bool skipping_overpass, bool skipping_static); ++ + // find a local method index in default_methods (returns -1 if not found) +- static int find_method_index(Array* methods, Symbol* name, Symbol* signature, bool skipping_overpass); ++ static int find_method_index(Array* methods, Symbol* name, Symbol* signature, bool skipping_overpass, bool skipping_static); + + // lookup operation (returns NULL if not found) + Method* uncached_lookup_method(Symbol* name, Symbol* signature, MethodLookupMode mode) const; +@@ -680,6 +687,17 @@ } } @@ -2780,7 +4118,7 @@ // for adding methods, ConstMethod::UNSET_IDNUM means no more ids available inline u2 next_method_idnum(); void set_initial_method_idnum(u2 value) { _idnum_allocated_count = value; } -@@ -771,6 +783,7 @@ +@@ -771,6 +789,7 @@ void set_osr_nmethods_head(nmethod* h) { _osr_nmethods_head = h; }; void add_osr_nmethod(nmethod* n); void remove_osr_nmethod(nmethod* n); @@ -2788,7 +4126,7 @@ nmethod* lookup_osr_nmethod(const Method* m, int bci, int level, bool match_level) const; // Breakpoint support (see methods on Method* for details) -@@ -1046,6 +1059,7 @@ +@@ -1046,6 +1065,7 @@ static bool link_class_impl (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS); static bool verify_code (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS); static void initialize_impl (instanceKlassHandle this_oop, TRAPS); @@ -2796,7 +4134,16 @@ static void eager_initialize_impl (instanceKlassHandle this_oop); static void set_initialization_state_and_notify_impl (instanceKlassHandle this_oop, ClassState state, TRAPS); static void call_class_initializer_impl (instanceKlassHandle this_oop, TRAPS); -@@ -1077,8 +1091,7 @@ +@@ -1062,7 +1082,7 @@ + + // find a local method (returns NULL if not found) + Method* find_method_impl(Symbol* name, Symbol* signature, bool skipping_overpass) const; +- static Method* find_method_impl(Array* methods, Symbol* name, Symbol* signature, bool skipping_overpass); ++ static Method* find_method_impl(Array* methods, Symbol* name, Symbol* signature, bool skipping_overpass, bool skipping_static); + + // Free CHeap allocated fields. + void release_C_heap_structures(); +@@ -1077,8 +1097,7 @@ // JSR-292 support MemberNameTable* member_names() { return _member_names; } void set_member_names(MemberNameTable* member_names) { _member_names = member_names; } @@ -2806,8 +4153,8 @@ public: // JVMTI support ---- jdk8/hotspot/src/share/vm/oops/method.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/oops/method.cpp 2015-01-08 21:23:31.168148432 +0100 +--- jdk8/hotspot/src/share/vm/oops/method.cpp 2015-01-27 08:42:53.997817645 +0100 ++++ jdk8/hotspot/src/share/vm/oops/method.cpp 2015-01-27 08:43:45.261624688 +0100 @@ -563,6 +563,15 @@ return true; } @@ -2839,8 +4186,8 @@ } // Called when the class loader is unloaded to make all methods weak. ---- jdk8/hotspot/src/share/vm/oops/methodData.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/oops/methodData.cpp 2015-01-08 21:23:31.168148432 +0100 +--- jdk8/hotspot/src/share/vm/oops/methodData.cpp 2015-01-27 08:42:53.998817622 +0100 ++++ jdk8/hotspot/src/share/vm/oops/methodData.cpp 2015-01-27 08:43:45.262624664 +0100 @@ -1153,7 +1153,7 @@ _backedge_counter_start = 0; _num_loops = 0; @@ -2850,8 +4197,8 @@ #if INCLUDE_RTM_OPT _rtm_state = NoRTM; // No RTM lock eliding by default ---- jdk8/hotspot/src/share/vm/oops/methodData.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/oops/methodData.hpp 2015-01-08 21:23:31.169148408 +0100 +--- jdk8/hotspot/src/share/vm/oops/methodData.hpp 2015-01-27 08:42:53.998817622 +0100 ++++ jdk8/hotspot/src/share/vm/oops/methodData.hpp 2015-01-27 08:43:45.262624664 +0100 @@ -2099,7 +2099,8 @@ short _num_loops; short _num_blocks; @@ -2873,8 +4220,8 @@ int num_loops() const { return _num_loops; } void set_num_loops(int n) { _num_loops = n; } ---- jdk8/hotspot/src/share/vm/oops/method.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/oops/method.hpp 2015-01-08 21:23:31.168148432 +0100 +--- jdk8/hotspot/src/share/vm/oops/method.hpp 2015-01-27 08:42:53.997817645 +0100 ++++ jdk8/hotspot/src/share/vm/oops/method.hpp 2015-01-27 08:43:45.262624664 +0100 @@ -624,6 +624,9 @@ // returns true if the method is an accessor function (setter/getter). bool is_accessor() const; @@ -2896,8 +4243,8 @@ nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) { return method_holder()->lookup_osr_nmethod(this, bci, level, match_level); } ---- jdk8/hotspot/src/share/vm/oops/objArrayOop.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/oops/objArrayOop.hpp 2015-01-08 21:23:31.169148408 +0100 +--- jdk8/hotspot/src/share/vm/oops/objArrayOop.hpp 2015-01-27 08:42:53.998817622 +0100 ++++ jdk8/hotspot/src/share/vm/oops/objArrayOop.hpp 2015-01-27 08:43:45.263624641 +0100 @@ -45,9 +45,10 @@ private: // Give size of objArrayOop in HeapWords minus the header @@ -2931,8 +4278,8 @@ return res; } ---- jdk8/hotspot/src/share/vm/oops/typeArrayOop.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/oops/typeArrayOop.hpp 2015-01-08 21:23:31.169148408 +0100 +--- jdk8/hotspot/src/share/vm/oops/typeArrayOop.hpp 2015-01-27 08:42:53.998817622 +0100 ++++ jdk8/hotspot/src/share/vm/oops/typeArrayOop.hpp 2015-01-27 08:43:45.263624641 +0100 @@ -150,7 +150,7 @@ DEBUG_ONLY(BasicType etype = Klass::layout_helper_element_type(lh)); assert(length <= arrayOopDesc::max_array_length(etype), "no overflow"); @@ -2942,8 +4289,8 @@ size_in_bytes <<= element_shift; size_in_bytes += instance_header_size; julong size_in_words = ((size_in_bytes + (HeapWordSize-1)) >> LogHeapWordSize); ---- jdk8/hotspot/src/share/vm/opto/c2_globals.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/c2_globals.hpp 2015-01-08 21:23:31.169148408 +0100 +--- jdk8/hotspot/src/share/vm/opto/c2_globals.hpp 2015-01-27 08:42:53.999817599 +0100 ++++ jdk8/hotspot/src/share/vm/opto/c2_globals.hpp 2015-01-27 08:43:45.263624641 +0100 @@ -476,6 +476,9 @@ product(bool, DoEscapeAnalysis, true, \ "Perform escape analysis") \ @@ -2963,8 +4310,8 @@ "max number of live nodes in a method") \ \ diagnostic(bool, OptimizeExpensiveOps, true, \ ---- jdk8/hotspot/src/share/vm/opto/callGenerator.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/callGenerator.cpp 2015-01-08 21:23:31.170148384 +0100 +--- jdk8/hotspot/src/share/vm/opto/callGenerator.cpp 2015-01-27 08:42:53.999817599 +0100 ++++ jdk8/hotspot/src/share/vm/opto/callGenerator.cpp 2015-01-27 08:43:45.263624641 +0100 @@ -862,7 +862,7 @@ call_does_dispatch, vtable_index); // out-parameters // We lack profiling at this call but type speculation may @@ -2974,8 +4321,8 @@ } CallGenerator* cg = C->call_generator(target, vtable_index, call_does_dispatch, jvms, true, PROB_ALWAYS, speculative_receiver_type, true, true); ---- jdk8/hotspot/src/share/vm/opto/coalesce.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/coalesce.cpp 2015-01-08 21:23:31.170148384 +0100 +--- jdk8/hotspot/src/share/vm/opto/coalesce.cpp 2015-01-27 08:42:53.999817599 +0100 ++++ jdk8/hotspot/src/share/vm/opto/coalesce.cpp 2015-01-27 08:43:45.263624641 +0100 @@ -281,8 +281,10 @@ Block *pred = _phc._cfg.get_block_for_node(b->pred(j)); Node *copy; @@ -2998,8 +4345,8 @@ m->as_Mach()->rematerialize()) { copy = m->clone(); // Insert the copy in the basic block, just before us ---- jdk8/hotspot/src/share/vm/opto/compile.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/compile.cpp 2015-01-08 21:23:31.171148360 +0100 +--- jdk8/hotspot/src/share/vm/opto/compile.cpp 2015-01-27 08:42:53.999817599 +0100 ++++ jdk8/hotspot/src/share/vm/opto/compile.cpp 2015-01-27 08:43:45.264624618 +0100 @@ -685,7 +685,8 @@ _inlining_incrementally(false), _print_inlining_list(NULL), @@ -3028,8 +4375,8 @@ #if INCLUDE_RTM_OPT if (UseRTMLocking && has_method() && (method()->method_data_or_null() != NULL)) { int rtm_state = method()->method_data()->rtm_state(); ---- jdk8/hotspot/src/share/vm/opto/compile.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/compile.hpp 2015-01-08 21:23:31.171148360 +0100 +--- jdk8/hotspot/src/share/vm/opto/compile.hpp 2015-01-27 08:42:53.999817599 +0100 ++++ jdk8/hotspot/src/share/vm/opto/compile.hpp 2015-01-27 08:43:45.264624618 +0100 @@ -290,6 +290,7 @@ int _freq_inline_size; // Max hot method inline size for this compilation int _fixed_slots; // count of frame slots not allocated by the register @@ -3057,8 +4404,8 @@ record_method_not_compilable(reason); return true; } else { ---- jdk8/hotspot/src/share/vm/opto/connode.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/connode.cpp 2015-01-08 21:23:31.171148360 +0100 +--- jdk8/hotspot/src/share/vm/opto/connode.cpp 2015-01-27 08:42:53.999817599 +0100 ++++ jdk8/hotspot/src/share/vm/opto/connode.cpp 2015-01-27 08:43:45.265624595 +0100 @@ -441,6 +441,102 @@ return this; } @@ -3162,8 +4509,8 @@ //============================================================================= ---- jdk8/hotspot/src/share/vm/opto/connode.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/connode.hpp 2015-01-08 21:23:31.171148360 +0100 +--- jdk8/hotspot/src/share/vm/opto/connode.hpp 2015-01-27 08:42:53.999817599 +0100 ++++ jdk8/hotspot/src/share/vm/opto/connode.hpp 2015-01-27 08:43:45.265624595 +0100 @@ -241,10 +241,25 @@ //------------------------------CastIINode------------------------------------- // cast integer to integer (different range) @@ -3191,8 +4538,8 @@ }; //------------------------------CastPPNode------------------------------------- ---- jdk8/hotspot/src/share/vm/opto/doCall.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/doCall.cpp 2015-01-08 21:23:31.172148336 +0100 +--- jdk8/hotspot/src/share/vm/opto/doCall.cpp 2015-01-27 08:42:54.000817575 +0100 ++++ jdk8/hotspot/src/share/vm/opto/doCall.cpp 2015-01-27 08:43:45.265624595 +0100 @@ -410,6 +410,11 @@ ciInstanceKlass* klass = ciEnv::get_instance_klass_for_declared_method_holder(holder); assert(declared_signature != NULL, "cannot be null"); @@ -3223,8 +4570,8 @@ ex_klass_node->init_req( i, k ); } _gvn.set_type(ex_klass_node, TypeKlassPtr::OBJECT); ---- jdk8/hotspot/src/share/vm/opto/escape.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/escape.cpp 2015-01-08 21:23:31.172148336 +0100 +--- jdk8/hotspot/src/share/vm/opto/escape.cpp 2015-01-27 08:42:54.000817575 +0100 ++++ jdk8/hotspot/src/share/vm/opto/escape.cpp 2015-01-27 08:43:45.266624571 +0100 @@ -37,6 +37,8 @@ ConnectionGraph::ConnectionGraph(Compile * C, PhaseIterGVN *igvn) : @@ -3464,8 +4811,8 @@ igvn->hash_delete(n); igvn->set_type(n, tinst); n->raise_bottom_type(tinst); ---- jdk8/hotspot/src/share/vm/opto/escape.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/escape.hpp 2015-01-08 21:23:31.173148312 +0100 +--- jdk8/hotspot/src/share/vm/opto/escape.hpp 2015-01-27 08:42:54.000817575 +0100 ++++ jdk8/hotspot/src/share/vm/opto/escape.hpp 2015-01-27 08:43:45.266624571 +0100 @@ -125,6 +125,8 @@ class FieldNode; class ArraycopyNode; @@ -3620,8 +4967,8 @@ +} + #endif // SHARE_VM_OPTO_ESCAPE_HPP ---- jdk8/hotspot/src/share/vm/opto/graphKit.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/graphKit.cpp 2015-01-08 21:23:31.173148312 +0100 +--- jdk8/hotspot/src/share/vm/opto/graphKit.cpp 2015-01-27 08:42:54.000817575 +0100 ++++ jdk8/hotspot/src/share/vm/opto/graphKit.cpp 2015-01-27 08:43:45.267624548 +0100 @@ -1150,7 +1150,7 @@ Node* akls = AllocateNode::Ideal_klass(obj, &_gvn); if (akls != NULL) return akls; @@ -3640,8 +4987,8 @@ // Compile speed common case: ARE a subtype and we canNOT fail if( superklass == nkls ) ---- jdk8/hotspot/src/share/vm/opto/ifg.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/ifg.cpp 2015-01-08 21:23:31.174148288 +0100 +--- jdk8/hotspot/src/share/vm/opto/ifg.cpp 2015-01-27 08:42:54.000817575 +0100 ++++ jdk8/hotspot/src/share/vm/opto/ifg.cpp 2015-01-27 08:43:45.267624548 +0100 @@ -541,6 +541,25 @@ if( !n->is_Proj() || // Could also be a flags-projection of a dead ADD or such. @@ -3676,8 +5023,8 @@ // Fat-projections kill many registers which cannot be used to // hold live ranges. ---- jdk8/hotspot/src/share/vm/opto/ifnode.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/ifnode.cpp 2015-01-08 21:23:31.174148288 +0100 +--- jdk8/hotspot/src/share/vm/opto/ifnode.cpp 2015-01-27 08:42:54.000817575 +0100 ++++ jdk8/hotspot/src/share/vm/opto/ifnode.cpp 2015-01-27 08:43:45.267624548 +0100 @@ -820,6 +820,11 @@ static IfNode* idealize_test(PhaseGVN* phase, IfNode* iff); @@ -3859,8 +5206,8 @@ } else { // Scan for an equivalent test ---- jdk8/hotspot/src/share/vm/opto/lcm.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/lcm.cpp 2015-01-08 21:23:31.174148288 +0100 +--- jdk8/hotspot/src/share/vm/opto/lcm.cpp 2015-01-27 08:42:54.000817575 +0100 ++++ jdk8/hotspot/src/share/vm/opto/lcm.cpp 2015-01-27 08:43:45.268624525 +0100 @@ -487,9 +487,7 @@ iop == Op_CreateEx || // Create-exception must start block iop == Op_CheckCastPP @@ -3883,8 +5230,8 @@ return n; } ---- jdk8/hotspot/src/share/vm/opto/library_call.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/library_call.cpp 2015-01-08 21:23:31.175148264 +0100 +--- jdk8/hotspot/src/share/vm/opto/library_call.cpp 2015-01-27 08:42:54.001817552 +0100 ++++ jdk8/hotspot/src/share/vm/opto/library_call.cpp 2015-01-27 08:43:45.269624501 +0100 @@ -3398,7 +3398,7 @@ if (region == NULL) never_see_null = true; Node* p = basic_plus_adr(mirror, offset); @@ -3921,8 +5268,8 @@ Node* dest_elem_klass = _gvn.transform(n1); Node* cv = generate_checkcast_arraycopy(adr_type, dest_elem_klass, ---- jdk8/hotspot/src/share/vm/opto/loopnode.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/loopnode.hpp 2015-01-08 21:23:31.176148240 +0100 +--- jdk8/hotspot/src/share/vm/opto/loopnode.hpp 2015-01-27 08:42:54.001817552 +0100 ++++ jdk8/hotspot/src/share/vm/opto/loopnode.hpp 2015-01-27 08:43:45.270624478 +0100 @@ -602,6 +602,8 @@ return ctrl; } @@ -3932,8 +5279,8 @@ public: bool has_node( Node* n ) const { guarantee(n != NULL, "No Node."); ---- jdk8/hotspot/src/share/vm/opto/loopopts.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/loopopts.cpp 2015-01-08 21:23:31.177148216 +0100 +--- jdk8/hotspot/src/share/vm/opto/loopopts.cpp 2015-01-27 08:42:54.001817552 +0100 ++++ jdk8/hotspot/src/share/vm/opto/loopopts.cpp 2015-01-27 08:43:45.270624478 +0100 @@ -239,8 +239,13 @@ ProjNode* dp_proj = dp->as_Proj(); ProjNode* unc_proj = iff->as_If()->proj_out(1 - dp_proj->_con)->as_Proj(); @@ -3967,8 +5314,8 @@ // Search up IDOMs to see if this IF is dominated. Node *cutoff = get_ctrl(bol); ---- jdk8/hotspot/src/share/vm/opto/loopTransform.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/loopTransform.cpp 2015-01-08 21:23:31.176148240 +0100 +--- jdk8/hotspot/src/share/vm/opto/loopTransform.cpp 2015-01-27 08:42:54.001817552 +0100 ++++ jdk8/hotspot/src/share/vm/opto/loopTransform.cpp 2015-01-27 08:43:45.269624501 +0100 @@ -269,10 +269,9 @@ bool IdealLoopTree::policy_peeling( PhaseIdealLoop *phase ) const { Node *test = ((IdealLoopTree*)this)->tail(); @@ -4047,8 +5394,8 @@ return true; } ---- jdk8/hotspot/src/share/vm/opto/loopUnswitch.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/loopUnswitch.cpp 2015-01-08 21:23:31.176148240 +0100 +--- jdk8/hotspot/src/share/vm/opto/loopUnswitch.cpp 2015-01-27 08:42:54.001817552 +0100 ++++ jdk8/hotspot/src/share/vm/opto/loopUnswitch.cpp 2015-01-27 08:43:45.269624501 +0100 @@ -59,8 +59,8 @@ if (!_head->is_Loop()) { return false; @@ -4060,8 +5407,8 @@ return false; // Too speculative if running low on nodes. } LoopNode* head = _head->as_Loop(); ---- jdk8/hotspot/src/share/vm/opto/macro.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/macro.cpp 2015-01-08 21:23:31.177148216 +0100 +--- jdk8/hotspot/src/share/vm/opto/macro.cpp 2015-01-27 08:42:54.001817552 +0100 ++++ jdk8/hotspot/src/share/vm/opto/macro.cpp 2015-01-27 08:43:45.271624455 +0100 @@ -964,7 +964,11 @@ } @@ -4084,8 +5431,8 @@ #ifdef _LP64 if (UseCompressedClassPointers && klass_node->is_DecodeNKlass()) { assert(klass_node->in(1)->Opcode() == Op_LoadNKlass, "sanity"); ---- jdk8/hotspot/src/share/vm/opto/memnode.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/memnode.cpp 2015-01-08 21:23:31.178148192 +0100 +--- jdk8/hotspot/src/share/vm/opto/memnode.cpp 2015-01-27 08:42:54.002817529 +0100 ++++ jdk8/hotspot/src/share/vm/opto/memnode.cpp 2015-01-27 08:43:45.271624455 +0100 @@ -870,6 +870,10 @@ @@ -4155,8 +5502,8 @@ const Type *LoadNode::klass_value_common( PhaseTransform *phase ) const { // Either input is TOP ==> the result is TOP const Type *t1 = phase->type( in(MemNode::Memory) ); ---- jdk8/hotspot/src/share/vm/opto/memnode.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/memnode.hpp 2015-01-08 21:23:31.179148168 +0100 +--- jdk8/hotspot/src/share/vm/opto/memnode.hpp 2015-01-27 08:42:54.002817529 +0100 ++++ jdk8/hotspot/src/share/vm/opto/memnode.hpp 2015-01-27 08:43:45.272624432 +0100 @@ -151,6 +151,8 @@ protected: virtual uint cmp(const Node &n) const; @@ -4198,8 +5545,8 @@ const TypeKlassPtr *tk = TypeKlassPtr::OBJECT ); }; ---- jdk8/hotspot/src/share/vm/opto/node.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/node.cpp 2015-01-08 21:23:31.179148168 +0100 +--- jdk8/hotspot/src/share/vm/opto/node.cpp 2015-01-27 08:42:54.002817529 +0100 ++++ jdk8/hotspot/src/share/vm/opto/node.cpp 2015-01-27 08:43:45.272624432 +0100 @@ -69,7 +69,7 @@ Compile::set_debug_idx(new_debug_idx); set_debug_idx( new_debug_idx ); @@ -4218,8 +5565,8 @@ debug_only( verify_construction() ); NOT_PRODUCT(nodes_created++); if (req == 0) { ---- jdk8/hotspot/src/share/vm/opto/parse1.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/parse1.cpp 2015-01-08 21:23:31.180148144 +0100 +--- jdk8/hotspot/src/share/vm/opto/parse1.cpp 2015-01-27 08:42:54.002817529 +0100 ++++ jdk8/hotspot/src/share/vm/opto/parse1.cpp 2015-01-27 08:43:45.273624408 +0100 @@ -1958,7 +1958,7 @@ // finalization. In general this will fold up since the concrete // class is often visible so the access flags are constant. @@ -4229,8 +5576,8 @@ Node* access_flags_addr = basic_plus_adr(klass, klass, in_bytes(Klass::access_flags_offset())); Node* access_flags = make_load(NULL, access_flags_addr, TypeInt::INT, T_INT, MemNode::unordered); ---- jdk8/hotspot/src/share/vm/opto/parseHelper.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/parseHelper.cpp 2015-01-08 21:23:31.180148144 +0100 +--- jdk8/hotspot/src/share/vm/opto/parseHelper.cpp 2015-01-27 08:42:54.003817506 +0100 ++++ jdk8/hotspot/src/share/vm/opto/parseHelper.cpp 2015-01-27 08:43:45.273624408 +0100 @@ -156,22 +156,43 @@ int klass_offset = oopDesc::klass_offset_in_bytes(); Node* p = basic_plus_adr( ary, ary, klass_offset ); @@ -4296,8 +5643,8 @@ // Check (the hard way) and throw if not a subklass. // Result is ignored, we just need the CFG effects. ---- jdk8/hotspot/src/share/vm/opto/phaseX.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/phaseX.cpp 2015-01-08 21:23:31.180148144 +0100 +--- jdk8/hotspot/src/share/vm/opto/phaseX.cpp 2015-01-27 08:42:54.003817506 +0100 ++++ jdk8/hotspot/src/share/vm/opto/phaseX.cpp 2015-01-27 08:43:45.273624408 +0100 @@ -1340,15 +1340,27 @@ } } @@ -4357,8 +5704,8 @@ // If changed Cast input, check Phi users for simple cycles if( use->is_ConstraintCast() || use->is_CheckCastPP() ) { for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) { ---- jdk8/hotspot/src/share/vm/opto/subnode.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/subnode.cpp 2015-01-08 21:23:31.180148144 +0100 +--- jdk8/hotspot/src/share/vm/opto/subnode.cpp 2015-01-27 08:42:54.003817506 +0100 ++++ jdk8/hotspot/src/share/vm/opto/subnode.cpp 2015-01-27 08:43:45.274624385 +0100 @@ -1147,12 +1147,10 @@ //------------------------------dump_spec------------------------------------- @@ -4372,8 +5719,8 @@ //============================================================================= uint BoolNode::hash() const { return (Node::hash() << 3)|(_test._test+1); } ---- jdk8/hotspot/src/share/vm/opto/subnode.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/opto/subnode.hpp 2015-01-08 21:23:31.181148120 +0100 +--- jdk8/hotspot/src/share/vm/opto/subnode.hpp 2015-01-27 08:42:54.004817482 +0100 ++++ jdk8/hotspot/src/share/vm/opto/subnode.hpp 2015-01-27 08:43:45.274624385 +0100 @@ -275,9 +275,7 @@ mask commute( ) const { return mask("032147658"[_test]-'0'); } mask negate( ) const { return mask(_test^4); } @@ -4384,8 +5731,8 @@ }; //------------------------------BoolNode--------------------------------------- ---- jdk8/hotspot/src/share/vm/prims/jni.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/prims/jni.cpp 2015-01-08 21:23:31.182148096 +0100 +--- jdk8/hotspot/src/share/vm/prims/jni.cpp 2015-01-27 08:42:54.004817482 +0100 ++++ jdk8/hotspot/src/share/vm/prims/jni.cpp 2015-01-27 08:43:45.275624362 +0100 @@ -5080,6 +5080,7 @@ void TestNewSize_test(); void TestKlass_test(); @@ -4402,8 +5749,8 @@ #if INCLUDE_VM_STRUCTS run_unit_test(VMStructs::test()); #endif ---- jdk8/hotspot/src/share/vm/prims/jvm.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/prims/jvm.cpp 2015-01-08 21:23:31.182148096 +0100 +--- jdk8/hotspot/src/share/vm/prims/jvm.cpp 2015-01-27 08:42:54.005817459 +0100 ++++ jdk8/hotspot/src/share/vm/prims/jvm.cpp 2015-01-27 08:43:45.275624362 +0100 @@ -24,6 +24,7 @@ #include "precompiled.hpp" @@ -4538,8 +5885,8 @@ info->jvm_version = Abstract_VM_Version::jvm_version(); info->update_version = 0; /* 0 in HotSpot Express VM */ ---- jdk8/hotspot/src/share/vm/prims/jvm.h 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/prims/jvm.h 2015-01-08 21:23:31.183148072 +0100 +--- jdk8/hotspot/src/share/vm/prims/jvm.h 2015-01-27 08:42:54.005817459 +0100 ++++ jdk8/hotspot/src/share/vm/prims/jvm.h 2015-01-27 08:43:45.276624339 +0100 @@ -1553,6 +1553,31 @@ JNIEXPORT jobjectArray JNICALL JVM_GetThreadStateNames(JNIEnv* env, jint javaThreadState, jintArray values); @@ -4572,8 +5919,8 @@ /* ========================================================================= * The following defines a private JVM interface that the JDK can query * for the JVM version and capabilities. sun.misc.Version defines ---- jdk8/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp 2015-01-08 21:23:31.183148072 +0100 +--- jdk8/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp 2015-01-27 08:42:54.005817459 +0100 ++++ jdk8/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp 2015-01-27 08:43:45.276624339 +0100 @@ -57,6 +57,7 @@ void JvmtiClassFileReconstituter::write_field_infos() { HandleMark hm(thread()); @@ -4666,8 +6013,8 @@ if (cpool()->operands() != NULL) { write_bootstrapmethod_attribute(); } ---- jdk8/hotspot/src/share/vm/prims/jvmtiEnv.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/prims/jvmtiEnv.cpp 2015-01-08 21:23:31.184148048 +0100 +--- jdk8/hotspot/src/share/vm/prims/jvmtiEnv.cpp 2015-01-27 08:42:54.006817436 +0100 ++++ jdk8/hotspot/src/share/vm/prims/jvmtiEnv.cpp 2015-01-27 08:43:45.276624339 +0100 @@ -23,6 +23,7 @@ */ @@ -4685,8 +6032,8 @@ return JVMTI_ERROR_NONE; } else { return JVMTI_ERROR_WRONG_PHASE; ---- jdk8/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp 2015-01-08 21:23:31.185148024 +0100 +--- jdk8/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp 2015-01-27 08:42:54.008817389 +0100 ++++ jdk8/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp 2015-01-27 08:43:45.277624315 +0100 @@ -135,7 +135,7 @@ // Mark methods seen on stack and everywhere else so old methods are not @@ -5339,8 +6686,8 @@ // Swap annotation fields values Annotations* old_annotations = the_class->annotations(); the_class->set_annotations(scratch_class->annotations()); ---- jdk8/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp 2015-01-08 21:23:31.185148024 +0100 +--- jdk8/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp 2015-01-27 08:42:54.008817389 +0100 ++++ jdk8/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp 2015-01-27 08:43:45.278624292 +0100 @@ -457,6 +457,17 @@ instanceKlassHandle scratch_class, TRAPS); bool rewrite_cp_refs_in_element_value( @@ -5372,8 +6719,8 @@ void rewrite_cp_refs_in_stack_map_table(methodHandle method, TRAPS); void rewrite_cp_refs_in_verification_type_info( address& stackmap_addr_ref, address stackmap_end, u2 frame_i, ---- jdk8/hotspot/src/share/vm/prims/methodHandles.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/prims/methodHandles.cpp 2015-01-08 21:23:31.185148024 +0100 +--- jdk8/hotspot/src/share/vm/prims/methodHandles.cpp 2015-01-27 08:42:54.008817389 +0100 ++++ jdk8/hotspot/src/share/vm/prims/methodHandles.cpp 2015-01-27 08:43:45.278624292 +0100 @@ -29,7 +29,6 @@ #include "interpreter/oopMapCache.hpp" #include "memory/allocation.inline.hpp" @@ -5471,8 +6818,8 @@ } } } ---- jdk8/hotspot/src/share/vm/prims/methodHandles.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/prims/methodHandles.hpp 2015-01-08 21:23:31.185148024 +0100 +--- jdk8/hotspot/src/share/vm/prims/methodHandles.hpp 2015-01-27 08:42:54.008817389 +0100 ++++ jdk8/hotspot/src/share/vm/prims/methodHandles.hpp 2015-01-27 08:43:45.278624292 +0100 @@ -239,18 +239,14 @@ public: MemberNameTable(int methods_cnt); @@ -5493,8 +6840,8 @@ #endif // INCLUDE_JVMTI }; ---- jdk8/hotspot/src/share/vm/prims/whitebox.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/prims/whitebox.cpp 2015-01-08 21:23:31.186148000 +0100 +--- jdk8/hotspot/src/share/vm/prims/whitebox.cpp 2015-01-27 08:42:54.009817366 +0100 ++++ jdk8/hotspot/src/share/vm/prims/whitebox.cpp 2015-01-27 08:43:45.278624292 +0100 @@ -56,6 +56,7 @@ #endif // INCLUDE_NMT @@ -5647,8 +6994,19 @@ #endif // INCLUDE_NMT {CC"deoptimizeAll", CC"()V", (void*)&WB_DeoptimizeAll }, {CC"deoptimizeMethod", CC"(Ljava/lang/reflect/Executable;Z)I", ---- jdk8/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp 2015-01-08 21:23:31.186148000 +0100 +--- jdk8/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp 2015-01-27 08:42:54.009817366 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp 2015-01-27 08:43:45.279624269 +0100 +@@ -316,8 +316,8 @@ + * c. 0 -> (3->2) -> 4. + * In this case we enqueue a method for compilation at level 3, but the C1 queue is long enough + * to enable the profiling to fully occur at level 0. In this case we change the compilation level +- * of the method to 2, because it'll allow it to run much faster without full profiling while c2 +- * is compiling. ++ * of the method to 2 while the request is still in-queue, because it'll allow it to run much faster ++ * without full profiling while c2 is compiling. + * + * d. 0 -> 3 -> 1 or 0 -> 2 -> 1. + * After a method was once compiled with C1 it can be identified as trivial and be compiled to @@ -451,7 +451,7 @@ if (should_create_mdo(mh(), level)) { create_mdo(mh, thread); @@ -5685,8 +7043,8 @@ compile(imh, InvocationEntryBci, next_level, thread); } } ---- jdk8/hotspot/src/share/vm/runtime/arguments.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/arguments.cpp 2015-01-08 21:23:31.187147976 +0100 +--- jdk8/hotspot/src/share/vm/runtime/arguments.cpp 2015-01-27 08:42:54.009817366 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/arguments.cpp 2015-01-27 08:43:45.280624246 +0100 @@ -66,7 +66,7 @@ #endif // INCLUDE_ALL_GCS @@ -5968,8 +7326,8 @@ // Initialize Metaspace flags and alignments. Metaspace::ergo_initialize(); ---- jdk8/hotspot/src/share/vm/runtime/arguments_ext.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/arguments_ext.hpp 2015-01-08 21:23:31.187147976 +0100 +--- jdk8/hotspot/src/share/vm/runtime/arguments_ext.hpp 2015-01-27 08:42:54.009817366 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/arguments_ext.hpp 2015-01-27 08:43:45.280624246 +0100 @@ -31,25 +31,21 @@ class ArgumentsExt: AllStatic { public: @@ -6000,8 +7358,8 @@ -} - #endif // SHARE_VM_RUNTIME_ARGUMENTS_EXT_HPP ---- jdk8/hotspot/src/share/vm/runtime/arguments.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/arguments.hpp 2015-01-08 21:23:31.187147976 +0100 +--- jdk8/hotspot/src/share/vm/runtime/arguments.hpp 2015-01-27 08:42:54.009817366 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/arguments.hpp 2015-01-27 08:43:45.280624246 +0100 @@ -327,6 +327,7 @@ // Tiered @@ -6026,8 +7384,8 @@ static inline bool gc_selected(); // whether a gc has been selected static void select_gc_ergonomically(); ---- jdk8/hotspot/src/share/vm/runtime/deoptimization.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/deoptimization.cpp 2015-01-08 21:23:31.188147952 +0100 +--- jdk8/hotspot/src/share/vm/runtime/deoptimization.cpp 2015-01-27 08:42:54.009817366 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/deoptimization.cpp 2015-01-27 08:43:45.281624222 +0100 @@ -219,6 +219,8 @@ assert(vf->is_compiled_frame(), "Wrong frame type"); chunk->push(compiledVFrame::cast(vf)); @@ -6273,8 +7631,8 @@ static void collect_monitors(compiledVFrame* cvf, GrowableArray* objects_to_revoke) { GrowableArray* monitors = cvf->monitors(); ---- jdk8/hotspot/src/share/vm/runtime/deoptimization.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/deoptimization.hpp 2015-01-08 21:23:31.188147952 +0100 +--- jdk8/hotspot/src/share/vm/runtime/deoptimization.hpp 2015-01-27 08:42:54.009817366 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/deoptimization.hpp 2015-01-27 08:43:45.281624222 +0100 @@ -120,13 +120,14 @@ static bool realloc_objects(JavaThread* thread, frame* fr, GrowableArray* objects, TRAPS); static void reassign_type_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, typeArrayOop obj, BasicType type); @@ -6294,8 +7652,8 @@ // Interface used for unpacking deoptimized frames ---- jdk8/hotspot/src/share/vm/runtime/globals.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/globals.cpp 2015-01-08 21:23:31.189147928 +0100 +--- jdk8/hotspot/src/share/vm/runtime/globals.cpp 2015-01-27 08:42:54.010817343 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/globals.cpp 2015-01-27 08:43:45.281624222 +0100 @@ -243,6 +243,11 @@ return is_unlocked_ext(); } @@ -6308,8 +7666,8 @@ // Get custom message for this locked flag, or return NULL if // none is available. void Flag::get_locked_message(char* buf, int buflen) const { ---- jdk8/hotspot/src/share/vm/runtime/globals.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/globals.hpp 2015-01-08 21:25:24.532426997 +0100 +--- jdk8/hotspot/src/share/vm/runtime/globals.hpp 2015-01-27 08:42:54.010817343 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/globals.hpp 2015-01-27 08:44:59.066869294 +0100 @@ -325,6 +325,8 @@ bool is_writeable_ext() const; bool is_external_ext() const; @@ -6329,8 +7687,8 @@ product(bool, UseFastJNIAccessors, false, \ "Use optimized versions of GetField") \ \ ---- jdk8/hotspot/src/share/vm/runtime/interfaceSupport.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/interfaceSupport.cpp 2015-01-08 21:23:31.191147880 +0100 +--- jdk8/hotspot/src/share/vm/runtime/interfaceSupport.cpp 2015-01-27 08:42:54.010817343 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/interfaceSupport.cpp 2015-01-27 08:43:45.283624176 +0100 @@ -85,7 +85,7 @@ // Short-circuit any possible re-entrant gc-a-lot attempt if (thread->skip_gcalot()) return; @@ -6340,8 +7698,8 @@ if (++_fullgc_alot_invocation < FullGCALotStart) { return; ---- jdk8/hotspot/src/share/vm/runtime/os.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/os.cpp 2015-01-08 21:23:31.191147880 +0100 +--- jdk8/hotspot/src/share/vm/runtime/os.cpp 2015-01-27 08:42:54.011817320 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/os.cpp 2015-01-27 08:43:45.283624176 +0100 @@ -571,17 +571,6 @@ NOT_PRODUCT(inc_stat_counter(&num_mallocs, 1)); NOT_PRODUCT(inc_stat_counter(&alloc_bytes, size)); @@ -6373,8 +7731,8 @@ #ifndef ASSERT NOT_PRODUCT(inc_stat_counter(&num_mallocs, 1)); ---- jdk8/hotspot/src/share/vm/runtime/sharedRuntime.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/sharedRuntime.cpp 2015-01-08 21:23:31.192147856 +0100 +--- jdk8/hotspot/src/share/vm/runtime/sharedRuntime.cpp 2015-01-27 08:42:54.012817296 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/sharedRuntime.cpp 2015-01-27 08:43:45.284624152 +0100 @@ -490,6 +490,7 @@ address SharedRuntime::raw_exception_handler_for_return_address(JavaThread* thread, address return_address) { @@ -6383,8 +7741,8 @@ // Reset method handle flag. thread->set_is_method_handle_return(false); ---- jdk8/hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp 2015-01-08 21:23:31.192147856 +0100 +--- jdk8/hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp 2015-01-27 08:42:54.012817296 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp 2015-01-27 08:43:45.284624152 +0100 @@ -196,7 +196,6 @@ // Don't trigger other compiles in testing mode return NULL; @@ -6444,8 +7802,8 @@ // enough calls. CompLevel cur_level = comp_level(mh()); CompLevel next_level = call_event(mh(), cur_level); ---- jdk8/hotspot/src/share/vm/runtime/simpleThresholdPolicy.inline.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/simpleThresholdPolicy.inline.hpp 2015-01-08 21:23:31.192147856 +0100 +--- jdk8/hotspot/src/share/vm/runtime/simpleThresholdPolicy.inline.hpp 2015-01-27 08:42:54.012817296 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/simpleThresholdPolicy.inline.hpp 2015-01-27 08:43:45.284624152 +0100 @@ -54,13 +54,17 @@ // Simple methods are as good being compiled with C1 as C2. // Determine if a given method is such a case. @@ -6470,8 +7828,8 @@ } return false; } ---- jdk8/hotspot/src/share/vm/runtime/thread.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/thread.cpp 2015-01-08 21:23:31.193147832 +0100 +--- jdk8/hotspot/src/share/vm/runtime/thread.cpp 2015-01-27 08:42:54.013817273 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/thread.cpp 2015-01-27 08:43:45.285624129 +0100 @@ -234,6 +234,8 @@ // This initial value ==> never claimed. _oops_do_parity = 0; @@ -6489,8 +7847,8 @@ pd_initialize(); } ---- jdk8/hotspot/src/share/vm/runtime/thread.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/thread.hpp 2015-01-08 21:23:31.193147832 +0100 +--- jdk8/hotspot/src/share/vm/runtime/thread.hpp 2015-01-27 08:42:54.013817273 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/thread.hpp 2015-01-27 08:43:45.285624129 +0100 @@ -42,11 +42,10 @@ #include "runtime/threadLocalStorage.hpp" #include "runtime/thread_ext.hpp" @@ -6559,8 +7917,8 @@ private: // Saved incoming arguments to popped frame. // Used only when popped interpreted frame returns to deoptimized frame. ---- jdk8/hotspot/src/share/vm/runtime/vframeArray.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/vframeArray.cpp 2015-01-08 21:23:31.194147808 +0100 +--- jdk8/hotspot/src/share/vm/runtime/vframeArray.cpp 2015-01-27 08:42:54.013817273 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/vframeArray.cpp 2015-01-27 08:43:45.286624106 +0100 @@ -56,7 +56,7 @@ } } @@ -6661,8 +8019,8 @@ } // Copy registers for callee-saved registers ---- jdk8/hotspot/src/share/vm/runtime/vframeArray.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/runtime/vframeArray.hpp 2015-01-08 21:23:31.194147808 +0100 +--- jdk8/hotspot/src/share/vm/runtime/vframeArray.hpp 2015-01-27 08:42:54.013817273 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/vframeArray.hpp 2015-01-27 08:43:45.286624106 +0100 @@ -58,6 +58,9 @@ MonitorChunk* _monitors; // active monitors for this vframe StackValueCollection* _locals; @@ -6712,8 +8070,18 @@ // Returns the owner of this vframeArray JavaThread* owner_thread() const { return _owner_thread; } ---- jdk8/hotspot/src/share/vm/services/mallocTracker.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/services/mallocTracker.cpp 2015-01-08 21:23:31.194147808 +0100 +--- jdk8/hotspot/src/share/vm/runtime/vmStructs.cpp 2015-01-27 08:42:54.014817250 +0100 ++++ jdk8/hotspot/src/share/vm/runtime/vmStructs.cpp 2015-01-27 08:43:45.287624083 +0100 +@@ -680,6 +680,7 @@ + static_field(SystemDictionary, WK_KLASS(WeakReference_klass), Klass*) \ + static_field(SystemDictionary, WK_KLASS(FinalReference_klass), Klass*) \ + static_field(SystemDictionary, WK_KLASS(PhantomReference_klass), Klass*) \ ++ static_field(SystemDictionary, WK_KLASS(Cleaner_klass), Klass*) \ + static_field(SystemDictionary, WK_KLASS(Finalizer_klass), Klass*) \ + static_field(SystemDictionary, WK_KLASS(Thread_klass), Klass*) \ + static_field(SystemDictionary, WK_KLASS(ThreadGroup_klass), Klass*) \ +--- jdk8/hotspot/src/share/vm/services/mallocTracker.cpp 2015-01-27 08:42:54.015817226 +0100 ++++ jdk8/hotspot/src/share/vm/services/mallocTracker.cpp 2015-01-27 08:43:45.287624083 +0100 @@ -72,7 +72,7 @@ MallocMemorySummary::record_free(size(), flags()); @@ -6764,8 +8132,8 @@ #ifdef ASSERT if (level > NMT_minimal) { // Read back ---- jdk8/hotspot/src/share/vm/services/mallocTracker.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/services/mallocTracker.hpp 2015-01-08 21:23:31.194147808 +0100 +--- jdk8/hotspot/src/share/vm/services/mallocTracker.hpp 2015-01-27 08:42:54.015817226 +0100 ++++ jdk8/hotspot/src/share/vm/services/mallocTracker.hpp 2015-01-27 08:43:45.287624083 +0100 @@ -239,46 +239,33 @@ class MallocHeader VALUE_OBJ_CLASS_SPEC { @@ -6889,8 +8257,8 @@ return header; } }; ---- jdk8/hotspot/src/share/vm/services/mallocTracker.inline.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/services/mallocTracker.inline.hpp 2015-01-08 21:23:31.194147808 +0100 +--- jdk8/hotspot/src/share/vm/services/mallocTracker.inline.hpp 2015-01-27 08:42:54.015817226 +0100 ++++ jdk8/hotspot/src/share/vm/services/mallocTracker.inline.hpp 2015-01-27 08:43:45.287624083 +0100 @@ -28,13 +28,6 @@ #include "services/mallocTracker.hpp" #include "services/memTracker.hpp" @@ -6905,8 +8273,8 @@ inline void* MallocTracker::get_base(void* memblock){ return get_base(memblock, MemTracker::tracking_level()); } ---- jdk8/hotspot/src/share/vm/services/runtimeService.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/services/runtimeService.cpp 2015-01-08 21:23:31.194147808 +0100 +--- jdk8/hotspot/src/share/vm/services/runtimeService.cpp 2015-01-27 08:42:54.015817226 +0100 ++++ jdk8/hotspot/src/share/vm/services/runtimeService.cpp 2015-01-27 08:43:45.287624083 +0100 @@ -46,6 +46,7 @@ PerfCounter* RuntimeService::_thread_interrupt_signaled_count = NULL; PerfCounter* RuntimeService::_interrupted_before_count = NULL; @@ -6946,8 +8314,8 @@ } // update the time stamp to begin recording app time ---- jdk8/hotspot/src/share/vm/services/runtimeService.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/services/runtimeService.hpp 2015-01-08 21:23:31.195147784 +0100 +--- jdk8/hotspot/src/share/vm/services/runtimeService.hpp 2015-01-27 08:42:54.015817226 +0100 ++++ jdk8/hotspot/src/share/vm/services/runtimeService.hpp 2015-01-27 08:43:45.287624083 +0100 @@ -40,6 +40,7 @@ static TimeStamp _safepoint_timer; @@ -6956,16 +8324,16 @@ public: static void init(); ---- jdk8/hotspot/src/share/vm/trace/noTraceBackend.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/trace/noTraceBackend.hpp 2015-01-08 21:23:31.195147784 +0100 +--- jdk8/hotspot/src/share/vm/trace/noTraceBackend.hpp 2015-01-27 08:42:54.017817180 +0100 ++++ jdk8/hotspot/src/share/vm/trace/noTraceBackend.hpp 2015-01-27 08:43:45.288624059 +0100 @@ -41,4 +41,4 @@ typedef NoTraceBackend Tracing; -#endif +#endif // SHARE_VM_TRACE_NOTRACEBACKEND_HPP ---- jdk8/hotspot/src/share/vm/trace/traceBackend.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/trace/traceBackend.hpp 2015-01-08 21:23:31.195147784 +0100 +--- jdk8/hotspot/src/share/vm/trace/traceBackend.hpp 2015-01-27 08:42:54.017817180 +0100 ++++ jdk8/hotspot/src/share/vm/trace/traceBackend.hpp 2015-01-27 08:43:45.288624059 +0100 @@ -58,9 +56,7 @@ typedef TraceBackend Tracing; @@ -6979,8 +8347,8 @@ -#endif /* SHARE_VM_TRACE_TRACEBACKEND_HPP */ +#endif // INCLUDE_TRACE +#endif // SHARE_VM_TRACE_TRACEBACKEND_HPP ---- jdk8/hotspot/src/share/vm/trace/traceEventClasses.xsl 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/trace/traceEventClasses.xsl 2015-01-08 21:23:31.195147784 +0100 +--- jdk8/hotspot/src/share/vm/trace/traceEventClasses.xsl 2015-01-27 08:42:54.017817180 +0100 ++++ jdk8/hotspot/src/share/vm/trace/traceEventClasses.xsl 2015-01-27 08:43:45.288624059 +0100 @@ -51,7 +48,7 @@ @@ -7002,8 +8370,8 @@ ---- jdk8/hotspot/src/share/vm/trace/traceEvent.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/trace/traceEvent.hpp 2015-01-08 21:23:31.195147784 +0100 +--- jdk8/hotspot/src/share/vm/trace/traceEvent.hpp 2015-01-27 08:42:54.017817180 +0100 ++++ jdk8/hotspot/src/share/vm/trace/traceEvent.hpp 2015-01-27 08:43:45.288624059 +0100 @@ -154,6 +153,5 @@ } }; @@ -7013,8 +8381,8 @@ -#endif /* SHARE_VM_TRACE_TRACEEVENT_HPP */ +#endif // INCLUDE_TRACE +#endif // SHARE_VM_TRACE_TRACEEVENT_HPP ---- jdk8/hotspot/src/share/vm/trace/traceEventIds.xsl 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/trace/traceEventIds.xsl 2015-01-08 21:23:31.195147784 +0100 +--- jdk8/hotspot/src/share/vm/trace/traceEventIds.xsl 2015-01-27 08:42:54.017817180 +0100 ++++ jdk8/hotspot/src/share/vm/trace/traceEventIds.xsl 2015-01-27 08:43:45.288624059 +0100 @@ -29,13 +29,11 @@ @@ -7042,8 +8410,8 @@ ---- jdk8/hotspot/src/share/vm/trace/traceMacros.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/trace/traceMacros.hpp 2015-01-08 21:23:31.195147784 +0100 +--- jdk8/hotspot/src/share/vm/trace/traceMacros.hpp 2015-01-27 08:42:54.017817180 +0100 ++++ jdk8/hotspot/src/share/vm/trace/traceMacros.hpp 2015-01-27 08:43:45.288624059 +0100 @@ -22,8 +22,8 @@ * */ @@ -7061,8 +8429,8 @@ -#endif +#endif // SHARE_VM_TRACE_TRACEMACROS_HPP ---- jdk8/hotspot/src/share/vm/trace/traceStream.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/trace/traceStream.hpp 2015-01-08 21:23:31.196147760 +0100 +--- jdk8/hotspot/src/share/vm/trace/traceStream.hpp 2015-01-27 08:42:54.017817180 +0100 ++++ jdk8/hotspot/src/share/vm/trace/traceStream.hpp 2015-01-27 08:43:45.288624059 +0100 @@ -117,5 +115,5 @@ } }; @@ -7071,8 +8439,8 @@ -#endif /* SHARE_VM_TRACE_TRACESTREAM_HPP */ +#endif // INCLUDE_TRACE +#endif // SHARE_VM_TRACE_TRACESTREAM_HPP ---- jdk8/hotspot/src/share/vm/trace/traceTypes.xsl 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/trace/traceTypes.xsl 2015-01-08 21:23:31.196147760 +0100 +--- jdk8/hotspot/src/share/vm/trace/traceTypes.xsl 2015-01-27 08:42:54.017817180 +0100 ++++ jdk8/hotspot/src/share/vm/trace/traceTypes.xsl 2015-01-27 08:43:45.288624059 +0100 @@ -29,8 +29,8 @@ @@ -7102,8 +8470,16 @@ ---- jdk8/hotspot/src/share/vm/utilities/accessFlags.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/utilities/accessFlags.cpp 2015-01-08 21:23:31.196147760 +0100 +--- jdk8/hotspot/src/share/vm/trace/tracing.hpp 2015-01-27 08:42:54.017817180 +0100 ++++ jdk8/hotspot/src/share/vm/trace/tracing.hpp 2015-01-27 08:43:45.289624036 +0100 +@@ -28,4 +28,4 @@ + #include "tracefiles/traceEventClasses.hpp" + #include "tracefiles/traceEventIds.hpp" + +-#endif ++#endif // SHARE_VM_TRACE_TRACING_HPP +--- jdk8/hotspot/src/share/vm/utilities/accessFlags.cpp 2015-01-27 08:42:54.017817180 +0100 ++++ jdk8/hotspot/src/share/vm/utilities/accessFlags.cpp 2015-01-27 08:43:45.289624036 +0100 @@ -62,6 +62,21 @@ } while(f != old_flags); } @@ -7126,8 +8502,8 @@ #if !defined(PRODUCT) || INCLUDE_JVMTI void AccessFlags::print_on(outputStream* st) const { ---- jdk8/hotspot/src/share/vm/utilities/accessFlags.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/utilities/accessFlags.hpp 2015-01-08 21:23:31.196147760 +0100 +--- jdk8/hotspot/src/share/vm/utilities/accessFlags.hpp 2015-01-27 08:42:54.017817180 +0100 ++++ jdk8/hotspot/src/share/vm/utilities/accessFlags.hpp 2015-01-27 08:43:45.289624036 +0100 @@ -170,6 +170,7 @@ // Atomic update of flags @@ -7153,7 +8529,7 @@ } // Conversion --- jdk8/hotspot/src/share/vm/utilities/chunkedList.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/utilities/chunkedList.cpp 2015-01-08 21:23:31.196147760 +0100 ++++ jdk8/hotspot/src/share/vm/utilities/chunkedList.cpp 2015-01-27 08:43:45.289624036 +0100 @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. @@ -7265,7 +8641,7 @@ + +#endif --- jdk8/hotspot/src/share/vm/utilities/chunkedList.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/utilities/chunkedList.hpp 2015-01-08 21:23:31.196147760 +0100 ++++ jdk8/hotspot/src/share/vm/utilities/chunkedList.hpp 2015-01-27 08:43:45.289624036 +0100 @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. @@ -7348,8 +8724,8 @@ +}; + +#endif // SHARE_VM_UTILITIES_CHUNKED_LIST_HPP ---- jdk8/hotspot/src/share/vm/utilities/debug.cpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/utilities/debug.cpp 2015-01-08 21:23:31.197147736 +0100 +--- jdk8/hotspot/src/share/vm/utilities/debug.cpp 2015-01-27 08:42:54.018817157 +0100 ++++ jdk8/hotspot/src/share/vm/utilities/debug.cpp 2015-01-27 08:43:45.289624036 +0100 @@ -266,17 +266,19 @@ "native memory for metadata", "shared read only space", @@ -7373,8 +8749,8 @@ "to increase the initial size of %s.\n", name[shared_space], flag[shared_space], name[shared_space]); exit(2); ---- jdk8/hotspot/src/share/vm/utilities/debug.hpp 2015-01-06 16:57:27.000000000 +0100 -+++ jdk8/hotspot/src/share/vm/utilities/debug.hpp 2015-01-08 21:23:31.197147736 +0100 +--- jdk8/hotspot/src/share/vm/utilities/debug.hpp 2015-01-27 08:42:54.018817157 +0100 ++++ jdk8/hotspot/src/share/vm/utilities/debug.hpp 2015-01-27 08:43:45.290624013 +0100 @@ -246,7 +246,8 @@ SharedPermGen, SharedReadOnly, @@ -7385,3 +8761,332 @@ }; void report_out_of_shared_space(SharedSpaceType space_type); +--- jdk8/hotspot/src/share/vm/utilities/defaultStream.hpp 2015-01-27 08:42:54.018817157 +0100 ++++ jdk8/hotspot/src/share/vm/utilities/defaultStream.hpp 2015-01-27 08:43:45.290624013 +0100 +@@ -41,6 +41,8 @@ + + void init(); + void init_log(); ++ fileStream* open_file(const char* log_name); ++ void start_log(); + void finish_log(); + void finish_log_on_error(char *buf, int buflen); + public: +--- jdk8/hotspot/src/share/vm/utilities/ostream.cpp 2015-01-27 08:42:54.019817133 +0100 ++++ jdk8/hotspot/src/share/vm/utilities/ostream.cpp 2015-01-27 08:43:45.290624013 +0100 +@@ -370,7 +370,6 @@ + + #define EXTRACHARLEN 32 + #define CURRENTAPPX ".current" +-#define FILENAMEBUFLEN 1024 + // convert YYYY-MM-DD HH:MM:SS to YYYY-MM-DD_HH-MM-SS + char* get_datetime_string(char *buf, size_t len) { + os::local_time_string(buf, len); +@@ -404,7 +403,6 @@ + buffer_length = strlen(log_name) + 1; + } + +- // const char* star = strchr(basename, '*'); + const char* pts = strstr(basename, "%p"); + int pid_pos = (pts == NULL) ? -1 : (pts - nametail); + +@@ -419,6 +417,11 @@ + buffer_length += strlen(tms); + } + ++ // File name is too long. ++ if (buffer_length > JVM_MAXPATHLEN) { ++ return NULL; ++ } ++ + // Create big enough buffer. + char *buf = NEW_C_HEAP_ARRAY(char, buffer_length, mtInternal); + +@@ -492,46 +495,88 @@ + void test_loggc_filename() { + int pid; + char tms[32]; +- char i_result[FILENAMEBUFLEN]; ++ char i_result[JVM_MAXPATHLEN]; + const char* o_result; + get_datetime_string(tms, sizeof(tms)); + pid = os::current_process_id(); + + // test.log +- jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "test.log", tms); ++ jio_snprintf(i_result, JVM_MAXPATHLEN, "test.log", tms); + o_result = make_log_name_internal("test.log", NULL, pid, tms); + assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"test.log\", NULL)"); + FREE_C_HEAP_ARRAY(char, o_result, mtInternal); + + // test-%t-%p.log +- jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "test-%s-pid%u.log", tms, pid); ++ jio_snprintf(i_result, JVM_MAXPATHLEN, "test-%s-pid%u.log", tms, pid); + o_result = make_log_name_internal("test-%t-%p.log", NULL, pid, tms); + assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"test-%%t-%%p.log\", NULL)"); + FREE_C_HEAP_ARRAY(char, o_result, mtInternal); + + // test-%t%p.log +- jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "test-%spid%u.log", tms, pid); ++ jio_snprintf(i_result, JVM_MAXPATHLEN, "test-%spid%u.log", tms, pid); + o_result = make_log_name_internal("test-%t%p.log", NULL, pid, tms); + assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"test-%%t%%p.log\", NULL)"); + FREE_C_HEAP_ARRAY(char, o_result, mtInternal); + + // %p%t.log +- jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "pid%u%s.log", pid, tms); ++ jio_snprintf(i_result, JVM_MAXPATHLEN, "pid%u%s.log", pid, tms); + o_result = make_log_name_internal("%p%t.log", NULL, pid, tms); + assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"%%p%%t.log\", NULL)"); + FREE_C_HEAP_ARRAY(char, o_result, mtInternal); + + // %p-test.log +- jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "pid%u-test.log", pid); ++ jio_snprintf(i_result, JVM_MAXPATHLEN, "pid%u-test.log", pid); + o_result = make_log_name_internal("%p-test.log", NULL, pid, tms); + assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"%%p-test.log\", NULL)"); + FREE_C_HEAP_ARRAY(char, o_result, mtInternal); + + // %t.log +- jio_snprintf(i_result, sizeof(char)*FILENAMEBUFLEN, "%s.log", tms); ++ jio_snprintf(i_result, JVM_MAXPATHLEN, "%s.log", tms); + o_result = make_log_name_internal("%t.log", NULL, pid, tms); + assert(strcmp(i_result, o_result) == 0, "failed on testing make_log_name(\"%%t.log\", NULL)"); + FREE_C_HEAP_ARRAY(char, o_result, mtInternal); ++ ++ { ++ // longest filename ++ char longest_name[JVM_MAXPATHLEN]; ++ memset(longest_name, 'a', sizeof(longest_name)); ++ longest_name[JVM_MAXPATHLEN - 1] = '\0'; ++ o_result = make_log_name_internal((const char*)&longest_name, NULL, pid, tms); ++ assert(strcmp(longest_name, o_result) == 0, err_msg("longest name does not match. expected '%s' but got '%s'", longest_name, o_result)); ++ FREE_C_HEAP_ARRAY(char, o_result, mtInternal); ++ } ++ ++ { ++ // too long file name ++ char too_long_name[JVM_MAXPATHLEN + 100]; ++ int too_long_length = sizeof(too_long_name); ++ memset(too_long_name, 'a', too_long_length); ++ too_long_name[too_long_length - 1] = '\0'; ++ o_result = make_log_name_internal((const char*)&too_long_name, NULL, pid, tms); ++ assert(o_result == NULL, err_msg("Too long file name should return NULL, but got '%s'", o_result)); ++ } ++ ++ { ++ // too long with timestamp ++ char longest_name[JVM_MAXPATHLEN]; ++ memset(longest_name, 'a', JVM_MAXPATHLEN); ++ longest_name[JVM_MAXPATHLEN - 3] = '%'; ++ longest_name[JVM_MAXPATHLEN - 2] = 't'; ++ longest_name[JVM_MAXPATHLEN - 1] = '\0'; ++ o_result = make_log_name_internal((const char*)&longest_name, NULL, pid, tms); ++ assert(o_result == NULL, err_msg("Too long file name after timestamp expansion should return NULL, but got '%s'", o_result)); ++ } ++ ++ { ++ // too long with pid ++ char longest_name[JVM_MAXPATHLEN]; ++ memset(longest_name, 'a', JVM_MAXPATHLEN); ++ longest_name[JVM_MAXPATHLEN - 3] = '%'; ++ longest_name[JVM_MAXPATHLEN - 2] = 'p'; ++ longest_name[JVM_MAXPATHLEN - 1] = '\0'; ++ o_result = make_log_name_internal((const char*)&longest_name, NULL, pid, tms); ++ assert(o_result == NULL, err_msg("Too long file name after pid expansion should return NULL, but got '%s'", o_result)); ++ } + } + #endif // PRODUCT + +@@ -640,9 +685,16 @@ + _bytes_written = 0L; + _file_name = make_log_name(file_name, NULL); + ++ if (_file_name == NULL) { ++ warning("Cannot open file %s: file name is too long.\n", file_name); ++ _need_close = false; ++ UseGCLogFileRotation = false; ++ return; ++ } ++ + // gc log file rotation + if (UseGCLogFileRotation && NumberOfGCLogFiles > 1) { +- char tempbuf[FILENAMEBUFLEN]; ++ char tempbuf[JVM_MAXPATHLEN]; + jio_snprintf(tempbuf, sizeof(tempbuf), "%s.%d" CURRENTAPPX, _file_name, _cur_file_num); + _file = fopen(tempbuf, "w"); + } else { +@@ -674,10 +726,10 @@ + // concurrent GC threads to run parallel with VMThread at safepoint, write and rotate_log + // must be synchronized. + void gcLogFileStream::rotate_log(bool force, outputStream* out) { +- char time_msg[FILENAMEBUFLEN]; ++ char time_msg[O_BUFLEN]; + char time_str[EXTRACHARLEN]; +- char current_file_name[FILENAMEBUFLEN]; +- char renamed_file_name[FILENAMEBUFLEN]; ++ char current_file_name[JVM_MAXPATHLEN]; ++ char renamed_file_name[JVM_MAXPATHLEN]; + + if (!should_rotate(force)) { + return; +@@ -716,12 +768,15 @@ + // have a form of extended_filename..current where i is the current rotation + // file number. After it reaches max file size, the file will be saved and renamed + // with .current removed from its tail. +- size_t filename_len = strlen(_file_name); + if (_file != NULL) { +- jio_snprintf(renamed_file_name, filename_len + EXTRACHARLEN, "%s.%d", +- _file_name, _cur_file_num); +- jio_snprintf(current_file_name, filename_len + EXTRACHARLEN, "%s.%d" CURRENTAPPX, ++ jio_snprintf(renamed_file_name, JVM_MAXPATHLEN, "%s.%d", + _file_name, _cur_file_num); ++ int result = jio_snprintf(current_file_name, JVM_MAXPATHLEN, ++ "%s.%d" CURRENTAPPX, _file_name, _cur_file_num); ++ if (result >= JVM_MAXPATHLEN) { ++ warning("Cannot create new log file name: %s: file name is too long.\n", current_file_name); ++ return; ++ } + + const char* msg = force ? "GC log rotation request has been received." + : "GC log file has reached the maximum size."; +@@ -760,19 +815,23 @@ + + _cur_file_num++; + if (_cur_file_num > NumberOfGCLogFiles - 1) _cur_file_num = 0; +- jio_snprintf(current_file_name, filename_len + EXTRACHARLEN, "%s.%d" CURRENTAPPX, ++ int result = jio_snprintf(current_file_name, JVM_MAXPATHLEN, "%s.%d" CURRENTAPPX, + _file_name, _cur_file_num); ++ if (result >= JVM_MAXPATHLEN) { ++ warning("Cannot create new log file name: %s: file name is too long.\n", current_file_name); ++ return; ++ } ++ + _file = fopen(current_file_name, "w"); + + if (_file != NULL) { + _bytes_written = 0L; + _need_close = true; + // reuse current_file_name for time_msg +- jio_snprintf(current_file_name, filename_len + EXTRACHARLEN, ++ jio_snprintf(current_file_name, JVM_MAXPATHLEN, + "%s.%d", _file_name, _cur_file_num); + jio_snprintf(time_msg, sizeof(time_msg), "%s GC log file created %s\n", +- os::local_time_string((char *)time_str, sizeof(time_str)), +- current_file_name); ++ os::local_time_string((char *)time_str, sizeof(time_str)), current_file_name); + write(time_msg, strlen(time_msg)); + + if (out != NULL) { +@@ -820,32 +879,64 @@ + return _log_file != NULL; + } + +-void defaultStream::init_log() { +- // %%% Need a MutexLocker? +- const char* log_name = LogFile != NULL ? LogFile : "hotspot_%p.log"; ++fileStream* defaultStream::open_file(const char* log_name) { + const char* try_name = make_log_name(log_name, NULL); ++ if (try_name == NULL) { ++ warning("Cannot open file %s: file name is too long.\n", log_name); ++ return NULL; ++ } ++ + fileStream* file = new(ResourceObj::C_HEAP, mtInternal) fileStream(try_name); +- if (!file->is_open()) { +- // Try again to open the file. ++ FREE_C_HEAP_ARRAY(char, try_name, mtInternal); ++ if (file->is_open()) { ++ return file; ++ } ++ ++ // 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", try_name); ++ 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); +- FREE_C_HEAP_ARRAY(char, try_name, mtInternal); + 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); +- delete file; ++ + file = new(ResourceObj::C_HEAP, mtInternal) fileStream(try_name); +- } + FREE_C_HEAP_ARRAY(char, try_name, mtInternal); +- + if (file->is_open()) { ++ return file; ++ } ++ ++ delete file; ++ return NULL; ++} ++ ++void defaultStream::init_log() { ++ // %%% Need a MutexLocker? ++ const char* log_name = LogFile != NULL ? LogFile : "hotspot_%p.log"; ++ fileStream* file = open_file(log_name); ++ ++ if (file != NULL) { + _log_file = file; +- xmlStream* xs = new(ResourceObj::C_HEAP, mtInternal) xmlStream(file); +- _outer_xmlStream = xs; ++ _outer_xmlStream = new(ResourceObj::C_HEAP, mtInternal) xmlStream(file); ++ start_log(); ++ } else { ++ // and leave xtty as NULL ++ LogVMOutput = false; ++ DisplayVMOutput = true; ++ LogCompilation = false; ++ } ++} ++ ++void defaultStream::start_log() { ++ xmlStream*xs = _outer_xmlStream; + if (this == tty) xtty = xs; + // Write XML header. + xs->print_cr(""); +@@ -900,13 +991,6 @@ + xs->head("tty"); + // All further non-markup text gets copied to the tty: + xs->_text = this; // requires friend declaration! +- } else { +- delete(file); +- // and leave xtty as NULL +- LogVMOutput = false; +- DisplayVMOutput = true; +- LogCompilation = false; +- } + } + + // finish_log() is called during normal VM shutdown. finish_log_on_error() is +--- jdk8/hotspot/src/share/vm/utilities/vmError.cpp 2015-01-27 08:42:54.019817133 +0100 ++++ jdk8/hotspot/src/share/vm/utilities/vmError.cpp 2015-01-27 08:43:45.290624013 +0100 +@@ -22,6 +22,7 @@ + * + */ + ++#include + #include "precompiled.hpp" + #include "compiler/compileBroker.hpp" + #include "gc_interface/collectedHeap.hpp" +@@ -841,7 +842,8 @@ + static int expand_and_open(const char* pattern, char* buf, size_t buflen, size_t pos) { + int fd = -1; + if (Arguments::copy_expand_pid(pattern, strlen(pattern), &buf[pos], buflen - pos)) { +- fd = open(buf, O_RDWR | O_CREAT | O_TRUNC, 0666); ++ // the O_EXCL flag will cause the open to fail if the file exists ++ fd = open(buf, O_RDWR | O_CREAT | O_EXCL, 0666); + } + return fd; + } diff --git a/java-1_8_0-openjdk.changes b/java-1_8_0-openjdk.changes index bf5012e..3a461be 100644 --- a/java-1_8_0-openjdk.changes +++ b/java-1_8_0-openjdk.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Jan 27 07:52:58 UTC 2015 - fstrba@suse.com + +- Removed patch + * aarch64-b12tob21.patch + - replaced by one that forward-ports to b22 +- Added patch + * aarch64-b12tob22.patch + - forward-port the aarch64 hotspot to b22. + ------------------------------------------------------------------- Sun Jan 25 18:06:11 UTC 2015 - fstrba@suse.com diff --git a/java-1_8_0-openjdk.spec b/java-1_8_0-openjdk.spec index 3cff399..f507d33 100644 --- a/java-1_8_0-openjdk.spec +++ b/java-1_8_0-openjdk.spec @@ -215,8 +215,8 @@ Patch8: compare-pointer-with-literal.patch Patch9: aarch64-misc.patch # From icedtea: Increase default memory limits Patch10: memory-limits.patch -# Changes from b21 backported to aarch64 which is on b12 -Patch11: aarch64-b12tob21.patch +# Changes from b22 backported to aarch64 which is on b12 +Patch11: aarch64-b12tob22.patch # Fix use of unintialized memory in adlc parser Patch12: adlc-parser.patch # Fix: implicit-pointer-decl