src/hotspot/share/memory/metaspaceTracer.cpp
branchstuefe-new-metaspace-branch
changeset 59272 54750b448264
parent 58063 bdf136b8ae0e
equal deleted inserted replaced
59271:1558266946de 59272:54750b448264
    41 }
    41 }
    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   send_allocation_failure_event<EventMetaspaceAllocationFailure>(cld, word_size, objtype, mdtype);
    47   send_allocation_failure_event<EventMetaspaceAllocationFailure>(cld, word_size, objtype, mdtype);
    48 }
    48 }
    49 
    49 
    50 void MetaspaceTracer::report_metadata_oom(ClassLoaderData *cld,
    50 void MetaspaceTracer::report_metadata_oom(ClassLoaderData *cld,
    51                                          size_t word_size,
    51                                          size_t word_size,
    52                                          MetaspaceObj::Type objtype,
    52                                          MetaspaceObj::Type objtype,
    53                                          metaspace::MetadataType mdtype) const {
    53                                          Metaspace::MetadataType mdtype) const {
    54   send_allocation_failure_event<EventMetaspaceOOM>(cld, word_size, objtype, mdtype);
    54   send_allocation_failure_event<EventMetaspaceOOM>(cld, word_size, objtype, mdtype);
    55 }
    55 }
    56 
    56 
    57 template <typename E>
    57 template <typename E>
    58 void MetaspaceTracer::send_allocation_failure_event(ClassLoaderData *cld,
    58 void MetaspaceTracer::send_allocation_failure_event(ClassLoaderData *cld,
    59                                                     size_t word_size,
    59                                                     size_t word_size,
    60                                                     MetaspaceObj::Type objtype,
    60                                                     MetaspaceObj::Type objtype,
    61                                                     metaspace::MetadataType mdtype) const {
    61                                                     Metaspace::MetadataType mdtype) const {
    62   E event;
    62   E event;
    63   if (event.should_commit()) {
    63   if (event.should_commit()) {
    64     event.set_classLoader(cld);
    64     event.set_classLoader(cld);
    65     if (cld->is_unsafe_anonymous()) {
    65     if (cld->is_unsafe_anonymous()) {
    66       event.set_unsafeAnonymousClassLoader(true);
    66       event.set_unsafeAnonymousClassLoader(true);