8147978: Remove Method::_method_data for C1

Method::_method_data field removed when not using C2 or JVMCI

Reviewed-by: dholmes, kvn
This commit is contained in:
Chris Plummer 2016-02-26 09:13:22 -08:00
parent 30ee713e36
commit 6d7d3228e7
6 changed files with 52 additions and 16 deletions

View file

@ -383,14 +383,15 @@ 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 ");
@ -920,7 +921,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();