Mercurial > hg > graal-compiler
comparison src/share/vm/memory/metaspaceTracer.cpp @ 17770:5af31f70a866
8036701: Add trace event when a metaspace throws out of memory error
Reviewed-by: stefank, mgerdin
author | ehelin |
---|---|
date | Fri, 21 Mar 2014 10:28:07 +0100 |
parents | bc7714614ad8 |
children | 794399f4f5d9 |
comparison
equal
deleted
inserted
replaced
17769:bc7714614ad8 | 17770:5af31f70a866 |
---|---|
42 | 42 |
43 void MetaspaceTracer::report_metaspace_allocation_failure(ClassLoaderData *cld, | 43 void MetaspaceTracer::report_metaspace_allocation_failure(ClassLoaderData *cld, |
44 size_t word_size, | 44 size_t word_size, |
45 MetaspaceObj::Type objtype, | 45 MetaspaceObj::Type objtype, |
46 Metaspace::MetadataType mdtype) const { | 46 Metaspace::MetadataType mdtype) const { |
47 EventMetaspaceAllocationFailure event; | 47 send_allocation_failure_event<EventMetaspaceAllocationFailure>(cld, word_size, objtype, mdtype); |
48 } | |
49 | |
50 void MetaspaceTracer::report_metadata_oom(ClassLoaderData *cld, | |
51 size_t word_size, | |
52 MetaspaceObj::Type objtype, | |
53 Metaspace::MetadataType mdtype) const { | |
54 send_allocation_failure_event<EventMetaspaceOOM>(cld, word_size, objtype, mdtype); | |
55 } | |
56 | |
57 template <typename E> | |
58 void MetaspaceTracer::send_allocation_failure_event(ClassLoaderData *cld, | |
59 size_t word_size, | |
60 MetaspaceObj::Type objtype, | |
61 Metaspace::MetadataType mdtype) const { | |
62 E event; | |
48 if (event.should_commit()) { | 63 if (event.should_commit()) { |
49 if (cld->is_anonymous()) { | 64 if (cld->is_anonymous()) { |
50 event.set_classLoader(NULL); | 65 event.set_classLoader(NULL); |
51 event.set_anonymousClassLoader(true); | 66 event.set_anonymousClassLoader(true); |
52 } else { | 67 } else { |