8037842: Failing to allocate MethodCounters and MDO causes a serious performance drop

Stop allocating compiler profiling metadata when metaspace is full.

Reviewed-by: kvn, anoll
This commit is contained in:
Coleen Phillimore 2014-10-30 18:38:42 -04:00
parent b301b207b3
commit 4c036f5730
5 changed files with 62 additions and 4 deletions

View file

@ -68,6 +68,9 @@ class ClassLoaderDataGraph : public AllStatic {
static ClassLoaderData* _saved_head;
static ClassLoaderData* _saved_unloading;
static bool _should_purge;
// OOM has been seen in metaspace allocation. Used to prevent some
// allocations until class unloading
static bool _metaspace_oom;
static ClassLoaderData* add(Handle class_loader, bool anonymous, TRAPS);
static void post_class_unload_events(void);
@ -107,6 +110,9 @@ class ClassLoaderDataGraph : public AllStatic {
}
}
static bool has_metaspace_oom() { return _metaspace_oom; }
static void set_metaspace_oom(bool value) { _metaspace_oom = value; }
static void free_deallocate_lists();
static void dump_on(outputStream * const out) PRODUCT_RETURN;