Merge
This commit is contained in:
commit
adde13cc80
@ -1502,23 +1502,21 @@ JRT_ENTRY(void, Runtime1::predicate_failed_trap(JavaThread* thread))
|
||||
nm->make_not_entrant();
|
||||
|
||||
methodHandle m(nm->method());
|
||||
if (ProfileInterpreter) {
|
||||
MethodData* mdo = m->method_data();
|
||||
MethodData* mdo = m->method_data();
|
||||
|
||||
if (mdo == NULL && !HAS_PENDING_EXCEPTION) {
|
||||
// Build an MDO. Ignore errors like OutOfMemory;
|
||||
// that simply means we won't have an MDO to update.
|
||||
Method::build_interpreter_method_data(m, THREAD);
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOM error here");
|
||||
CLEAR_PENDING_EXCEPTION;
|
||||
}
|
||||
mdo = m->method_data();
|
||||
if (mdo == NULL && !HAS_PENDING_EXCEPTION) {
|
||||
// Build an MDO. Ignore errors like OutOfMemory;
|
||||
// that simply means we won't have an MDO to update.
|
||||
Method::build_interpreter_method_data(m, THREAD);
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOM error here");
|
||||
CLEAR_PENDING_EXCEPTION;
|
||||
}
|
||||
mdo = m->method_data();
|
||||
}
|
||||
|
||||
if (mdo != NULL) {
|
||||
mdo->inc_trap_count(Deoptimization::Reason_none);
|
||||
}
|
||||
if (mdo != NULL) {
|
||||
mdo->inc_trap_count(Deoptimization::Reason_none);
|
||||
}
|
||||
|
||||
if (TracePredicateFailedTraps) {
|
||||
|
@ -383,15 +383,14 @@ void Method::build_interpreter_method_data(const methodHandle& method, TRAPS) {
|
||||
MutexLocker ml(MethodData_lock, THREAD);
|
||||
if (method->method_data() == NULL) {
|
||||
ClassLoaderData* loader_data = method->method_holder()->class_loader_data();
|
||||
#if defined(COMPILER2) || INCLUDE_JVMCI
|
||||
MethodData* method_data = MethodData::allocate(loader_data, method, THREAD);
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
CompileBroker::log_metaspace_failure();
|
||||
ClassLoaderDataGraph::set_metaspace_oom(true);
|
||||
return; // return the exception (which is cleared)
|
||||
}
|
||||
|
||||
method->set_method_data(method_data);
|
||||
#endif
|
||||
if (PrintMethodData && (Verbose || WizardMode)) {
|
||||
ResourceMark rm(THREAD);
|
||||
tty->print("build_interpreter_method_data for ");
|
||||
@ -921,7 +920,7 @@ void Method::unlink_method() {
|
||||
// shared class that failed to load, this->link_method() may
|
||||
// have already been called (before an exception happened), so
|
||||
// this->_method_data may not be NULL.
|
||||
assert(!DumpSharedSpaces || method_data() == NULL, "unexpected method data?");
|
||||
assert(!DumpSharedSpaces || _method_data == NULL, "unexpected method data?");
|
||||
|
||||
set_method_data(NULL);
|
||||
clear_method_counters();
|
||||
|
@ -64,9 +64,7 @@ class Method : public Metadata {
|
||||
friend class JVMCIVMStructs;
|
||||
private:
|
||||
ConstMethod* _constMethod; // Method read-only data.
|
||||
#if defined(COMPILER2) || INCLUDE_JVMCI
|
||||
MethodData* _method_data;
|
||||
#endif
|
||||
MethodCounters* _method_counters;
|
||||
AccessFlags _access_flags; // Access flags
|
||||
int _vtable_index; // vtable index of this method (see VtableIndexFlag)
|
||||
@ -321,7 +319,6 @@ class Method : public Metadata {
|
||||
// InterpreterRuntime::exception_handler_for_exception.
|
||||
static int fast_exception_handler_bci_for(methodHandle mh, KlassHandle ex_klass, int throw_bci, TRAPS);
|
||||
|
||||
#if defined(COMPILER2) || INCLUDE_JVMCI
|
||||
// method data access
|
||||
MethodData* method_data() const {
|
||||
return _method_data;
|
||||
@ -333,10 +330,6 @@ class Method : public Metadata {
|
||||
// the initialization of data otherwise.
|
||||
OrderAccess::release_store_ptr((volatile void *)&_method_data, data);
|
||||
}
|
||||
#else
|
||||
MethodData* method_data() const { return NULL; }
|
||||
void set_method_data(MethodData* data) { }
|
||||
#endif
|
||||
|
||||
MethodCounters* method_counters() const {
|
||||
return _method_counters;
|
||||
@ -646,16 +639,9 @@ class Method : public Metadata {
|
||||
#endif /* CC_INTERP */
|
||||
static ByteSize from_compiled_offset() { return byte_offset_of(Method, _from_compiled_entry); }
|
||||
static ByteSize code_offset() { return byte_offset_of(Method, _code); }
|
||||
#if defined(COMPILER2) || INCLUDE_JVMCI
|
||||
static ByteSize method_data_offset() {
|
||||
return byte_offset_of(Method, _method_data);
|
||||
}
|
||||
#else
|
||||
static ByteSize method_data_offset() {
|
||||
ShouldNotReachHere();
|
||||
return in_ByteSize(0);
|
||||
}
|
||||
#endif
|
||||
static ByteSize method_counters_offset() {
|
||||
return byte_offset_of(Method, _method_counters);
|
||||
}
|
||||
@ -668,11 +654,7 @@ class Method : public Metadata {
|
||||
static ByteSize signature_handler_offset() { return in_ByteSize(sizeof(Method) + wordSize); }
|
||||
|
||||
// for code generation
|
||||
#if defined(COMPILER2) || INCLUDE_JVMCI
|
||||
static int method_data_offset_in_bytes() { return offset_of(Method, _method_data); }
|
||||
#else
|
||||
static int method_data_offset_in_bytes() { ShouldNotReachHere(); return 0; }
|
||||
#endif
|
||||
static int intrinsic_id_offset_in_bytes() { return offset_of(Method, _intrinsic_id); }
|
||||
static int intrinsic_id_size_in_bytes() { return sizeof(u2); }
|
||||
|
||||
|
@ -3464,12 +3464,6 @@ jint Arguments::finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_req
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(COMPILER2) && !INCLUDE_JVMCI
|
||||
UNSUPPORTED_OPTION(ProfileInterpreter, "ProfileInterpreter");
|
||||
NOT_PRODUCT(UNSUPPORTED_OPTION(TraceProfileInterpreter, "TraceProfileInterpreter"));
|
||||
UNSUPPORTED_OPTION(PrintMethodData, "PrintMethodData");
|
||||
#endif
|
||||
|
||||
#ifndef TIERED
|
||||
// Tiered compilation is undefined.
|
||||
UNSUPPORTED_OPTION(TieredCompilation, "TieredCompilation");
|
||||
|
@ -390,7 +390,7 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
|
||||
nonstatic_field(MethodCounters, _invocation_counter, InvocationCounter) \
|
||||
nonstatic_field(MethodCounters, _backedge_counter, InvocationCounter) \
|
||||
nonstatic_field(Method, _constMethod, ConstMethod*) \
|
||||
COMPILER2_OR_JVMCI_PRESENT(nonstatic_field(Method, _method_data, MethodData*)) \
|
||||
nonstatic_field(Method, _method_data, MethodData*) \
|
||||
nonstatic_field(Method, _method_counters, MethodCounters*) \
|
||||
nonstatic_field(Method, _access_flags, AccessFlags) \
|
||||
nonstatic_field(Method, _vtable_index, int) \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2016, 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
|
||||
@ -206,15 +206,6 @@
|
||||
#define NOT_COMPILER2(code) code
|
||||
#endif // COMPILER2
|
||||
|
||||
// COMPILER2 or JVMCI
|
||||
#if defined(COMPILER2) || INCLUDE_JVMCI
|
||||
#define COMPILER2_OR_JVMCI_PRESENT(code) code
|
||||
#define NOT_COMPILER2_OR_JVMCI(code)
|
||||
#else
|
||||
#define COMPILER2_OR_JVMCI_PRESENT(code)
|
||||
#define NOT_COMPILER2_OR_JVMCI(code) code
|
||||
#endif
|
||||
|
||||
#ifdef TIERED
|
||||
#define TIERED_ONLY(code) code
|
||||
#define NOT_TIERED(code)
|
||||
|
@ -27,6 +27,7 @@
|
||||
* @test
|
||||
* @summary tests on constant folding of unsafe get operations from stable arrays
|
||||
* @library /testlibrary /test/lib
|
||||
* @ignore 8151137
|
||||
*
|
||||
* @requires vm.flavor != "client"
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user