This commit is contained in:
Jesper Wilhelmsson 2014-11-17 21:32:32 +01:00
commit 2616e09389
67 changed files with 184 additions and 164 deletions

@ -214,7 +214,7 @@ ifeq ($(USE_CLANG), true)
WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
endif
WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2
WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wreturn-type
ifeq ($(USE_CLANG),)
# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit

@ -27,6 +27,7 @@
#define CPU_PPC_VM_MACROASSEMBLER_PPC_HPP
#include "asm/assembler.hpp"
#include "utilities/macros.hpp"
// MacroAssembler extends Assembler by a few frequently used macros.

@ -1210,6 +1210,7 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
Unimplemented();
return 0; // Mute compiler
}
#ifndef PRODUCT

@ -422,7 +422,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// return the name of the user that owns the JVM indicated by the given vmid.
//
static char* get_user_name(int vmid, TRAPS) {
return get_user_name_slow(vmid, CHECK_NULL);
return get_user_name_slow(vmid, THREAD);
}
// return the file name of the backing store file for the named

@ -422,7 +422,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// return the name of the user that owns the JVM indicated by the given vmid.
//
static char* get_user_name(int vmid, TRAPS) {
return get_user_name_slow(vmid, CHECK_NULL);
return get_user_name_slow(vmid, THREAD);
}
// return the file name of the backing store file for the named

@ -68,6 +68,7 @@
#include "utilities/events.hpp"
#include "utilities/elfFile.hpp"
#include "utilities/growableArray.hpp"
#include "utilities/macros.hpp"
#include "utilities/vmError.hpp"
// put OS-includes here

@ -422,7 +422,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// return the name of the user that owns the JVM indicated by the given vmid.
//
static char* get_user_name(int vmid, TRAPS) {
return get_user_name_slow(vmid, CHECK_NULL);
return get_user_name_slow(vmid, THREAD);
}
// return the file name of the backing store file for the named

@ -461,7 +461,7 @@ static char* get_user_name(int vmid, TRAPS) {
// since the structured procfs and old procfs interfaces can't be
// mixed, we attempt to find the file through a directory search.
return get_user_name_slow(vmid, CHECK_NULL);
return get_user_name_slow(vmid, THREAD);
}
// return the file name of the backing store file for the named

@ -542,6 +542,7 @@ JVM_handle_linux_signal(int sig,
err.report_and_die();
ShouldNotReachHere();
return true; // Mute compiler
}
void os::Linux::init_thread_fpu_state(void) {

@ -46,6 +46,7 @@
#include "oops/oop.inline.hpp"
#include "oops/oop.inline2.hpp"
#include "runtime/fieldType.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
# include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#endif

@ -332,7 +332,7 @@ class CompileReplay : public StackObj {
// Lookup a klass
Klass* resolve_klass(const char* klass, TRAPS) {
Symbol* klass_name = SymbolTable::lookup(klass, (int)strlen(klass), CHECK_NULL);
return SystemDictionary::resolve_or_fail(klass_name, _loader, _protection_domain, true, CHECK_NULL);
return SystemDictionary::resolve_or_fail(klass_name, _loader, _protection_domain, true, THREAD);
}
// Parse the standard tuple of <klass> <name> <signature>

@ -31,9 +31,6 @@
#include "classfile/javaClasses.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp"
#if INCLUDE_CDS
#include "classfile/systemDictionaryShared.hpp"
#endif
#include "classfile/verificationType.hpp"
#include "classfile/verifier.hpp"
#include "classfile/vmSymbols.hpp"
@ -63,7 +60,11 @@
#include "services/threadService.hpp"
#include "utilities/array.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
#include "utilities/ostream.hpp"
#if INCLUDE_CDS
#include "classfile/systemDictionaryShared.hpp"
#endif
// We generally try to create the oops directly when parsing, rather than
// allocating temporary data structures and copying the bytes twice. A

@ -29,10 +29,6 @@
#include "classfile/classLoaderExt.hpp"
#include "classfile/classLoaderData.inline.hpp"
#include "classfile/javaClasses.hpp"
#if INCLUDE_CDS
#include "classfile/sharedPathsMiscInfo.hpp"
#include "classfile/sharedClassUtil.hpp"
#endif
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
#include "compiler/compileBroker.hpp"
@ -64,8 +60,13 @@
#include "services/management.hpp"
#include "services/threadService.hpp"
#include "utilities/events.hpp"
#include "utilities/hashtable.hpp"
#include "utilities/hashtable.inline.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_CDS
#include "classfile/sharedPathsMiscInfo.hpp"
#include "classfile/sharedClassUtil.hpp"
#endif
// Entry points in zip.dll for loading zip/jar file entries

@ -27,6 +27,7 @@
#include "classfile/classFileParser.hpp"
#include "runtime/perfData.hpp"
#include "utilities/macros.hpp"
// The VM class loader.
#include <sys/stat.h>

@ -472,7 +472,7 @@ void ClassLoaderData::free_deallocate_list() {
// These anonymous class loaders are to contain classes used for JSR292
ClassLoaderData* ClassLoaderData::anonymous_class_loader_data(oop loader, TRAPS) {
// Add a new class loader data to the graph.
return ClassLoaderDataGraph::add(loader, true, CHECK_NULL);
return ClassLoaderDataGraph::add(loader, true, THREAD);
}
const char* ClassLoaderData::loader_name() {

@ -493,7 +493,7 @@ class MethodFamily : public ResourceObj {
};
Symbol* MethodFamily::generate_no_defaults_message(TRAPS) const {
return SymbolTable::new_symbol("No qualifying defaults found", CHECK_NULL);
return SymbolTable::new_symbol("No qualifying defaults found", THREAD);
}
Symbol* MethodFamily::generate_method_message(Symbol *klass_name, Method* method, TRAPS) const {
@ -506,7 +506,7 @@ Symbol* MethodFamily::generate_method_message(Symbol *klass_name, Method* method
ss.write((const char*)name->bytes(), name->utf8_length());
ss.write((const char*)signature->bytes(), signature->utf8_length());
ss.print(" is abstract");
return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
}
Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods, TRAPS) const {
@ -521,7 +521,7 @@ Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods
ss.print(".");
ss.write((const char*)name->bytes(), name->utf8_length());
}
return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
}

@ -1952,7 +1952,7 @@ Handle java_lang_reflect_Method::create(TRAPS) {
// This class is eagerly initialized during VM initialization, since we keep a refence
// to one of the methods
assert(InstanceKlass::cast(klass)->is_initialized(), "must be initialized");
return InstanceKlass::cast(klass)->allocate_instance_handle(CHECK_NH);
return InstanceKlass::cast(klass)->allocate_instance_handle(THREAD);
}
oop java_lang_reflect_Method::clazz(oop reflect) {
@ -2130,7 +2130,7 @@ Handle java_lang_reflect_Constructor::create(TRAPS) {
instanceKlassHandle klass (THREAD, k);
// Ensure it is initialized
klass->initialize(CHECK_NH);
return klass->allocate_instance_handle(CHECK_NH);
return klass->allocate_instance_handle(THREAD);
}
oop java_lang_reflect_Constructor::clazz(oop reflect) {
@ -2270,7 +2270,7 @@ Handle java_lang_reflect_Field::create(TRAPS) {
instanceKlassHandle klass (THREAD, k);
// Ensure it is initialized
klass->initialize(CHECK_NH);
return klass->allocate_instance_handle(CHECK_NH);
return klass->allocate_instance_handle(THREAD);
}
oop java_lang_reflect_Field::clazz(oop reflect) {
@ -2397,7 +2397,7 @@ Handle java_lang_reflect_Parameter::create(TRAPS) {
instanceKlassHandle klass (THREAD, k);
// Ensure it is initialized
klass->initialize(CHECK_NH);
return klass->allocate_instance_handle(CHECK_NH);
return klass->allocate_instance_handle(THREAD);
}
oop java_lang_reflect_Parameter::name(oop param) {
@ -2447,7 +2447,7 @@ Handle sun_reflect_ConstantPool::create(TRAPS) {
instanceKlassHandle klass (THREAD, k);
// Ensure it is initialized
klass->initialize(CHECK_NH);
return klass->allocate_instance_handle(CHECK_NH);
return klass->allocate_instance_handle(THREAD);
}

@ -36,6 +36,7 @@
#include "runtime/atomic.inline.hpp"
#include "runtime/mutexLocker.hpp"
#include "utilities/hashtable.inline.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#include "gc_implementation/g1/g1StringDedup.hpp"

@ -235,7 +235,7 @@ Symbol* SymbolTable::lookup(const char* name, int len, TRAPS) {
MutexLocker ml(SymbolTable_lock, THREAD);
// Otherwise, add to symbol to table
return the_table()->basic_add(index, (u1*)name, len, hashValue, true, CHECK_NULL);
return the_table()->basic_add(index, (u1*)name, len, hashValue, true, THREAD);
}
Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
@ -274,7 +274,7 @@ Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
// Grab SymbolTable_lock first.
MutexLocker ml(SymbolTable_lock, THREAD);
return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, CHECK_NULL);
return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, THREAD);
}
Symbol* SymbolTable::lookup_only(const char* name, int len,

@ -31,10 +31,6 @@
#include "classfile/resolutionErrors.hpp"
#include "classfile/stringTable.hpp"
#include "classfile/systemDictionary.hpp"
#if INCLUDE_CDS
#include "classfile/sharedClassUtil.hpp"
#include "classfile/systemDictionaryShared.hpp"
#endif
#include "classfile/vmSymbols.hpp"
#include "compiler/compileBroker.hpp"
#include "interpreter/bytecodeStream.hpp"
@ -65,7 +61,10 @@
#include "services/threadService.hpp"
#include "utilities/macros.hpp"
#include "utilities/ticks.hpp"
#if INCLUDE_CDS
#include "classfile/sharedClassUtil.hpp"
#include "classfile/systemDictionaryShared.hpp"
#endif
#if INCLUDE_TRACE
#include "trace/tracing.hpp"
#endif
@ -123,7 +122,7 @@ void SystemDictionary::compute_java_system_loader(TRAPS) {
ClassLoaderData* SystemDictionary::register_loader(Handle class_loader, TRAPS) {
if (class_loader() == NULL) return ClassLoaderData::the_null_class_loader_data();
return ClassLoaderDataGraph::find_or_create(class_loader, CHECK_NULL);
return ClassLoaderDataGraph::find_or_create(class_loader, THREAD);
}
// ----------------------------------------------------------------------------
@ -233,15 +232,15 @@ Klass* SystemDictionary::resolve_or_null(Symbol* class_name, Handle class_loader
class_name->as_C_string(),
class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string()));
if (FieldType::is_array(class_name)) {
return resolve_array_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
return resolve_array_class_or_null(class_name, class_loader, protection_domain, THREAD);
} else if (FieldType::is_obj(class_name)) {
ResourceMark rm(THREAD);
// Ignore wrapping L and ;.
TempNewSymbol name = SymbolTable::new_symbol(class_name->as_C_string() + 1,
class_name->utf8_length() - 2, CHECK_NULL);
return resolve_instance_class_or_null(name, class_loader, protection_domain, CHECK_NULL);
return resolve_instance_class_or_null(name, class_loader, protection_domain, THREAD);
} else {
return resolve_instance_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
return resolve_instance_class_or_null(class_name, class_loader, protection_domain, THREAD);
}
}

@ -289,7 +289,7 @@ class VerificationType VALUE_OBJ_CLASS_SPEC {
if (is_reference() && from.is_reference()) {
return is_reference_assignable_from(from, context,
from_field_is_protected,
CHECK_false);
THREAD);
} else {
return false;
}

@ -1927,7 +1927,7 @@ Klass* ClassVerifier::load_class(Symbol* name, TRAPS) {
return SystemDictionary::resolve_or_fail(
name, Handle(THREAD, loader), Handle(THREAD, protection_domain),
true, CHECK_NULL);
true, THREAD);
}
bool ClassVerifier::is_protected_access(instanceKlassHandle this_class,

@ -42,8 +42,12 @@ PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
void VM_CMS_Operation::acquire_pending_list_lock() {
// The caller may block while communicating
// with the SLT thread in order to acquire/release the PLL.
ConcurrentMarkSweepThread::slt()->
manipulatePLL(SurrogateLockerThread::acquirePLL);
SurrogateLockerThread* slt = ConcurrentMarkSweepThread::slt();
if (slt != NULL) {
slt->manipulatePLL(SurrogateLockerThread::acquirePLL);
} else {
SurrogateLockerThread::report_missing_slt();
}
}
void VM_CMS_Operation::release_and_notify_pending_list_lock() {

@ -4270,10 +4270,11 @@ void G1ParCopyClosure<barrier, do_mark_object>::do_oop_work(T* p) {
if (state == G1CollectedHeap::InCSet) {
oop forwardee;
if (obj->is_forwarded()) {
forwardee = obj->forwardee();
markOop m = obj->mark();
if (m->is_marked()) {
forwardee = (oop) m->decode_pointer();
} else {
forwardee = _par_scan_state->copy_to_survivor_space(obj);
forwardee = _par_scan_state->copy_to_survivor_space(obj, m);
}
assert(forwardee != NULL, "forwardee should not be NULL");
oopDesc::encode_store_heap_oop(p, forwardee);

@ -150,7 +150,8 @@ void G1ParScanThreadState::trim_queue() {
} while (!_refs->is_empty());
}
oop G1ParScanThreadState::copy_to_survivor_space(oop const old) {
oop G1ParScanThreadState::copy_to_survivor_space(oop const old,
markOop const old_mark) {
size_t word_sz = old->size();
HeapRegion* from_region = _g1h->heap_region_containing_raw(old);
// +1 to make the -1 indexes valid...
@ -158,9 +159,8 @@ oop G1ParScanThreadState::copy_to_survivor_space(oop const old) {
assert( (from_region->is_young() && young_index > 0) ||
(!from_region->is_young() && young_index == 0), "invariant" );
G1CollectorPolicy* g1p = _g1h->g1_policy();
markOop m = old->mark();
int age = m->has_displaced_mark_helper() ? m->displaced_mark_helper()->age()
: m->age();
uint age = old_mark->has_displaced_mark_helper() ? old_mark->displaced_mark_helper()->age()
: old_mark->age();
GCAllocPurpose alloc_purpose = g1p->evacuation_destination(from_region, age,
word_sz);
AllocationContext_t context = from_region->allocation_context();
@ -196,30 +196,22 @@ oop G1ParScanThreadState::copy_to_survivor_space(oop const old) {
alloc_purpose = to_region->is_young() ? GCAllocForSurvived : GCAllocForTenured;
if (g1p->track_object_age(alloc_purpose)) {
// We could simply do obj->incr_age(). However, this causes a
// performance issue. obj->incr_age() will first check whether
// the object has a displaced mark by checking its mark word;
// getting the mark word from the new location of the object
// stalls. So, given that we already have the mark word and we
// are about to install it anyway, it's better to increase the
// age on the mark word, when the object does not have a
// displaced mark word. We're not expecting many objects to have
// a displaced marked word, so that case is not optimized
// further (it could be...) and we simply call obj->incr_age().
if (m->has_displaced_mark_helper()) {
// in this case, we have to install the mark word first,
if (age < markOopDesc::max_age) {
age++;
}
if (old_mark->has_displaced_mark_helper()) {
// In this case, we have to install the mark word first,
// otherwise obj looks to be forwarded (the old mark word,
// which contains the forward pointer, was copied)
obj->set_mark(m);
obj->incr_age();
obj->set_mark(old_mark);
markOop new_mark = old_mark->displaced_mark_helper()->set_age(age);
old_mark->set_displaced_mark_helper(new_mark);
} else {
m = m->incr_age();
obj->set_mark(m);
obj->set_mark(old_mark->set_age(age));
}
age_table()->add(obj, word_sz);
age_table()->add(age, word_sz);
} else {
obj->set_mark(m);
obj->set_mark(old_mark);
}
if (G1StringDedup::is_enabled()) {

@ -195,7 +195,7 @@ class G1ParScanThreadState : public StackObj {
inline void dispatch_reference(StarTask ref);
public:
oop copy_to_survivor_space(oop const obj);
oop copy_to_survivor_space(oop const obj, markOop const old_mark);
void trim_queue();

@ -41,10 +41,11 @@ template <class T> void G1ParScanThreadState::do_oop_evac(T* p, HeapRegion* from
G1CollectedHeap::in_cset_state_t in_cset_state = _g1h->in_cset_state(obj);
if (in_cset_state == G1CollectedHeap::InCSet) {
oop forwardee;
if (obj->is_forwarded()) {
forwardee = obj->forwardee();
markOop m = obj->mark();
if (m->is_marked()) {
forwardee = (oop) m->decode_pointer();
} else {
forwardee = copy_to_survivor_space(obj);
forwardee = copy_to_survivor_space(obj, m);
}
oopDesc::encode_store_heap_oop(p, forwardee);
} else if (in_cset_state == G1CollectedHeap::IsHumongous) {

@ -1004,10 +1004,13 @@ HeapWord* G1OffsetTableContigSpace::cross_threshold(HeapWord* start,
HeapWord* G1OffsetTableContigSpace::saved_mark_word() const {
G1CollectedHeap* g1h = G1CollectedHeap::heap();
assert( _gc_time_stamp <= g1h->get_gc_time_stamp(), "invariant" );
if (_gc_time_stamp < g1h->get_gc_time_stamp())
return top();
else
HeapWord* local_top = top();
OrderAccess::loadload();
if (_gc_time_stamp < g1h->get_gc_time_stamp()) {
return local_top;
} else {
return Space::saved_mark_word();
}
}
void G1OffsetTableContigSpace::record_top_and_timestamp() {

@ -213,8 +213,12 @@ void VM_CGC_Operation::acquire_pending_list_lock() {
assert(_needs_pll, "don't call this otherwise");
// The caller may block while communicating
// with the SLT thread in order to acquire/release the PLL.
ConcurrentMarkThread::slt()->
manipulatePLL(SurrogateLockerThread::acquirePLL);
SurrogateLockerThread* slt = ConcurrentMarkThread::slt();
if (slt != NULL) {
slt->manipulatePLL(SurrogateLockerThread::acquirePLL);
} else {
SurrogateLockerThread::report_missing_slt();
}
}
void VM_CGC_Operation::release_and_notify_pending_list_lock() {

@ -55,7 +55,10 @@ class ageTable VALUE_OBJ_CLASS_SPEC {
// add entry
void add(oop p, size_t oop_size) {
uint age = p->age();
add(p->age(), oop_size);
}
void add(uint age, size_t oop_size) {
assert(age > 0 && age < table_size, "invalid age of object");
sizes[age] += oop_size;
}

@ -138,6 +138,13 @@ SurrogateLockerThread* SurrogateLockerThread::make(TRAPS) {
return res;
}
void SurrogateLockerThread::report_missing_slt() {
vm_exit_during_initialization(
"GC before GC support fully initialized: "
"SLT is needed but has not yet been created.");
ShouldNotReachHere();
}
void SurrogateLockerThread::manipulatePLL(SLT_msg_type msg) {
MutexLockerEx x(&_monitor, Mutex::_no_safepoint_check_flag);
assert(_buffer == empty, "Should be empty");

@ -93,6 +93,9 @@ class SurrogateLockerThread: public JavaThread {
public:
static SurrogateLockerThread* make(TRAPS);
// Terminate VM with error message that SLT needed but not yet created.
static void report_missing_slt();
SurrogateLockerThread();
bool is_hidden_from_external_view() const { return true; }

@ -33,8 +33,8 @@
#include "memory/referenceProcessorStats.hpp"
#include "runtime/os.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
#include "utilities/ticks.inline.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/evacuationInfo.hpp"
#endif

@ -33,12 +33,11 @@
#include "memory/allocation.hpp"
#include "memory/metaspace.hpp"
#include "memory/referenceType.hpp"
#include "utilities/macros.hpp"
#include "utilities/ticks.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1YCTypes.hpp"
#endif
#include "utilities/macros.hpp"
#include "utilities/ticks.hpp"
class EvacuationInfo;
class GCHeapSummary;

@ -31,6 +31,7 @@
#include "runtime/os.hpp"
#include "trace/tracing.hpp"
#include "trace/traceBackend.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/evacuationInfo.hpp"
#include "gc_implementation/g1/g1YCTypes.hpp"

@ -50,8 +50,7 @@ void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data,
size_t word_size, bool read_only,
MetaspaceObj::Type type, TRAPS) throw() {
// Klass has it's own operator new
return Metaspace::allocate(loader_data, word_size, read_only,
type, CHECK_NULL);
return Metaspace::allocate(loader_data, word_size, read_only, type, THREAD);
}
bool MetaspaceObj::is_shared() const {

@ -23,8 +23,8 @@
*/
#include "precompiled.hpp"
#include "utilities/macros.hpp"
#include "gc_implementation/shared/allocationStats.hpp"
#include "gc_implementation/shared/spaceDecorator.hpp"
#include "memory/binaryTreeDictionary.hpp"
#include "memory/freeList.hpp"
#include "memory/freeBlockDictionary.hpp"
@ -32,7 +32,6 @@
#include "runtime/globals.hpp"
#include "utilities/ostream.hpp"
#include "utilities/macros.hpp"
#include "gc_implementation/shared/spaceDecorator.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/concurrentMarkSweep/adaptiveFreeList.hpp"
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"

@ -23,14 +23,13 @@
*/
#include "precompiled.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
#endif // INCLUDE_ALL_GCS
#include "memory/freeBlockDictionary.hpp"
#include "memory/metachunk.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
#endif // INCLUDE_ALL_GCS
#ifndef PRODUCT
template <class Chunk> Mutex* FreeBlockDictionary<Chunk>::par_lock() const {

@ -31,7 +31,6 @@
#include "runtime/mutex.hpp"
#include "runtime/vmThread.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
#endif // INCLUDE_ALL_GCS

@ -367,7 +367,7 @@ class HeapInspection : public StackObj {
_csv_format(csv_format), _print_help(print_help),
_print_class_stats(print_class_stats), _columns(columns) {}
void heap_inspection(outputStream* st) NOT_SERVICES_RETURN;
size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN;
size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN_(0);
static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
private:
void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);

@ -47,6 +47,7 @@
#include "services/memoryService.hpp"
#include "utilities/copy.hpp"
#include "utilities/debug.hpp"
#include "utilities/macros.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC

@ -92,7 +92,7 @@ class MetaspaceShared : AllStatic {
static void preload_and_dump(TRAPS) NOT_CDS_RETURN;
static int preload_and_dump(const char * class_list_path,
GrowableArray<Klass*>* class_promote_order,
TRAPS) NOT_CDS_RETURN;
TRAPS) NOT_CDS_RETURN_(0);
static ReservedSpace* shared_rs() {
CDS_ONLY(return _shared_rs);

@ -41,20 +41,20 @@ class vframeArray;
class oopFactory: AllStatic {
public:
// Basic type leaf array allocation
static typeArrayOop new_boolArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::boolArrayKlassObj ())->allocate(length, CHECK_NULL); }
static typeArrayOop new_charArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::charArrayKlassObj ())->allocate(length, CHECK_NULL); }
static typeArrayOop new_singleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::singleArrayKlassObj())->allocate(length, CHECK_NULL); }
static typeArrayOop new_doubleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::doubleArrayKlassObj())->allocate(length, CHECK_NULL); }
static typeArrayOop new_byteArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::byteArrayKlassObj ())->allocate(length, CHECK_NULL); }
static typeArrayOop new_shortArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::shortArrayKlassObj ())->allocate(length, CHECK_NULL); }
static typeArrayOop new_intArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::intArrayKlassObj ())->allocate(length, CHECK_NULL); }
static typeArrayOop new_longArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::longArrayKlassObj ())->allocate(length, CHECK_NULL); }
static typeArrayOop new_boolArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::boolArrayKlassObj ())->allocate(length, THREAD); }
static typeArrayOop new_charArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::charArrayKlassObj ())->allocate(length, THREAD); }
static typeArrayOop new_singleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::singleArrayKlassObj())->allocate(length, THREAD); }
static typeArrayOop new_doubleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::doubleArrayKlassObj())->allocate(length, THREAD); }
static typeArrayOop new_byteArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::byteArrayKlassObj ())->allocate(length, THREAD); }
static typeArrayOop new_shortArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::shortArrayKlassObj ())->allocate(length, THREAD); }
static typeArrayOop new_intArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::intArrayKlassObj ())->allocate(length, THREAD); }
static typeArrayOop new_longArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::longArrayKlassObj ())->allocate(length, THREAD); }
// create java.lang.Object[]
static objArrayOop new_objectArray(int length, TRAPS) {
assert(Universe::objectArrayKlassObj() != NULL, "Too early?");
return ObjArrayKlass::
cast(Universe::objectArrayKlassObj())->allocate(length, CHECK_NULL);
cast(Universe::objectArrayKlassObj())->allocate(length, THREAD);
}
static typeArrayOop new_charArray (const char* utf8_str, TRAPS);

@ -26,9 +26,6 @@
#include "classfile/classLoader.hpp"
#include "classfile/classLoaderData.hpp"
#include "classfile/javaClasses.hpp"
#if INCLUDE_CDS
#include "classfile/sharedClassUtil.hpp"
#endif
#include "classfile/stringTable.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
@ -82,6 +79,9 @@
#include "gc_implementation/g1/g1CollectorPolicy.hpp"
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
#endif // INCLUDE_ALL_GCS
#if INCLUDE_CDS
#include "classfile/sharedClassUtil.hpp"
#endif
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC

@ -461,7 +461,7 @@ int ConstantPool::signature_ref_index_at(int which_nt) {
Klass* ConstantPool::klass_ref_at(int which, TRAPS) {
return klass_at(klass_ref_index_at(which), CHECK_NULL);
return klass_at(klass_ref_index_at(which), THREAD);
}

@ -336,13 +336,13 @@ class ConstantPool : public Metadata {
Klass* klass_at(int which, TRAPS) {
constantPoolHandle h_this(THREAD, this);
return klass_at_impl(h_this, which, true, CHECK_NULL);
return klass_at_impl(h_this, which, true, THREAD);
}
// Version of klass_at that doesn't save the resolution error, called during deopt
Klass* klass_at_ignore_error(int which, TRAPS) {
constantPoolHandle h_this(THREAD, this);
return klass_at_impl(h_this, which, false, CHECK_NULL);
return klass_at_impl(h_this, which, false, THREAD);
}
Symbol* klass_name_at(int which); // Returns the name, w/o resolving.

@ -532,7 +532,7 @@ bool InstanceKlass::verify_code(
// 1) Verify the bytecodes
Verifier::Mode mode =
throw_verifyerror ? Verifier::ThrowException : Verifier::NoException;
return Verifier::verify(this_k, mode, this_k->should_verify_class(), CHECK_false);
return Verifier::verify(this_k, mode, this_k->should_verify_class(), THREAD);
}
@ -1130,7 +1130,7 @@ Klass* InstanceKlass::array_klass_impl(instanceKlassHandle this_k, bool or_null,
if (or_null) {
return oak->array_klass_or_null(n);
}
return oak->array_klass(n, CHECK_NULL);
return oak->array_klass(n, THREAD);
}
Klass* InstanceKlass::array_klass_impl(bool or_null, TRAPS) {

@ -152,7 +152,7 @@ Method* Klass::uncached_lookup_method(Symbol* name, Symbol* signature, MethodLoo
void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() {
return Metaspace::allocate(loader_data, word_size, /*read_only*/false,
MetaspaceObj::ClassType, CHECK_NULL);
MetaspaceObj::ClassType, THREAD);
}
Klass::Klass() {

@ -658,7 +658,7 @@ MethodData* MethodData::allocate(ClassLoaderData* loader_data, methodHandle meth
int size = MethodData::compute_allocation_size_in_words(method);
return new (loader_data, size, false, MetaspaceObj::MethodDataType, THREAD)
MethodData(method(), size, CHECK_NULL);
MethodData(method(), size, THREAD);
}
int MethodData::bytecode_cell_count(Bytecodes::Code code) {

@ -189,7 +189,7 @@ objArrayOop ObjArrayKlass::allocate(int length, TRAPS) {
if (length <= arrayOopDesc::max_array_length(T_OBJECT)) {
int size = objArrayOopDesc::object_size(length);
KlassHandle h_k(THREAD, this);
return (objArrayOop)CollectedHeap::array_allocate(h_k, size, length, CHECK_NULL);
return (objArrayOop)CollectedHeap::array_allocate(h_k, size, length, THREAD);
} else {
report_java_out_of_memory("Requested array size exceeds VM limit");
JvmtiExport::post_array_size_exhausted();
@ -362,11 +362,11 @@ Klass* ObjArrayKlass::array_klass_impl(bool or_null, int n, TRAPS) {
if (or_null) {
return ak->array_klass_or_null(n);
}
return ak->array_klass(n, CHECK_NULL);
return ak->array_klass(n, THREAD);
}
Klass* ObjArrayKlass::array_klass_impl(bool or_null, TRAPS) {
return array_klass_impl(or_null, dimension() + 1, CHECK_NULL);
return array_klass_impl(or_null, dimension() + 1, THREAD);
}
bool ObjArrayKlass::can_be_primary_super_slow() const {

@ -25,8 +25,8 @@
#ifndef SHARE_VM_OOPS_OOP_PCGC_INLINE_HPP
#define SHARE_VM_OOPS_OOP_PCGC_INLINE_HPP
#include "utilities/macros.hpp"
#include "runtime/atomic.inline.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/parNew/parNewGeneration.hpp"
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"

@ -191,7 +191,7 @@ Klass* TypeArrayKlass::array_klass_impl(bool or_null, int n, TRAPS) {
if (or_null) {
return h_ak->array_klass_or_null(n);
}
return h_ak->array_klass(n, CHECK_NULL);
return h_ak->array_klass(n, THREAD);
}
Klass* TypeArrayKlass::array_klass_impl(bool or_null, TRAPS) {

@ -32,10 +32,6 @@
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
#include "interpreter/linkResolver.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#endif // INCLUDE_ALL_GCS
#include "memory/allocation.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/gcLocker.inline.hpp"
@ -81,6 +77,10 @@
#include "utilities/dtrace.hpp"
#include "utilities/events.hpp"
#include "utilities/histogram.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#endif // INCLUDE_ALL_GCS
static jint CurrentVersion = JNI_VERSION_1_8;
@ -603,6 +603,7 @@ JNI_ENTRY(jint, jni_Throw(JNIEnv *env, jthrowable obj))
THROW_OOP_(JNIHandles::resolve(obj), JNI_OK);
ShouldNotReachHere();
return 0; // Mute compiler.
JNI_END
@ -623,6 +624,7 @@ JNI_ENTRY(jint, jni_ThrowNew(JNIEnv *env, jclass clazz, const char *message))
Handle protection_domain (THREAD, k->protection_domain());
THROW_MSG_LOADER_(name, (char *)message, class_loader, protection_domain, JNI_OK);
ShouldNotReachHere();
return 0; // Mute compiler.
JNI_END

@ -28,10 +28,6 @@
#include "classfile/javaClasses.hpp"
#include "classfile/stringTable.hpp"
#include "classfile/systemDictionary.hpp"
#if INCLUDE_CDS
#include "classfile/sharedClassUtil.hpp"
#include "classfile/systemDictionaryShared.hpp"
#endif
#include "classfile/vmSymbols.hpp"
#include "gc_interface/collectedHeap.inline.hpp"
#include "interpreter/bytecode.hpp"
@ -73,8 +69,13 @@
#include "utilities/dtrace.hpp"
#include "utilities/events.hpp"
#include "utilities/histogram.hpp"
#include "utilities/macros.hpp"
#include "utilities/top.hpp"
#include "utilities/utf8.hpp"
#if INCLUDE_CDS
#include "classfile/sharedClassUtil.hpp"
#include "classfile/systemDictionaryShared.hpp"
#endif
#ifdef TARGET_OS_FAMILY_linux
# include "jvm_linux.h"
#endif
@ -3552,7 +3553,7 @@ JVM_ENTRY(jlong,JVM_DTraceActivate(
JVM_DTraceProvider* providers))
JVMWrapper("JVM_DTraceActivate");
return DTraceJSDT::activate(
version, module_name, providers_count, providers, CHECK_0);
version, module_name, providers_count, providers, THREAD);
JVM_END
JVM_ENTRY(jboolean,JVM_DTraceIsProbeEnabled(JNIEnv* env, jmethodID method))

@ -399,12 +399,12 @@ vmIntrinsics::ID MethodHandles::signature_polymorphic_name_id(Klass* klass, Symb
// convert the external string or reflective type to an internal signature
Symbol* MethodHandles::lookup_signature(oop type_str, bool intern_if_not_found, TRAPS) {
if (java_lang_invoke_MethodType::is_instance(type_str)) {
return java_lang_invoke_MethodType::as_signature(type_str, intern_if_not_found, CHECK_NULL);
return java_lang_invoke_MethodType::as_signature(type_str, intern_if_not_found, THREAD);
} else if (java_lang_Class::is_instance(type_str)) {
return java_lang_Class::as_signature(type_str, false, CHECK_NULL);
return java_lang_Class::as_signature(type_str, false, THREAD);
} else if (java_lang_String::is_instance(type_str)) {
if (intern_if_not_found) {
return java_lang_String::as_symbol(type_str, CHECK_NULL);
return java_lang_String::as_symbol(type_str, THREAD);
} else {
return java_lang_String::as_symbol_or_null(type_str);
}

@ -24,10 +24,6 @@
#include "precompiled.hpp"
#include "classfile/vmSymbols.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#endif // INCLUDE_ALL_GCS
#include "memory/allocation.inline.hpp"
#include "prims/jni.h"
#include "prims/jvm.h"
@ -43,6 +39,10 @@
#include "trace/tracing.hpp"
#include "utilities/copy.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#endif // INCLUDE_ALL_GCS
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC

@ -26,45 +26,38 @@
#include <new>
#include "classfile/classLoaderData.hpp"
#include "classfile/stringTable.hpp"
#include "code/codeCache.hpp"
#include "memory/metadataFactory.hpp"
#include "memory/universe.hpp"
#include "oops/oop.inline.hpp"
#include "classfile/stringTable.hpp"
#include "classfile/classLoaderData.hpp"
#include "prims/whitebox.hpp"
#include "prims/wbtestmethods/parserTests.hpp"
#include "runtime/thread.hpp"
#include "prims/whitebox.hpp"
#include "runtime/arguments.hpp"
#include "runtime/compilationPolicy.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/os.hpp"
#include "runtime/vm_version.hpp"
#include "runtime/sweeper.hpp"
#include "runtime/thread.hpp"
#include "runtime/vm_version.hpp"
#include "utilities/array.hpp"
#include "utilities/debug.hpp"
#include "utilities/macros.hpp"
#include "utilities/exceptions.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp"
#include "gc_implementation/g1/concurrentMark.hpp"
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/heapRegionRemSet.hpp"
#endif // INCLUDE_ALL_GCS
#if INCLUDE_NMT
#include "services/mallocSiteTable.hpp"
#include "services/memTracker.hpp"
#include "utilities/nativeCallStack.hpp"
#endif // INCLUDE_NMT
#include "compiler/compileBroker.hpp"
#include "runtime/compilationPolicy.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC

@ -94,7 +94,7 @@ jdouble fieldDescriptor::double_initial_value() const {
}
oop fieldDescriptor::string_initial_value(TRAPS) const {
return constants()->uncached_string_at(initial_value_index(), CHECK_0);
return constants()->uncached_string_at(initial_value_index(), THREAD);
}
void fieldDescriptor::reinitialize(InstanceKlass* ik, int index) {

@ -29,10 +29,10 @@
#include "runtime/globals.hpp"
#include "runtime/globals_extension.hpp"
#include "runtime/os.hpp"
#include "trace/tracing.hpp"
#include "utilities/ostream.hpp"
#include "utilities/macros.hpp"
#include "utilities/top.hpp"
#include "trace/tracing.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1_globals.hpp"
#endif // INCLUDE_ALL_GCS

@ -87,7 +87,7 @@ void InterfaceSupport::gc_alot() {
// Short-circuit any possible re-entrant gc-a-lot attempt
if (thread->skip_gcalot()) return;
if (is_init_completed()) {
if (Threads::is_vm_complete()) {
if (++_fullgc_alot_invocation < FullGCALotStart) {
return;

@ -773,7 +773,7 @@ class PerfDataManager : AllStatic {
static PerfStringVariable* create_string_variable(CounterNS ns,
const char* name,
const char *s, TRAPS) {
return create_string_variable(ns, name, 0, s, CHECK_NULL);
return create_string_variable(ns, name, 0, s, THREAD);
};
static PerfLongVariable* create_long_variable(CounterNS ns,
@ -784,7 +784,7 @@ class PerfDataManager : AllStatic {
static PerfLongVariable* create_long_variable(CounterNS ns,
const char* name,
PerfData::Units u, TRAPS) {
return create_long_variable(ns, name, u, (jlong)0, CHECK_NULL);
return create_long_variable(ns, name, u, (jlong)0, THREAD);
};
static PerfLongVariable* create_long_variable(CounterNS, const char* name,
@ -805,7 +805,7 @@ class PerfDataManager : AllStatic {
static PerfLongCounter* create_long_counter(CounterNS ns, const char* name,
PerfData::Units u, TRAPS) {
return create_long_counter(ns, name, u, (jlong)0, CHECK_NULL);
return create_long_counter(ns, name, u, (jlong)0, THREAD);
};
static PerfLongCounter* create_long_counter(CounterNS ns, const char* name,
@ -823,49 +823,49 @@ class PerfDataManager : AllStatic {
static PerfConstant* create_constant(CounterNS ns, const char* name,
PerfData::Units u, jlong val, TRAPS) {
return create_long_constant(ns, name, u, val, CHECK_NULL);
return create_long_constant(ns, name, u, val, THREAD);
}
static PerfVariable* create_variable(CounterNS ns, const char* name,
PerfData::Units u, jlong ival, TRAPS) {
return create_long_variable(ns, name, u, ival, CHECK_NULL);
return create_long_variable(ns, name, u, ival, THREAD);
}
static PerfVariable* create_variable(CounterNS ns, const char* name,
PerfData::Units u, TRAPS) {
return create_long_variable(ns, name, u, (jlong)0, CHECK_NULL);
return create_long_variable(ns, name, u, (jlong)0, THREAD);
}
static PerfVariable* create_variable(CounterNS ns, const char* name,
PerfData::Units u, jlong* sp, TRAPS) {
return create_long_variable(ns, name, u, sp, CHECK_NULL);
return create_long_variable(ns, name, u, sp, THREAD);
}
static PerfVariable* create_variable(CounterNS ns, const char* name,
PerfData::Units u,
PerfSampleHelper* sh, TRAPS) {
return create_long_variable(ns, name, u, sh, CHECK_NULL);
return create_long_variable(ns, name, u, sh, THREAD);
}
static PerfCounter* create_counter(CounterNS ns, const char* name,
PerfData::Units u, jlong ival, TRAPS) {
return create_long_counter(ns, name, u, ival, CHECK_NULL);
return create_long_counter(ns, name, u, ival, THREAD);
}
static PerfCounter* create_counter(CounterNS ns, const char* name,
PerfData::Units u, TRAPS) {
return create_long_counter(ns, name, u, (jlong)0, CHECK_NULL);
return create_long_counter(ns, name, u, (jlong)0, THREAD);
}
static PerfCounter* create_counter(CounterNS ns, const char* name,
PerfData::Units u, jlong* sp, TRAPS) {
return create_long_counter(ns, name, u, sp, CHECK_NULL);
return create_long_counter(ns, name, u, sp, THREAD);
}
static PerfCounter* create_counter(CounterNS ns, const char* name,
PerfData::Units u,
PerfSampleHelper* sh, TRAPS) {
return create_long_counter(ns, name, u, sh, CHECK_NULL);
return create_long_counter(ns, name, u, sh, THREAD);
}
static void destroy();

@ -635,7 +635,7 @@ objArrayHandle Reflection::get_parameter_types(methodHandle method, int paramete
}
objArrayHandle Reflection::get_exception_types(methodHandle method, TRAPS) {
return method->resolved_checked_exceptions(CHECK_(objArrayHandle()));
return method->resolved_checked_exceptions(THREAD);
}
@ -1003,7 +1003,7 @@ oop Reflection::invoke(instanceKlassHandle klass, methodHandle reflected_method,
} else {
if (rtype == T_BOOLEAN || rtype == T_BYTE || rtype == T_CHAR || rtype == T_SHORT)
narrow((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
return box((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
return box((jvalue*) result.get_value_addr(), rtype, THREAD);
}
}

@ -986,7 +986,7 @@ Handle SharedRuntime::find_callee_info(JavaThread* thread, Bytecodes::Code& bc,
// last java frame on stack (which includes native call frames)
vframeStream vfst(thread, true); // Do not skip and javaCalls
return find_callee_info_helper(thread, vfst, bc, callinfo, CHECK_(Handle()));
return find_callee_info_helper(thread, vfst, bc, callinfo, THREAD);
}

@ -169,7 +169,7 @@ class ObjectLocker : public StackObj {
void waitUninterruptibly(TRAPS) { ObjectSynchronizer::waitUninterruptibly(_obj, 0, CHECK); }
// complete_exit gives up lock completely, returning recursion count
// reenter reclaims lock with original recursion count
intptr_t complete_exit(TRAPS) { return ObjectSynchronizer::complete_exit(_obj, CHECK_0); }
intptr_t complete_exit(TRAPS) { return ObjectSynchronizer::complete_exit(_obj, THREAD); }
void reenter(intptr_t recursion, TRAPS) { ObjectSynchronizer::reenter(_obj, recursion, CHECK); }
};

@ -64,7 +64,7 @@ class MemTracker : AllStatic {
const NativeCallStack& stack, MEMFLAGS flag = mtNone) { }
static inline void record_virtual_memory_commit(void* addr, size_t size, const NativeCallStack& stack) { }
static inline Tracker get_virtual_memory_uncommit_tracker() { return Tracker(); }
static inline Tracker get_virtual_memory_release_tracker() { }
static inline Tracker get_virtual_memory_release_tracker() { return Tracker(); }
static inline void record_virtual_memory_type(void* addr, MEMFLAGS flag) { }
static inline void record_thread_stack(void* addr, size_t size) { }
static inline void release_thread_stack(void* addr, size_t size) { }

@ -322,7 +322,7 @@ protected:
void* operator new(size_t size, ClassLoaderData* loader_data, int length, bool read_only, TRAPS) throw() {
size_t word_size = Array::size(length);
return (void*) Metaspace::allocate(loader_data, word_size, read_only,
MetaspaceObj::array_type(sizeof(T)), CHECK_NULL);
MetaspaceObj::array_type(sizeof(T)), THREAD);
}
static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); }

@ -30,6 +30,7 @@
#include "runtime/os.hpp"
#include "runtime/vm_version.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/macros.hpp"
#include "utilities/ostream.hpp"
#include "utilities/top.hpp"
#include "utilities/xmlstream.hpp"