equal
deleted
inserted
replaced
410 if (ClassLoaderDataGraph::has_metaspace_oom()) { |
410 if (ClassLoaderDataGraph::has_metaspace_oom()) { |
411 return NULL; |
411 return NULL; |
412 } |
412 } |
413 |
413 |
414 methodHandle mh(m); |
414 methodHandle mh(m); |
415 ClassLoaderData* loader_data = mh->method_holder()->class_loader_data(); |
415 MethodCounters* counters = MethodCounters::allocate(mh, THREAD); |
416 MethodCounters* counters = MethodCounters::allocate(loader_data, THREAD); |
|
417 if (HAS_PENDING_EXCEPTION) { |
416 if (HAS_PENDING_EXCEPTION) { |
418 CompileBroker::log_metaspace_failure(); |
417 CompileBroker::log_metaspace_failure(); |
419 ClassLoaderDataGraph::set_metaspace_oom(true); |
418 ClassLoaderDataGraph::set_metaspace_oom(true); |
420 return NULL; // return the exception (which is cleared) |
419 return NULL; // return the exception (which is cleared) |
421 } |
420 } |
422 if (!mh->init_method_counters(counters)) { |
421 if (!mh->init_method_counters(counters)) { |
423 MetadataFactory::free_metadata(loader_data, counters); |
422 MetadataFactory::free_metadata(mh->method_holder()->class_loader_data(), counters); |
424 } |
423 } |
425 return mh->method_counters(); |
424 return mh->method_counters(); |
426 } |
425 } |
427 |
426 |
428 void Method::cleanup_inline_caches() { |
427 void Method::cleanup_inline_caches() { |