hotspot/src/share/vm/services/classLoadingService.hpp
changeset 13975 2f7431485cfa
parent 13728 882756847a04
child 14488 ab48109f7d1b
equal deleted inserted replaced
13951:3fc49366dc15 13975:2f7431485cfa
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    53 public:
    53 public:
    54   static void init();
    54   static void init();
    55 
    55 
    56   static bool get_verbose() { return TraceClassLoading; }
    56   static bool get_verbose() { return TraceClassLoading; }
    57   static bool set_verbose(bool verbose);
    57   static bool set_verbose(bool verbose);
    58   static void reset_trace_class_unloading();
    58   static void reset_trace_class_unloading() NOT_MANAGEMENT_RETURN;
    59 
    59 
    60   static jlong loaded_class_count() {
    60   static jlong loaded_class_count() {
    61     return _classes_loaded_count->get_value() + _shared_classes_loaded_count->get_value();
    61     return _classes_loaded_count->get_value() + _shared_classes_loaded_count->get_value();
    62   }
    62   }
    63   static jlong unloaded_class_count() {
    63   static jlong unloaded_class_count() {
   100   }
   100   }
   101   static jlong class_method_data_size() {
   101   static jlong class_method_data_size() {
   102     return (UsePerfData ? _class_methods_size->get_value() : -1);
   102     return (UsePerfData ? _class_methods_size->get_value() : -1);
   103   }
   103   }
   104 
   104 
   105   static void notify_class_loaded(InstanceKlass* k, bool shared_class);
   105   static void notify_class_loaded(InstanceKlass* k, bool shared_class)
       
   106       NOT_MANAGEMENT_RETURN;
   106   // All unloaded classes are non-shared
   107   // All unloaded classes are non-shared
   107   static void notify_class_unloaded(InstanceKlass* k);
   108   static void notify_class_unloaded(InstanceKlass* k) NOT_MANAGEMENT_RETURN;
   108   static void add_class_method_size(int size) {
   109   static void add_class_method_size(int size) {
       
   110 #if INCLUDE_MANAGEMENT
   109     if (UsePerfData) {
   111     if (UsePerfData) {
   110       _class_methods_size->inc(size);
   112       _class_methods_size->inc(size);
   111     }
   113     }
       
   114 #endif // INCLUDE_MANAGEMENT
   112   }
   115   }
   113 };
   116 };
   114 
   117 
   115 // FIXME: make this piece of code to be shared by M&M and JVMTI
   118 // FIXME: make this piece of code to be shared by M&M and JVMTI
   116 class LoadedClassesEnumerator : public StackObj {
   119 class LoadedClassesEnumerator : public StackObj {