* src/native/vm/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c:
authortwisti <none@none>
Mon, 31 Jul 2006 14:35:41 +0000 (14:35 +0000)
committertwisti <none@none>
Mon, 31 Jul 2006 14:35:41 +0000 (14:35 +0000)
New file.

* src/native/vm/Makefile.am (libnativevm_la_SOURCES): Added
gnu_java_lang_management_VMClassLoadingMXBeanImpl.c.

* src/native/include/Makefile.am
(ADDITIONAL_IMPLEMENTED_VM_CLASSES_HEADER_FILES): Added
gnu_java_lang_management_VMClassLoadingMXBeanImpl.h.

* src/native/include/.cvsignore: Likewise.

* src/native/jni.h (_Jv_JavaVM): Added
Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_verbose.

* src/native/native.c
(native/include/gnu_java_lang_management_VMClassLoadingMXBeanImpl.h):
Added.
(native/include/gnu_java_lang_management_VMMemoryMXBeanImpl.h):
Likewise.
(dummynativetable): Added VMClassLoadingMXBeanImpl and
VMMemoryMXBeanImpl functions.

src/native/include/.cvsignore
src/native/include/Makefile.am
src/native/jni.h
src/native/native.c
src/native/vm/Makefile.am
src/native/vm/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c [new file with mode: 0644]

index 69fe73b3e82761172b50f30da30beb541ea24ae8..83f9fcc17030f9c79dff99078ee0d8496b30bd4b 100644 (file)
@@ -7,6 +7,7 @@ gnu_classpath_Pointer32.h
 gnu_classpath_Pointer64.h
 gnu_classpath_VMStackWalker.h
 gnu_classpath_VMSystemProperties.h
+gnu_java_lang_management_VMClassLoadingMXBeanImpl.h
 gnu_java_lang_management_VMRuntimeMXBeanImpl.h
 gnu_java_lang_management_VMMemoryMXBeanImpl.h
 java_io_File.h
index 74084de26977556f7de22a84429eb2fce1430759..96a5c6cde54f36217ba6d1d97f1d0f147b67d565 100644 (file)
@@ -28,7 +28,7 @@
 ##
 ## Changes:
 ##
-## $Id: Makefile.am 5190 2006-07-31 12:28:23Z twisti $
+## $Id: Makefile.am 5193 2006-07-31 14:35:41Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
@@ -84,8 +84,9 @@ GEN_JVMTI_HEADER_FILES = \
 ADDITIONAL_IMPLEMENTED_VM_CLASSES_HEADER_FILES = \
        gnu_classpath_VMStackWalker.h \
        gnu_classpath_VMSystemProperties.h \
-       gnu_java_lang_management_VMRuntimeMXBeanImpl.h \
+       gnu_java_lang_management_VMClassLoadingMXBeanImpl.h \
        gnu_java_lang_management_VMMemoryMXBeanImpl.h \
+       gnu_java_lang_management_VMRuntimeMXBeanImpl.h \
        java_lang_VMClass.h \
        java_lang_VMClassLoader.h \
        java_lang_VMRuntime.h \
index 3230980b855464c08b154e5ea43c022d1c3711d9..da602a441deb6f85e74589b65278359ed12f124a 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: jni.h 5104 2006-07-10 17:22:18Z twisti $
+   $Id: jni.h 5193 2006-07-31 14:35:41Z twisti $
 
 */
 
@@ -69,6 +69,7 @@ struct _Jv_JavaVM {
 
        s8 starttime;                       /* VM startup time                    */
 
+       s4 Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_verbose;
        s4 Java_gnu_java_lang_management_VMMemoryMXBeanImpl_verbose;
        s4 Java_java_lang_VMClassLoader_defaultAssertionStatus;
 };
index 5a4655b04684114583fc1ee4e54f7ee381b0ea01..69c48c0ae33b6f15a07566d5fa5df53585a919a6 100644 (file)
@@ -30,7 +30,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: native.c 5123 2006-07-12 21:45:34Z twisti $
+   $Id: native.c 5193 2006-07-31 14:35:41Z twisti $
 
 */
 
@@ -83,6 +83,8 @@
 
 #include "native/include/gnu_classpath_VMStackWalker.h"
 #include "native/include/gnu_classpath_VMSystemProperties.h"
+#include "native/include/gnu_java_lang_management_VMClassLoadingMXBeanImpl.h"
+#include "native/include/gnu_java_lang_management_VMMemoryMXBeanImpl.h"
 #include "native/include/gnu_java_lang_management_VMRuntimeMXBeanImpl.h"
 #include "native/include/java_lang_Class.h"
 #include "native/include/java_lang_Object.h"
@@ -140,6 +142,17 @@ static functionptr dummynativetable[] = {
 
        (functionptr) Java_gnu_classpath_VMSystemProperties_preInit,
 
+       (functionptr) Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_getLoadedClassCount,
+       (functionptr) Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_getUnloadedClassCount,
+       (functionptr) Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_isVerbose,
+       (functionptr) Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_setVerbose,
+
+       (functionptr) Java_gnu_java_lang_management_VMMemoryMXBeanImpl_getHeapMemoryUsage,
+       (functionptr) Java_gnu_java_lang_management_VMMemoryMXBeanImpl_getNonHeapMemoryUsage,
+       (functionptr) Java_gnu_java_lang_management_VMMemoryMXBeanImpl_getObjectPendingFinalizationCount,
+       (functionptr) Java_gnu_java_lang_management_VMMemoryMXBeanImpl_isVerbose,
+       (functionptr) Java_gnu_java_lang_management_VMMemoryMXBeanImpl_setVerbose,
+
        (functionptr) Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getInputArguments,
        (functionptr) Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getStartTime,
 
index 9cf22b915d0027993f83fe21009b23216ccbe975..507dd2c0ce90a46cece150e0f80f706583b18f7d 100644 (file)
@@ -28,7 +28,7 @@
 ##
 ## Changes:
 ##
-## $Id: Makefile.am 5190 2006-07-31 12:28:23Z twisti $
+## $Id: Makefile.am 5193 2006-07-31 14:35:41Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
@@ -47,8 +47,9 @@ endif
 libnativevm_la_SOURCES = \
        gnu_classpath_VMStackWalker.c \
        gnu_classpath_VMSystemProperties.c \
-       gnu_java_lang_management_VMRuntimeMXBeanImpl.c \
+       gnu_java_lang_management_VMClassLoadingMXBeanImpl.c \
        gnu_java_lang_management_VMMemoryMXBeanImpl.c \
+       gnu_java_lang_management_VMRuntimeMXBeanImpl.c \
        java_lang_VMClass.c \
        java_lang_VMClassLoader.c \
        java_lang_VMObject.c \
diff --git a/src/native/vm/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c b/src/native/vm/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c
new file mode 100644 (file)
index 0000000..3f9b4a9
--- /dev/null
@@ -0,0 +1,110 @@
+/* src/native/vm/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c
+
+   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+   J. Wenninger, Institut f. Computersprachen - TU Wien
+
+   This file is part of CACAO.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program 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 for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Contact: cacao@cacaojvm.org
+
+   Authors: Christian Thalinger
+
+   Changes:
+
+   $Id: VMFrame.c 4996 2006-05-31 13:53:16Z motse $
+
+*/
+
+
+#include "config.h"
+#include "vm/types.h"
+
+#include "mm/boehm.h"
+
+#include "native/jni.h"
+
+#include "toolbox/logging.h"
+#include "vm/classcache.h"
+#include "vm/vm.h"
+
+
+/*
+ * Class:     gnu/java/lang/management/VMClassLoadingMXBeanImpl
+ * Method:    getLoadedClassCount
+ * Signature: ()I
+ */
+JNIEXPORT s4 JNICALL Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_getLoadedClassCount(JNIEnv *env, jclass clazz)
+{
+       s4 count;
+
+       count = classcache_get_loaded_class_count();
+
+       return count;
+}
+
+
+/*
+ * Class:     gnu/java/lang/management/VMClassLoadingMXBeanImpl
+ * Method:    getUnloadedClassCount
+ * Signature: ()J
+ */
+JNIEXPORT s8 JNICALL Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_getUnloadedClassCount(JNIEnv *env, jclass clazz)
+{
+       log_println("Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_getUnloadedClassCount: IMPLEMENT ME!");
+
+       return 0;
+}
+
+
+/*
+ * Class:     gnu/java/lang/management/VMClassLoadingMXBeanImpl
+ * Method:    isVerbose
+ * Signature: ()Z
+ */
+JNIEXPORT s4 JNICALL Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_isVerbose(JNIEnv *env, jclass clazz)
+{
+       return _Jv_jvm->Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_verbose;
+}
+
+
+/*
+ * Class:     gnu/java/lang/management/VMClassLoadingMXBeanImpl
+ * Method:    setVerbose
+ * Signature: (Z)V
+ */
+JNIEXPORT void JNICALL Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_setVerbose(JNIEnv *env, jclass clazz, s4 verbose)
+{
+       _Jv_jvm->Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_verbose = verbose;
+}
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */