/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "runtime/handles.hpp"
#include "runtime/perfData.hpp"
#include "utilities/growableArray.hpp"
class instanceKlass;
// VM monitoring and management support for the Class Loading subsystem
private:
// Counters for classes loaded from class files
// Counters for classes loaded from shared archive
public:
static void init();
static bool set_verbose(bool verbose);
static void reset_trace_class_unloading();
}
}
if (UsePerfData) {
} else {
return -1;
}
}
if (UsePerfData) {
} else {
return -1;
}
}
return _shared_classes_loaded_count->get_value();
}
return _shared_classes_unloaded_count->get_value();
}
if (UsePerfData) {
return _shared_classbytes_loaded->get_value();
} else {
return -1;
}
}
if (UsePerfData) {
return _shared_classbytes_unloaded->get_value();
} else {
return -1;
}
}
}
// All unloaded classes are non-shared
static void notify_class_unloaded(instanceKlass* k);
if (UsePerfData) {
}
}
};
// FIXME: make this piece of code to be shared by M&M and JVMTI
private:
// _current_thread is for creating a KlassHandle with a faster version constructor
public:
// FIXME: For now - don't include array klasses
// The spec is unclear at this point to count array klasses or not
// and also indirect creation of array of super class and secondaries
//
// for (klassOop l = k; l != NULL; l = Klass::cast(l)->array_klass_or_null()) {
// KlassHandle h(_current_thread, l);
// _loaded_classes->append(h);
// }
KlassHandle h(_current_thread, k);
_loaded_classes->append(h);
}
};
#endif // SHARE_VM_SERVICES_CLASSLOADINGSERVICE_HPP