--- old/src/share/vm/c1/c1_Runtime1.cpp 2016-03-03 13:03:40.441932740 +0100 +++ new/src/share/vm/c1/c1_Runtime1.cpp 2016-03-03 13:03:40.377932738 +0100 @@ -1502,23 +1502,21 @@ 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) { --- old/src/share/vm/oops/method.cpp 2016-03-03 13:03:40.737932749 +0100 +++ new/src/share/vm/oops/method.cpp 2016-03-03 13:03:40.669932746 +0100 @@ -383,15 +383,14 @@ 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 @@ // 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(); --- old/src/share/vm/oops/method.hpp 2016-03-03 13:03:40.989932756 +0100 +++ new/src/share/vm/oops/method.hpp 2016-03-03 13:03:40.925932754 +0100 @@ -64,9 +64,7 @@ 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 @@ // 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 @@ // 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 @@ #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 @@ 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); } --- old/src/share/vm/runtime/arguments.cpp 2016-03-03 13:03:41.237932763 +0100 +++ new/src/share/vm/runtime/arguments.cpp 2016-03-03 13:03:41.177932762 +0100 @@ -3464,12 +3464,6 @@ } #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"); --- old/src/share/vm/runtime/vmStructs.cpp 2016-03-03 13:03:41.517932772 +0100 +++ new/src/share/vm/runtime/vmStructs.cpp 2016-03-03 13:03:41.449932770 +0100 @@ -390,7 +390,7 @@ 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) \ --- old/src/share/vm/utilities/macros.hpp 2016-03-03 13:03:41.833932781 +0100 +++ new/src/share/vm/utilities/macros.hpp 2016-03-03 13:03:41.761932779 +0100 @@ -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)