--- a/hotspot/src/share/vm/asm/codeBuffer.cpp Thu Jun 25 06:52:05 2015 -0700
+++ b/hotspot/src/share/vm/asm/codeBuffer.cpp Thu Jun 25 18:14:54 2015 +0000
@@ -1093,9 +1093,11 @@
void CodeStrings::assign(CodeStrings& other) {
other.check_valid();
- // Cannot do following because CodeStrings constructor is not alway run!
assert(is_null(), "Cannot assign onto non-empty CodeStrings");
_strings = other._strings;
+#ifdef ASSERT
+ _defunct = false;
+#endif
other.set_null_and_invalidate();
}
@@ -1115,13 +1117,15 @@
}
}
+const char* CodeStrings::_prefix = " ;; "; // default: can be changed via set_prefix
+
void CodeStrings::print_block_comment(outputStream* stream, intptr_t offset) const {
check_valid();
if (_strings != NULL) {
CodeString* c = find(offset);
while (c && c->offset() == offset) {
stream->bol();
- stream->print(" ;; ");
+ stream->print("%s", _prefix);
stream->print_cr("%s", c->string());
c = c->next_comment();
}
--- a/hotspot/src/share/vm/asm/codeBuffer.hpp Thu Jun 25 06:52:05 2015 -0700
+++ b/hotspot/src/share/vm/asm/codeBuffer.hpp Thu Jun 25 18:14:54 2015 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -249,6 +249,7 @@
// Becomes true after copy-out, forbids further use.
bool _defunct; // Zero bit pattern is "valid", see memset call in decode_env::decode_env
#endif
+ static const char* _prefix; // defaults to " ;; "
#endif
CodeString* find(intptr_t offset) const;
@@ -289,13 +290,20 @@
void assign(CodeStrings& other) PRODUCT_RETURN;
// COPY strings from other to this; leave other valid.
void copy(CodeStrings& other) PRODUCT_RETURN;
+ // FREE strings; invalidate this.
void free() PRODUCT_RETURN;
- // Guarantee that _strings are used at most once; assign invalidates a buffer.
+ // Guarantee that _strings are used at most once; assign and free invalidate a buffer.
inline void check_valid() const {
#ifdef ASSERT
assert(!_defunct, "Use of invalid CodeStrings");
#endif
}
+
+ static void set_prefix(const char *prefix) {
+#ifndef PRODUCT
+ _prefix = prefix;
+#endif
+ }
};
// A CodeBuffer describes a memory space into which assembly
@@ -379,6 +387,7 @@
_oop_recorder = NULL;
_decode_begin = NULL;
_overflow_arena = NULL;
+ _code_strings = CodeStrings();
}
void initialize(address code_start, csize_t code_size) {
--- a/hotspot/src/share/vm/code/codeBlob.cpp Thu Jun 25 06:52:05 2015 -0700
+++ b/hotspot/src/share/vm/code/codeBlob.cpp Thu Jun 25 18:14:54 2015 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -88,6 +88,7 @@
_data_offset = size;
_frame_size = 0;
set_oop_maps(NULL);
+ _strings = CodeStrings();
}
@@ -114,6 +115,7 @@
_code_offset = _content_offset + cb->total_offset_of(cb->insts());
_data_offset = _content_offset + round_to(cb->total_content_size(), oopSize);
assert(_data_offset <= size, "codeBlob is too small");
+ _strings = CodeStrings();
cb->copy_code_and_locs_to(this);
set_oop_maps(oop_maps);
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.cpp Thu Jun 25 06:52:05 2015 -0700
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.cpp Thu Jun 25 18:14:54 2015 +0000
@@ -488,19 +488,17 @@
DEBUG_ONLY(fill_args_check(start, words);)
HandleMark hm; // Free handles before leaving.
-#ifdef _LP64
- // A single array can fill ~8G, so multiple objects are needed only in 64-bit.
- // First fill with arrays, ensuring that any remaining space is big enough to
- // fill. The remainder is filled with a single object.
+ // Multiple objects may be required depending on the filler array maximum size. Fill
+ // the range up to that with objects that are filler_array_max_size sized. The
+ // remainder is filled with a single object.
const size_t min = min_fill_size();
const size_t max = filler_array_max_size();
while (words > max) {
- const size_t cur = words - max >= min ? max : max - min;
+ const size_t cur = (words - max) >= min ? max : max - min;
fill_with_array(start, cur, zap);
start += cur;
words -= cur;
}
-#endif
fill_with_object_impl(start, words, zap);
}
--- a/hotspot/test/testlibrary/ctw/Makefile Thu Jun 25 06:52:05 2015 -0700
+++ b/hotspot/test/testlibrary/ctw/Makefile Thu Jun 25 18:14:54 2015 +0000
@@ -8,7 +8,7 @@
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
--- a/hotspot/test/testlibrary/ctw/README Thu Jun 25 06:52:05 2015 -0700
+++ b/hotspot/test/testlibrary/ctw/README Thu Jun 25 18:14:54 2015 +0000
@@ -1,26 +1,26 @@
-#
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
+
+Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+This code is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 2 only, as
+published by the Free Software Foundation.
+
+This code is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+version 2 for more details (a copy is included in the LICENSE file that
+accompanied this code).
+
+You should have received a copy of the GNU General Public License version
+2 along with this work; if not, write to the Free Software Foundation,
+Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+or visit www.oracle.com if you need additional information or have any
+questions.
+
+
DESCRIPTION