Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThreadShutdown.cpp =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThreadShutdown.cpp (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThreadShutdown.cpp (revision 0) @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @author Andrey Yakushev + * @version $Revision$ + */ + +/** + * @file org_apache_harmony_lang_management_MemoryNotificationThreadShutdown.cpp + * + * This file is a part of kernel class natives VM core component. + * It contains implementation for native methods of + * org.apache.harmony.lang.management.MemoryNotificationThreadShutdown class. + */ + +#include +#include "org_apache_harmony_lang_management_MemoryNotificationThreadShutdown.h" + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.MemoryNotificationThreadShutdown.sendShutdownNotification(I)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_sendShutdownNotification( + JNIEnv *, + jobject, + jint) +{ + // TODO implement this method stub correctly + TRACE2("management","sendShutdownNotification stub invocation"); +}; + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThreadShutdown.cpp ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_RuntimeMXBeanImpl.h =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_RuntimeMXBeanImpl.h (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_RuntimeMXBeanImpl.h (revision 0) @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * THE FILE HAS BEEN AUTOGENERATED BY THE IJH TOOL. + * Please be aware that all changes made to this file manually + * will be overwritten by the tool if it runs again. + */ + +#include + + +/* Header for class org.apache.harmony.lang.management.RuntimeMXBeanImpl */ + +#ifndef _ORG_APACHE_HARMONY_LANG_MANAGEMENT_RUNTIMEMXBEANIMPL_H +#define _ORG_APACHE_HARMONY_LANG_MANAGEMENT_RUNTIMEMXBEANIMPL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Static final fields */ + +#undef org_apache_harmony_lang_management_RuntimeMXBeanImpl_TM_ERROR_NONE +#define org_apache_harmony_lang_management_RuntimeMXBeanImpl_TM_ERROR_NONE 0L + +#undef org_apache_harmony_lang_management_RuntimeMXBeanImpl_TM_ERROR_INTERRUPT +#define org_apache_harmony_lang_management_RuntimeMXBeanImpl_TM_ERROR_INTERRUPT 52L + +#undef org_apache_harmony_lang_management_RuntimeMXBeanImpl_TM_ERROR_ILLEGAL_STATE +#define org_apache_harmony_lang_management_RuntimeMXBeanImpl_TM_ERROR_ILLEGAL_STATE 118L + + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.RuntimeMXBeanImpl.getNameImpl()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL +Java_org_apache_harmony_lang_management_RuntimeMXBeanImpl_getNameImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.RuntimeMXBeanImpl.getStartTimeImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_RuntimeMXBeanImpl_getStartTimeImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.RuntimeMXBeanImpl.getUptimeImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_RuntimeMXBeanImpl_getUptimeImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.RuntimeMXBeanImpl.isBootClassPathSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_RuntimeMXBeanImpl_isBootClassPathSupportedImpl(JNIEnv *, jobject); + + +#ifdef __cplusplus +} +#endif + +#endif /* _ORG_APACHE_HARMONY_LANG_MANAGEMENT_RUNTIMEMXBEANIMPL_H */ + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_RuntimeMXBeanImpl.h ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThread.cpp =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThread.cpp (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThread.cpp (revision 0) @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @author Andrey Yakushev + * @version $Revision$ + */ + +/** + * @file org_apache_harmony_lang_management_MemoryNotificationThread.cpp + * + * This file is a part of kernel class natives VM core component. + * It contains implementation for native methods of + * org.apache.harmony.lang.management.MemoryNotificationThread class. + */ + +#include +#include "org_apache_harmony_lang_management_MemoryNotificationThread.h" + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.MemoryNotificationThread.processNotificationLoop(I)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryNotificationThread_processNotificationLoop(JNIEnv *, jobject, + jint) +{ + // TODO implement this method stub correctly + TRACE2("management","processNotificationLoop stub invocation"); +}; + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThread.cpp ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl.cpp =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl.cpp (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl.cpp (revision 0) @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @author Andrey Yakushev + * @version $Revision$ + */ + +/** + * @file org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl.cpp + * + * This file is a part of kernel class natives VM core component. + * It contains implementation for native methods of + * org.apache.harmony.lang.management.GarbageCollectorMXBeanImpl class. + */ + +#include +#include "org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl.h" + +/* + * Method: org.apache.harmony.lang.management.GarbageCollectorMXBeanImpl.getCollectionCountImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl_getCollectionCountImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getCollectionCountImpl stub invocation"); + return 7L; +}; + +/* + * Method: org.apache.harmony.lang.management.GarbageCollectorMXBeanImpl.getCollectionTimeImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl_getCollectionTimeImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getCollectionTimeImpl stub invocation"); + return 2L<<17; +}; + + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl.cpp ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryPoolMXBeanImpl.h =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryPoolMXBeanImpl.h (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryPoolMXBeanImpl.h (revision 0) @@ -0,0 +1,148 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * THE FILE HAS BEEN AUTOGENERATED BY THE IJH TOOL. + * Please be aware that all changes made to this file manually + * will be overwritten by the tool if it runs again. + */ + +#include + + +/* Header for class org.apache.harmony.lang.management.MemoryPoolMXBeanImpl */ + +#ifndef _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYPOOLMXBEANIMPL_H +#define _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYPOOLMXBEANIMPL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Static final fields */ + +#undef org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_TM_ERROR_NONE +#define org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_TM_ERROR_NONE 0L + +#undef org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_TM_ERROR_INTERRUPT +#define org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_TM_ERROR_INTERRUPT 52L + +#undef org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_TM_ERROR_ILLEGAL_STATE +#define org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_TM_ERROR_ILLEGAL_STATE 118L + + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getCollectionUsageImpl()Ljava/lang/management/MemoryUsage; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getCollectionUsageImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getCollectionUsageThresholdImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getCollectionUsageThresholdImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getCollectionUsageThresholdCountImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getCollectionUsageThresholdCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getPeakUsageImpl()Ljava/lang/management/MemoryUsage; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getPeakUsageImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getUsageImpl()Ljava/lang/management/MemoryUsage; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getUsageImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getUsageThresholdImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getUsageThresholdImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getUsageThresholdCountImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getUsageThresholdCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.isCollectionUsageThresholdExceededImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_isCollectionUsageThresholdExceededImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.isCollectionUsageThresholdSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_isCollectionUsageThresholdSupportedImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.isUsageThresholdExceededImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_isUsageThresholdExceededImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.isUsageThresholdSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_isUsageThresholdSupportedImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.isValidImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_isValidImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.resetPeakUsageImpl()V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_resetPeakUsageImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.setCollectionUsageThresholdImpl(J)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_setCollectionUsageThresholdImpl(JNIEnv *, jobject, + jlong); + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.setUsageThresholdImpl(J)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_setUsageThresholdImpl(JNIEnv *, jobject, + jlong); + + +#ifdef __cplusplus +} +#endif + +#endif /* _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYPOOLMXBEANIMPL_H */ + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryPoolMXBeanImpl.h ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryManagerMXBeanImpl.h =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryManagerMXBeanImpl.h (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryManagerMXBeanImpl.h (revision 0) @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * THE FILE HAS BEEN AUTOGENERATED BY THE IJH TOOL. + * Please be aware that all changes made to this file manually + * will be overwritten by the tool if it runs again. + */ + +#include + + +/* Header for class org.apache.harmony.lang.management.MemoryManagerMXBeanImpl */ + +#ifndef _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYMANAGERMXBEANIMPL_H +#define _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYMANAGERMXBEANIMPL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Static final fields */ + +#undef org_apache_harmony_lang_management_MemoryManagerMXBeanImpl_TM_ERROR_NONE +#define org_apache_harmony_lang_management_MemoryManagerMXBeanImpl_TM_ERROR_NONE 0L + +#undef org_apache_harmony_lang_management_MemoryManagerMXBeanImpl_TM_ERROR_INTERRUPT +#define org_apache_harmony_lang_management_MemoryManagerMXBeanImpl_TM_ERROR_INTERRUPT 52L + +#undef org_apache_harmony_lang_management_MemoryManagerMXBeanImpl_TM_ERROR_ILLEGAL_STATE +#define org_apache_harmony_lang_management_MemoryManagerMXBeanImpl_TM_ERROR_ILLEGAL_STATE 118L + + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.MemoryManagerMXBeanImpl.createMemoryPools(ILorg/apache/harmony/lang/management/MemoryMXBeanImpl;)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryManagerMXBeanImpl_createMemoryPools(JNIEnv *, jobject, + jint, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryManagerMXBeanImpl.isValidImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryManagerMXBeanImpl_isValidImpl(JNIEnv *, jobject); + + +#ifdef __cplusplus +} +#endif + +#endif /* _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYMANAGERMXBEANIMPL_H */ + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryManagerMXBeanImpl.h ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ClassLoadingMXBeanImpl.h =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ClassLoadingMXBeanImpl.h (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ClassLoadingMXBeanImpl.h (revision 0) @@ -0,0 +1,88 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * THE FILE HAS BEEN AUTOGENERATED BY THE IJH TOOL. + * Please be aware that all changes made to this file manually + * will be overwritten by the tool if it runs again. + */ + +#include + + +/* Header for class org.apache.harmony.lang.management.ClassLoadingMXBeanImpl */ + +#ifndef _ORG_APACHE_HARMONY_LANG_MANAGEMENT_CLASSLOADINGMXBEANIMPL_H +#define _ORG_APACHE_HARMONY_LANG_MANAGEMENT_CLASSLOADINGMXBEANIMPL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Static final fields */ + +#undef org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_TM_ERROR_NONE +#define org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_TM_ERROR_NONE 0L + +#undef org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_TM_ERROR_INTERRUPT +#define org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_TM_ERROR_INTERRUPT 52L + +#undef org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_TM_ERROR_ILLEGAL_STATE +#define org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_TM_ERROR_ILLEGAL_STATE 118L + + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.ClassLoadingMXBeanImpl.getLoadedClassCountImpl()I + */ +JNIEXPORT jint JNICALL +Java_org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_getLoadedClassCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ClassLoadingMXBeanImpl.getTotalLoadedClassCountImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_getTotalLoadedClassCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ClassLoadingMXBeanImpl.getUnloadedClassCountImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_getUnloadedClassCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ClassLoadingMXBeanImpl.isVerboseImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_isVerboseImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ClassLoadingMXBeanImpl.setVerboseImpl(Z)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_setVerboseImpl(JNIEnv *, jobject, + jboolean); + + +#ifdef __cplusplus +} +#endif + +#endif /* _ORG_APACHE_HARMONY_LANG_MANAGEMENT_CLASSLOADINGMXBEANIMPL_H */ + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ClassLoadingMXBeanImpl.h ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ThreadMXBeanImpl.h =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ThreadMXBeanImpl.h (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ThreadMXBeanImpl.h (revision 0) @@ -0,0 +1,219 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * THE FILE HAS BEEN AUTOGENERATED BY THE IJH TOOL. + * Please be aware that all changes made to this file manually + * will be overwritten by the tool if it runs again. + */ + +#include + + +/* Header for class org.apache.harmony.lang.management.ThreadMXBeanImpl */ + +#ifndef _ORG_APACHE_HARMONY_LANG_MANAGEMENT_THREADMXBEANIMPL_H +#define _ORG_APACHE_HARMONY_LANG_MANAGEMENT_THREADMXBEANIMPL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Static final fields */ + +#undef org_apache_harmony_lang_management_ThreadMXBeanImpl_TM_ERROR_NONE +#define org_apache_harmony_lang_management_ThreadMXBeanImpl_TM_ERROR_NONE 0L + +#undef org_apache_harmony_lang_management_ThreadMXBeanImpl_TM_ERROR_INTERRUPT +#define org_apache_harmony_lang_management_ThreadMXBeanImpl_TM_ERROR_INTERRUPT 52L + +#undef org_apache_harmony_lang_management_ThreadMXBeanImpl_TM_ERROR_ILLEGAL_STATE +#define org_apache_harmony_lang_management_ThreadMXBeanImpl_TM_ERROR_ILLEGAL_STATE 118L + + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.findMonitorDeadlockedThreadsImpl()[J + */ +JNIEXPORT jlongArray JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_findMonitorDeadlockedThreadsImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getAllThreadIdsImpl()[J + */ +JNIEXPORT jlongArray JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getAllThreadIdsImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getDaemonThreadCountImpl()I + */ +JNIEXPORT jint JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getDaemonThreadCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getPeakThreadCountImpl()I + */ +JNIEXPORT jint JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getPeakThreadCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadCountImpl()I + */ +JNIEXPORT jint JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadCpuTimeImpl(J)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadCpuTimeImpl(JNIEnv *, jobject, + jlong); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadByIdImpl(J)Ljava/lang/Thread; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadByIdImpl(JNIEnv *, jobject, + jlong); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getObjectThreadIsBlockedOnImpl(Ljava/lang/Thread;)Ljava/lang/Object; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getObjectThreadIsBlockedOnImpl(JNIEnv *, jobject, + jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadOwningObjectImpl(Ljava/lang/Object;)Ljava/lang/Thread; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadOwningObjectImpl(JNIEnv *, jobject, + jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isSuspendedImpl(Ljava/lang/Thread;)Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isSuspendedImpl(JNIEnv *, jobject, + jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadWaitedCountImpl(Ljava/lang/Thread;)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadWaitedCountImpl(JNIEnv *, jobject, + jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadWaitedTimeImpl(Ljava/lang/Thread;)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadWaitedTimeImpl(JNIEnv *, jobject, + jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadBlockedTimeImpl(Ljava/lang/Thread;)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadBlockedTimeImpl(JNIEnv *, jobject, + jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadBlockedCountImpl(Ljava/lang/Thread;)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadBlockedCountImpl(JNIEnv *, jobject, + jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.createThreadInfoImpl(JLjava/lang/String;Ljava/lang/Thread$State;ZZJJJJLjava/lang/String;JLjava/lang/String;[Ljava/lang/StackTraceElement;)Ljava/lang/management/ThreadInfo; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_createThreadInfoImpl(JNIEnv *, jobject, + jlong, jstring, jobject, jboolean, jboolean, jlong, jlong, jlong, jlong, jstring, jlong, jstring, jobjectArray); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadUserTimeImpl(J)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadUserTimeImpl(JNIEnv *, jobject, + jlong); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getTotalStartedThreadCountImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getTotalStartedThreadCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isCurrentThreadCpuTimeSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isCurrentThreadCpuTimeSupportedImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isThreadContentionMonitoringEnabledImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isThreadContentionMonitoringEnabledImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isThreadContentionMonitoringSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isThreadContentionMonitoringSupportedImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isThreadCpuTimeEnabledImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isThreadCpuTimeEnabledImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isThreadCpuTimeSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isThreadCpuTimeSupportedImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.resetPeakThreadCountImpl()V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_resetPeakThreadCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.setThreadContentionMonitoringEnabledImpl(Z)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_setThreadContentionMonitoringEnabledImpl(JNIEnv *, jobject, + jboolean); + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.setThreadCpuTimeEnabledImpl(Z)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_setThreadCpuTimeEnabledImpl(JNIEnv *, jobject, + jboolean); + + +#ifdef __cplusplus +} +#endif + +#endif /* _ORG_APACHE_HARMONY_LANG_MANAGEMENT_THREADMXBEANIMPL_H */ + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ThreadMXBeanImpl.h ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryMXBeanImpl.h =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryMXBeanImpl.h (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryMXBeanImpl.h (revision 0) @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * THE FILE HAS BEEN AUTOGENERATED BY THE IJH TOOL. + * Please be aware that all changes made to this file manually + * will be overwritten by the tool if it runs again. + */ + +#include + + +/* Header for class org.apache.harmony.lang.management.MemoryMXBeanImpl */ + +#ifndef _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYMXBEANIMPL_H +#define _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYMXBEANIMPL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Static final fields */ + +#undef org_apache_harmony_lang_management_MemoryMXBeanImpl_TM_ERROR_NONE +#define org_apache_harmony_lang_management_MemoryMXBeanImpl_TM_ERROR_NONE 0L + +#undef org_apache_harmony_lang_management_MemoryMXBeanImpl_TM_ERROR_INTERRUPT +#define org_apache_harmony_lang_management_MemoryMXBeanImpl_TM_ERROR_INTERRUPT 52L + +#undef org_apache_harmony_lang_management_MemoryMXBeanImpl_TM_ERROR_ILLEGAL_STATE +#define org_apache_harmony_lang_management_MemoryMXBeanImpl_TM_ERROR_ILLEGAL_STATE 118L + + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.MemoryMXBeanImpl.createMemoryManagers()V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_createMemoryManagers(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryMXBeanImpl.getHeapMemoryUsageImpl()Ljava/lang/management/MemoryUsage; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_getHeapMemoryUsageImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryMXBeanImpl.getNonHeapMemoryUsageImpl()Ljava/lang/management/MemoryUsage; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_getNonHeapMemoryUsageImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryMXBeanImpl.getObjectPendingFinalizationCountImpl()I + */ +JNIEXPORT jint JNICALL +Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_getObjectPendingFinalizationCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryMXBeanImpl.isVerboseImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_isVerboseImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.MemoryMXBeanImpl.setVerboseImpl(Z)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_setVerboseImpl(JNIEnv *, jobject, + jboolean); + + +#ifdef __cplusplus +} +#endif + +#endif /* _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYMXBEANIMPL_H */ + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryMXBeanImpl.h ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_RuntimeMXBeanImpl.cpp =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_RuntimeMXBeanImpl.cpp (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_RuntimeMXBeanImpl.cpp (revision 0) @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @author Andrey Yakushev + * @version $Revision$ + */ + +/** + * @file org_apache_harmony_lang_management_RuntimeMXBeanImpl.cpp + * + * This file is a part of kernel class natives VM core component. + * It contains implementation for native methods of + * org.apache.harmony.lang.management.RuntimeMXBeanImpl class. + */ + +#include +#include +#include "java_lang_System.h" +#include "org_apache_harmony_lang_management_RuntimeMXBeanImpl.h" +/* + * Method: org.apache.harmony.lang.management.RuntimeMXBeanImpl.getNameImpl()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL +Java_org_apache_harmony_lang_management_RuntimeMXBeanImpl_getNameImpl(JNIEnv *env, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","RuntimeMXBeanImpl_getNameImpl stub invocation"); + char *buf = "DRLVM"; + return env->NewStringUTF(buf); +}; + +/* + * Method: org.apache.harmony.lang.management.RuntimeMXBeanImpl.getStartTimeImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_RuntimeMXBeanImpl_getStartTimeImpl(JNIEnv *env, jobject ) +{ + // TODO implement this method stub correctly + TRACE2("management","RuntimeMXBeanImpl_getStartTimeImpl stub invocation"); + return apr_time_now()/1000; +}; + +/* + * Method: org.apache.harmony.lang.management.RuntimeMXBeanImpl.getUptimeImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_RuntimeMXBeanImpl_getUptimeImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","RuntimeMXBeanImpl_getUptimeImpl stub invocation"); + return 1L<<10; +}; + +/* + * Method: org.apache.harmony.lang.management.RuntimeMXBeanImpl.isBootClassPathSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_RuntimeMXBeanImpl_isBootClassPathSupportedImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isBootClassPathSupportedImpl stub invocation"); + return JNI_TRUE; +}; + + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_RuntimeMXBeanImpl.cpp ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_CompilationMXBeanImpl.h =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_CompilationMXBeanImpl.h (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_CompilationMXBeanImpl.h (revision 0) @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * THE FILE HAS BEEN AUTOGENERATED BY THE IJH TOOL. + * Please be aware that all changes made to this file manually + * will be overwritten by the tool if it runs again. + */ + +#include + + +/* Header for class org.apache.harmony.lang.management.CompilationMXBeanImpl */ + +#ifndef _ORG_APACHE_HARMONY_LANG_MANAGEMENT_COMPILATIONMXBEANIMPL_H +#define _ORG_APACHE_HARMONY_LANG_MANAGEMENT_COMPILATIONMXBEANIMPL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Static final fields */ + +#undef org_apache_harmony_lang_management_CompilationMXBeanImpl_TM_ERROR_NONE +#define org_apache_harmony_lang_management_CompilationMXBeanImpl_TM_ERROR_NONE 0L + +#undef org_apache_harmony_lang_management_CompilationMXBeanImpl_TM_ERROR_INTERRUPT +#define org_apache_harmony_lang_management_CompilationMXBeanImpl_TM_ERROR_INTERRUPT 52L + +#undef org_apache_harmony_lang_management_CompilationMXBeanImpl_TM_ERROR_ILLEGAL_STATE +#define org_apache_harmony_lang_management_CompilationMXBeanImpl_TM_ERROR_ILLEGAL_STATE 118L + + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.CompilationMXBeanImpl.isJITEnabled()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_CompilationMXBeanImpl_isJITEnabled(JNIEnv *, jclass); + +/* + * Method: org.apache.harmony.lang.management.CompilationMXBeanImpl.getTotalCompilationTimeImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_CompilationMXBeanImpl_getTotalCompilationTimeImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.CompilationMXBeanImpl.isCompilationTimeMonitoringSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_CompilationMXBeanImpl_isCompilationTimeMonitoringSupportedImpl(JNIEnv *, jobject); + + +#ifdef __cplusplus +} +#endif + +#endif /* _ORG_APACHE_HARMONY_LANG_MANAGEMENT_COMPILATIONMXBEANIMPL_H */ + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_CompilationMXBeanImpl.h ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThreadShutdown.h =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThreadShutdown.h (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThreadShutdown.h (revision 0) @@ -0,0 +1,75 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * THE FILE HAS BEEN AUTOGENERATED BY THE IJH TOOL. + * Please be aware that all changes made to this file manually + * will be overwritten by the tool if it runs again. + */ + +#include + + +/* Header for class org.apache.harmony.lang.management.MemoryNotificationThreadShutdown */ + +#ifndef _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYNOTIFICATIONTHREADSHUTDOWN_H +#define _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYNOTIFICATIONTHREADSHUTDOWN_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Static final fields */ + +#undef org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_MAX_PRIORITY +#define org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_MAX_PRIORITY 10L + +#undef org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_MIN_PRIORITY +#define org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_MIN_PRIORITY 1L + +#undef org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_NORM_PRIORITY +#define org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_NORM_PRIORITY 5L + +#undef org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_GC_WATERMARK_MAX_COUNT +#define org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_GC_WATERMARK_MAX_COUNT 700L + +#undef org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_TM_ERROR_NONE +#define org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_TM_ERROR_NONE 0L + +#undef org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_TM_ERROR_INTERRUPT +#define org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_TM_ERROR_INTERRUPT 52L + +#undef org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_TM_ERROR_ILLEGAL_STATE +#define org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_TM_ERROR_ILLEGAL_STATE 118L + + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.MemoryNotificationThreadShutdown.sendShutdownNotification(I)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryNotificationThreadShutdown_sendShutdownNotification(JNIEnv *, jobject, + jint); + + +#ifdef __cplusplus +} +#endif + +#endif /* _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYNOTIFICATIONTHREADSHUTDOWN_H */ + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThreadShutdown.h ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThread.h =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThread.h (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThread.h (revision 0) @@ -0,0 +1,75 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * THE FILE HAS BEEN AUTOGENERATED BY THE IJH TOOL. + * Please be aware that all changes made to this file manually + * will be overwritten by the tool if it runs again. + */ + +#include + + +/* Header for class org.apache.harmony.lang.management.MemoryNotificationThread */ + +#ifndef _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYNOTIFICATIONTHREAD_H +#define _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYNOTIFICATIONTHREAD_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Static final fields */ + +#undef org_apache_harmony_lang_management_MemoryNotificationThread_MAX_PRIORITY +#define org_apache_harmony_lang_management_MemoryNotificationThread_MAX_PRIORITY 10L + +#undef org_apache_harmony_lang_management_MemoryNotificationThread_MIN_PRIORITY +#define org_apache_harmony_lang_management_MemoryNotificationThread_MIN_PRIORITY 1L + +#undef org_apache_harmony_lang_management_MemoryNotificationThread_NORM_PRIORITY +#define org_apache_harmony_lang_management_MemoryNotificationThread_NORM_PRIORITY 5L + +#undef org_apache_harmony_lang_management_MemoryNotificationThread_GC_WATERMARK_MAX_COUNT +#define org_apache_harmony_lang_management_MemoryNotificationThread_GC_WATERMARK_MAX_COUNT 700L + +#undef org_apache_harmony_lang_management_MemoryNotificationThread_TM_ERROR_NONE +#define org_apache_harmony_lang_management_MemoryNotificationThread_TM_ERROR_NONE 0L + +#undef org_apache_harmony_lang_management_MemoryNotificationThread_TM_ERROR_INTERRUPT +#define org_apache_harmony_lang_management_MemoryNotificationThread_TM_ERROR_INTERRUPT 52L + +#undef org_apache_harmony_lang_management_MemoryNotificationThread_TM_ERROR_ILLEGAL_STATE +#define org_apache_harmony_lang_management_MemoryNotificationThread_TM_ERROR_ILLEGAL_STATE 118L + + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.MemoryNotificationThread.processNotificationLoop(I)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryNotificationThread_processNotificationLoop(JNIEnv *, jobject, + jint); + + +#ifdef __cplusplus +} +#endif + +#endif /* _ORG_APACHE_HARMONY_LANG_MANAGEMENT_MEMORYNOTIFICATIONTHREAD_H */ + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryNotificationThread.h ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryPoolMXBeanImpl.cpp =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryPoolMXBeanImpl.cpp (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryPoolMXBeanImpl.cpp (revision 0) @@ -0,0 +1,252 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @author Andrey Yakushev + * @version $Revision$ + */ + +/** + * @file org_apache_harmony_lang_management_MemoryPoolMXBeanImpl.cpp + * + * This file is a part of kernel class natives VM core component. + * It contains implementation for native methods of + * org.apache.harmony.lang.management.MemoryPoolMXBeanImpl class. + */ + +#include +#include +#include "org_apache_harmony_lang_management_MemoryPoolMXBeanImpl.h" +#include "environment.h" + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getCollectionUsageImpl()Ljava/lang/management/MemoryUsage; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getCollectionUsageImpl(JNIEnv *jenv_ext, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getCollectionUsageImpl stub invocation"); + + JNIEnv_Internal *jenv = (JNIEnv_Internal *)jenv_ext; + + jlong init = 1L<<21; + jlong used = 1L<<20; + jlong committed = 1L<<20; + jlong max = 1L<<22; + + jclass memoryUsageClazz =jenv->FindClass("java/lang/management/MemoryUsage"); + if (jenv->ExceptionCheck()) return NULL; + jmethodID memoryUsageClazzConstructor = jenv->GetMethodID(memoryUsageClazz, "", "(JJJJ)V"); + if (jenv->ExceptionCheck()) return NULL; + + jobject memoryUsage = jenv->NewObject(memoryUsageClazz, memoryUsageClazzConstructor, init, used, + committed, max); + + return memoryUsage; +}; + +jlong collection_usage_threshold = 5L; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getCollectionUsageThresholdImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getCollectionUsageThresholdImpl(JNIEnv *, jobject){ + // TODO implement this method stub correctly + TRACE2("management","getCollectionUsageThresholdImpl stub invocation"); + return collection_usage_threshold; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getCollectionUsageThresholdCountImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getCollectionUsageThresholdCountImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getCollectionUsageThresholdCountImpl stub invocation"); + return 7L; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getPeakUsageImpl()Ljava/lang/management/MemoryUsage; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getPeakUsageImpl(JNIEnv * jenv_ext, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getPeakUsageImpl stub invocation"); + + JNIEnv_Internal *jenv = (JNIEnv_Internal *)jenv_ext; + + jlong init = 1L<<21; + jlong used = 1L<<20; + jlong committed = 1L<<20; + jlong max = 1L<<22; + + jclass memoryUsageClazz =jenv->FindClass("java/lang/management/MemoryUsage"); + if (jenv->ExceptionCheck()) return NULL; + jmethodID memoryUsageClazzConstructor = jenv->GetMethodID(memoryUsageClazz, "", "(JJJJ)V"); + if (jenv->ExceptionCheck()) return NULL; + + jobject memoryUsage = jenv->NewObject(memoryUsageClazz, memoryUsageClazzConstructor, init, used, + committed, max); + + return memoryUsage; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getUsageImpl()Ljava/lang/management/MemoryUsage; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getUsageImpl(JNIEnv * jenv_ext, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","MemoryPoolMXBeanImpl_getUsageImpl stub invocation"); + + JNIEnv_Internal *jenv = (JNIEnv_Internal *)jenv_ext; + + jlong init = 1L<<21; + jlong used = 1L<<20; + jlong committed = 1L<<20; + jlong max = 1L<<22; + + jclass memoryUsageClazz =jenv->FindClass("java/lang/management/MemoryUsage"); + if (jenv->ExceptionCheck()) return NULL; + jmethodID memoryUsageClazzConstructor = jenv->GetMethodID(memoryUsageClazz, "", "(JJJJ)V"); + if (jenv->ExceptionCheck()) return NULL; + + jobject memoryUsage = jenv->NewObject(memoryUsageClazz, memoryUsageClazzConstructor, init, used, + committed, max); + + return memoryUsage; +}; + +jlong usage_threshold = 5L; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getUsageThresholdImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getUsageThresholdImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","MemoryPoolMXBeanImpl_getUsageThresholdImpl stub invocation"); + return usage_threshold; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.getUsageThresholdCountImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_getUsageThresholdCountImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","MemoryPoolMXBeanImpl_getUsageThresholdCountImpl stub invocation"); + return 8L; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.isCollectionUsageThresholdExceededImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_isCollectionUsageThresholdExceededImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isCollectionUsageThresholdExceededImpl stub invocation"); + return JNI_FALSE; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.isCollectionUsageThresholdSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_isCollectionUsageThresholdSupportedImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isCollectionUsageThresholdSupportedImpl stub invocation"); + return JNI_TRUE; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.isUsageThresholdExceededImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_isUsageThresholdExceededImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isUsageThresholdExceededImpl stub invocation"); + return JNI_FALSE; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.isUsageThresholdSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_isUsageThresholdSupportedImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isUsageThresholdSupportedImpl stub invocation"); + return JNI_TRUE; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.isValidImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_isValidImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","MemoryPoolMXBeanImpl_isValidImpl stub invocation"); + return JNI_TRUE; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.resetPeakUsageImpl()V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_resetPeakUsageImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","MemoryPoolMXBeanImpl_resetPeakUsageImpl stub invocation"); +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.setCollectionUsageThresholdImpl(J)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_setCollectionUsageThresholdImpl( + JNIEnv *, jobject, jlong newValue) +{ + // TODO implement this method stub correctly + TRACE2("management","MemoryPoolMXBeanImpl_setCollectionUsageThresholdImpl stub invocation"); + collection_usage_threshold = newValue; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryPoolMXBeanImpl.setUsageThresholdImpl(J)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryPoolMXBeanImpl_setUsageThresholdImpl( + JNIEnv *, jobject, jlong newValue) +{ + // TODO implement this method stub correctly + TRACE2("management","MemoryPoolMXBeanImpl_setUsageThresholdImpl stub invocation"); + usage_threshold = newValue; +}; Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryPoolMXBeanImpl.cpp ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ClassLoadingMXBeanImpl.cpp =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ClassLoadingMXBeanImpl.cpp (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ClassLoadingMXBeanImpl.cpp (revision 0) @@ -0,0 +1,99 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @author Andrey Yakushev + * @version $Revision$ + */ + +/** + * @file org_apache_harmony_lang_management_ClassLoadingMXBeanImpl.cpp + * + * This file is a part of kernel class natives VM core component. + * It contains implementation for native methods of + * org.apache.harmony.lang.management.ClassLoadingMXBeanImpl class. + */ + +#include +#include "org_apache_harmony_lang_management_ClassLoadingMXBeanImpl.h" +/* + * Class: org_apache_harmony_lang_management_ClassLoadingMXBeanImpl + * Method: getLoadedClassCountImpl + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_getLoadedClassCountImpl +(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getLoadedClassCountImpl stub invocation"); + return 1<<3; +}; + +/* + * Class: org_apache_harmony_lang_management_ClassLoadingMXBeanImpl + * Method: getTotalLoadedClassCountImpl + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_getTotalLoadedClassCountImpl +(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getTotalLoadedClassCountImpl stub invocation"); + return 1<<4; +}; + +/* + * Class: org_apache_harmony_lang_management_ClassLoadingMXBeanImpl + * Method: getUnloadedClassCountImpl + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_getUnloadedClassCountImpl +(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getUnloadedClassCountImpl stub invocation"); + return 1<<2; +}; + +jboolean ClassLoadingVerbose = JNI_FALSE; + + +/* + * Class: org_apache_harmony_lang_management_ClassLoadingMXBeanImpl + * Method: isVerboseImpl + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_isVerboseImpl +(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","ClassLoadingMXBeanImpl_isVerboseImpl stub invocation"); + return ClassLoadingVerbose; +}; + +/* + * Class: org_apache_harmony_lang_management_ClassLoadingMXBeanImpl + * Method: setVerboseImpl + * Signature: (Z)V + */ +JNIEXPORT void JNICALL Java_org_apache_harmony_lang_management_ClassLoadingMXBeanImpl_setVerboseImpl +(JNIEnv *, jobject, jboolean new_value) +{ + // TODO implement this method stub correctly + TRACE2("management","ClassLoadingMXBeanImpl_setVerboseImpl stub invocation"); + ClassLoadingVerbose = new_value; +}; + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ClassLoadingMXBeanImpl.cpp ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryManagerMXBeanImpl.cpp =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryManagerMXBeanImpl.cpp (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryManagerMXBeanImpl.cpp (revision 0) @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @author Andrey Yakushev + * @version $Revision$ + */ + +/** + * @file org_apache_harmony_lang_management_MemoryManagerMXBeanImpl.cpp + * + * This file is a part of kernel class natives VM core component. + * It contains implementation for native methods of + * org.apache.harmony.lang.management.MemoryManagerMXBeanImpl class. + */ + +#include "org_apache_harmony_lang_management_MemoryManagerMXBeanImpl.h" +#include +#include "environment.h" + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.MemoryManagerMXBeanImpl.createMemoryPools(ILorg/apache/harmony/lang/management/MemoryMXBeanImpl;)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_MemoryManagerMXBeanImpl_createMemoryPools( + JNIEnv *jenv_ext, jobject obj, jint, jobject memBean) +{ + // TODO implement this method stub correctly + TRACE2("management","createMemoryPools stub invocation"); + + JNIEnv_Internal *jenv = (JNIEnv_Internal *)jenv_ext; + + jclass memoryManagerMXBeanImplClazz =jenv->FindClass( + "org/apache/harmony/lang/management/MemoryManagerMXBeanImpl"); + if (jenv->ExceptionCheck()) {return;}; + jmethodID createMemoryPoolHelperMethod = jenv->GetMethodID( + memoryManagerMXBeanImplClazz, + "createMemoryPoolHelper", + "(Ljava/lang/String;ZILorg/apache/harmony/lang/management/MemoryMXBeanImpl;)V"); + if (jenv->ExceptionCheck()) {return;}; + + jobject nameMP = jenv->NewStringUTF("Memory Pool #1"); + if (jenv->ExceptionCheck()) {return;}; + + jenv->CallVoidMethod(obj, createMemoryPoolHelperMethod, nameMP, JNI_TRUE, 1, memBean); + if (jenv->ExceptionCheck()) {return;}; +}; + +/* + * Method: org.apache.harmony.lang.management.MemoryManagerMXBeanImpl.isValidImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_MemoryManagerMXBeanImpl_isValidImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isValidImpl stub invocation"); + return JNI_TRUE; +}; + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryManagerMXBeanImpl.cpp ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl.h =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl.h (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl.h (revision 0) @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * THE FILE HAS BEEN AUTOGENERATED BY THE IJH TOOL. + * Please be aware that all changes made to this file manually + * will be overwritten by the tool if it runs again. + */ + +#include + + +/* Header for class org.apache.harmony.lang.management.GarbageCollectorMXBeanImpl */ + +#ifndef _ORG_APACHE_HARMONY_LANG_MANAGEMENT_GARBAGECOLLECTORMXBEANIMPL_H +#define _ORG_APACHE_HARMONY_LANG_MANAGEMENT_GARBAGECOLLECTORMXBEANIMPL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Static final fields */ + +#undef org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl_TM_ERROR_NONE +#define org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl_TM_ERROR_NONE 0L + +#undef org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl_TM_ERROR_INTERRUPT +#define org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl_TM_ERROR_INTERRUPT 52L + +#undef org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl_TM_ERROR_ILLEGAL_STATE +#define org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl_TM_ERROR_ILLEGAL_STATE 118L + + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.GarbageCollectorMXBeanImpl.getCollectionCountImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl_getCollectionCountImpl(JNIEnv *, jobject); + +/* + * Method: org.apache.harmony.lang.management.GarbageCollectorMXBeanImpl.getCollectionTimeImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl_getCollectionTimeImpl(JNIEnv *, jobject); + + +#ifdef __cplusplus +} +#endif + +#endif /* _ORG_APACHE_HARMONY_LANG_MANAGEMENT_GARBAGECOLLECTORMXBEANIMPL_H */ + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_GarbageCollectorMXBeanImpl.h ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ThreadMXBeanImpl.cpp =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ThreadMXBeanImpl.cpp (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ThreadMXBeanImpl.cpp (revision 0) @@ -0,0 +1,419 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @author Andrey Yakushev + * @version $Revision$ + */ + +/** + * @file org_apache_harmony_lang_management_ThreadMXBeanImpl.cpp + * + * This file is a part of kernel class natives VM core component. + * It contains implementation for native methods of + * org.apache.harmony.lang.management.ThreadMXBeanImpl class. + */ + +#include +#include +#include "exceptions.h" +#include "environment.h" +#include "java_lang_System.h" +#include "org_apache_harmony_lang_management_ThreadMXBeanImpl.h" + +/* Native methods */ + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.findMonitorDeadlockedThreadsImpl()[J + */ +JNIEXPORT jlongArray JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_findMonitorDeadlockedThreadsImpl(JNIEnv *jenv, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","findMonitorDeadlockedThreadsImpl stub invocation"); + jlongArray array = jenv->NewLongArray(0); + + return array; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getAllThreadIdsImpl()[J + */ +JNIEXPORT jlongArray JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getAllThreadIdsImpl(JNIEnv *jenv_ext, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getAllThreadIdsImpl stub invocation"); + JNIEnv_Internal *jenv = (JNIEnv_Internal *)jenv_ext; + + jlongArray array = jenv->NewLongArray(1); + if (jenv->ExceptionCheck()) return NULL; + + jclass threadClazz =jenv->FindClass("java/lang/Thread"); + if (jenv->ExceptionCheck()) return NULL; + + jmethodID currentThreadMethod = jenv->GetStaticMethodID(threadClazz, "currentThread", + "()Ljava/lang/Thread;"); + if (jenv->ExceptionCheck()) return NULL; + + jobject currentThread = jenv->CallStaticObjectMethod(threadClazz, currentThreadMethod, NULL); + if (jenv->ExceptionCheck()) return NULL; + + jmethodID getIdMethod = jenv->GetMethodID(threadClazz, "getId", "()J"); + if (jenv->ExceptionCheck()) return NULL; + + jlong id = jenv->CallLongMethod(currentThread, getIdMethod); + if (jenv->ExceptionCheck()) return NULL; + + jenv->SetLongArrayRegion(array, 0, 1, &id); + + return array; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getDaemonThreadCountImpl()I + */ +JNIEXPORT jint JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getDaemonThreadCountImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getDaemonThreadCountImpl stub invocation"); + return 0; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getPeakThreadCountImpl()I + */ +JNIEXPORT jint JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getPeakThreadCountImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getPeakThreadCountImpl stub invocation"); + return 1; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadCountImpl()I + */ +JNIEXPORT jint JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadCountImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getThreadCountImpl stub invocation"); + return 1; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadCpuTimeImpl(J)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadCpuTimeImpl(JNIEnv *jenv, jobject, + jlong id) +{ + // TODO implement this method stub correctly + TRACE2("management","getThreadCpuTimeImpl stub invocation"); + if (id <= 0) { + TRACE2("management","getThreadCpuTimeImpl java/lang/IllegalArgumentException is thrown"); + ThrowNew_Quick(jenv, "java/lang/IllegalArgumentException", "id <= 0"); + }; + + return 1L<<10; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadByIdImpl(J)Ljava/lang/Thread; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadByIdImpl( + JNIEnv *jenv_ext, + jobject, + jlong) +{ + // TODO implement this method stub correctly + TRACE2("management","getThreadByIdImpl stub invocation"); + + JNIEnv_Internal *jenv = (JNIEnv_Internal *)jenv_ext; + + jclass threadClazz =jenv->FindClass("java/lang/Thread"); + if (jenv->ExceptionCheck()) return NULL; + + jmethodID currentThreadMethod = jenv->GetStaticMethodID(threadClazz, "currentThread", + "()Ljava/lang/Thread;"); + if (jenv->ExceptionCheck()) return NULL; + + jobject jresult = jenv->CallStaticObjectMethod(threadClazz, currentThreadMethod, NULL); + return jresult; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getObjectThreadIsBlockedOnImpl(Ljava/lang/Thread;)Ljava/lang/Object; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getObjectThreadIsBlockedOnImpl(JNIEnv *, jobject, + jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getObjectThreadIsBlockedOnImpl stub invocation"); + return NULL; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadOwningObjectImpl(Ljava/lang/Object;)Ljava/lang/Thread; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadOwningObjectImpl(JNIEnv *, jobject, + jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getThreadOwningObjectImpl stub invocation"); + return NULL; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isSuspendedImpl(Ljava/lang/Thread;)Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isSuspendedImpl(JNIEnv *, jobject, + jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","ThreadMXBeanImpl_isSuspendedImpl stub invocation"); + return JNI_TRUE; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadWaitedCountImpl(Ljava/lang/Thread;)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadWaitedCountImpl(JNIEnv *, jobject, + jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getThreadWaitedCountImpl stub invocation"); + return 2L; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadWaitedTimeImpl(Ljava/lang/Thread;)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadWaitedTimeImpl(JNIEnv *, jobject, + jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getThreadWaitedCountImpl stub invocation"); + return 1L<<12; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadBlockedTimeImpl(Ljava/lang/Thread;)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadBlockedTimeImpl(JNIEnv *, jobject, + jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getThreadBlockedTimeImpl stub invocation"); + return 1L<<11; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadBlockedCountImpl(Ljava/lang/Thread;)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadBlockedCountImpl(JNIEnv *, jobject, + jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getThreadBlockedCountImpl stub invocation"); + return 5L; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.createThreadInfoImpl(JLjava/lang/String;Ljava/lang/Thread$State;ZZJJJJLjava/lang/String;JLjava/lang/String;[Ljava/lang/StackTraceElement;)Ljava/lang/management/ThreadInfo; + */ +JNIEXPORT jobject JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_createThreadInfoImpl( + JNIEnv *jenv_ext, + jobject , + jlong threadIdVal, + jstring threadNameVal, + jobject threadStateVal, + jboolean suspendedVal, + jboolean inNativeVal, + jlong blockedCountVal, + jlong blockedTimeVal, + jlong waitedCountVal, + jlong waitedTimeVal, + jstring lockNameVal, + jlong lockOwnerIdVal, + jstring lockOwnerNameVal, + jobjectArray stackTraceVal) +{ + // TODO implement this method stub correctly + TRACE2("management","createThreadInfoImpl stub invocation"); + + JNIEnv_Internal *jenv = (JNIEnv_Internal *)jenv_ext; + + jclass threadInfoClazz =jenv->FindClass("java/lang/management/ThreadInfo"); + if (jenv->ExceptionCheck()) return NULL; + jmethodID threadInfoClazzConstructor = jenv->GetMethodID(threadInfoClazz, "", + "(JLjava/lang/String;Ljava/lang/Thread$State;ZZJJJJLjava/lang/String;" + "JLjava/lang/String;[Ljava/lang/StackTraceElement;)V"); + if (jenv->ExceptionCheck()) return NULL; + + jobject threadInfo = jenv->NewObject( + threadInfoClazz, + threadInfoClazzConstructor, + threadIdVal, + threadNameVal, + threadStateVal, + suspendedVal, + inNativeVal, + blockedCountVal, + blockedTimeVal, + waitedCountVal, + waitedTimeVal, + lockNameVal, + lockOwnerIdVal, + lockOwnerNameVal, + stackTraceVal); + + assert(!exn_raised()); + + return threadInfo; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getThreadUserTimeImpl(J)J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getThreadUserTimeImpl(JNIEnv *, jobject, + jlong) +{ + // TODO implement this method stub correctly + TRACE2("management","getThreadUserTimeImpl stub invocation"); + return 1L<<11; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.getTotalStartedThreadCountImpl()J + */ +JNIEXPORT jlong JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getTotalStartedThreadCountImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getTotalStartedThreadCountImpl stub invocation"); + return 5L; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isCurrentThreadCpuTimeSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isCurrentThreadCpuTimeSupportedImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isCurrentThreadCpuTimeSupportedImpl stub invocation"); + return JNI_TRUE; +}; + +jboolean thread_contention_monitoring = JNI_TRUE; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isThreadContentionMonitoringEnabledImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isThreadContentionMonitoringEnabledImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isThreadContentionMonitoringEnabledImpl stub invocation"); + return thread_contention_monitoring; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isThreadContentionMonitoringSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isThreadContentionMonitoringSupportedImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isThreadContentionMonitoringSupportedImpl stub invocation"); + return JNI_TRUE; +}; + +jboolean thread_cpu_time_enabled = JNI_TRUE; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isThreadCpuTimeEnabledImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isThreadCpuTimeEnabledImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isThreadCpuTimeEnabledImpl stub invocation"); + return thread_cpu_time_enabled; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.isThreadCpuTimeSupportedImpl()Z + */ +JNIEXPORT jboolean JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_isThreadCpuTimeSupportedImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isThreadCpuTimeSupportedImpl stub invocation"); + return JNI_TRUE; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.resetPeakThreadCountImpl()V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_resetPeakThreadCountImpl(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","resetPeakThreadCountImpl stub invocation"); +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.setThreadContentionMonitoringEnabledImpl(Z)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_setThreadContentionMonitoringEnabledImpl( + JNIEnv *, + jobject, + jboolean new_value) +{ + // TODO implement this method stub correctly + TRACE2("management","setThreadContentionMonitoringEnabledImpl stub invocation"); + thread_contention_monitoring = new_value; +}; + +/* + * Method: org.apache.harmony.lang.management.ThreadMXBeanImpl.setThreadCpuTimeEnabledImpl(Z)V + */ +JNIEXPORT void JNICALL +Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_setThreadCpuTimeEnabledImpl(JNIEnv *, jobject, + jboolean new_value) +{ + // TODO implement this method stub correctly + TRACE2("management","setThreadCpuTimeEnabledImpl stub invocation"); + thread_cpu_time_enabled = new_value; +}; + + + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ThreadMXBeanImpl.cpp ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryMXBeanImpl.cpp =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryMXBeanImpl.cpp (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryMXBeanImpl.cpp (revision 0) @@ -0,0 +1,166 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @author Andrey Yakushev + * @version $Revision$ + */ + +/** + * @file org_apache_harmony_lang_management_MemoryMXBeanImpl.cpp + * + * This file is a part of kernel class natives VM core component. + * It contains implementation for native methods of + * org.apache.harmony.lang.management.MemoryMXBeanImpl class. + */ + +#include "org_apache_harmony_lang_management_MemoryMXBeanImpl.h" +#include +#include "environment.h" +/* Header for class org_apache_harmony_lang_management_MemoryMXBeanImpl */ + +/* + * Class: org_apache_harmony_lang_management_MemoryMXBeanImpl + * Method: createMemoryManagers + * Signature: ()V + * IMPORTANT : VM is the sole caller of this method. + */ +JNIEXPORT void JNICALL Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_createMemoryManagers +(JNIEnv * jenv_ext, jobject obj) +{ + // TODO implement this method stub correctly + TRACE2("management","createMemoryManagers stub invocation"); + + JNIEnv_Internal *jenv = (JNIEnv_Internal *)jenv_ext; + + jclass memoryMXBeanImplClazz =jenv->FindClass("org/apache/harmony/lang/management/MemoryMXBeanImpl"); + if (jenv->ExceptionCheck()) {return;}; + jmethodID createMemoryManagerHelperMethod = jenv->GetMethodID( + memoryMXBeanImplClazz, + "createMemoryManagerHelper", + "(Ljava/lang/String;IZ)V"); + if (jenv->ExceptionCheck()) {return;}; + + jobject nameGCMM = jenv->NewStringUTF("GCMemoryManager"); + if (jenv->ExceptionCheck()) {return;}; + jenv->CallVoidMethod(obj, createMemoryManagerHelperMethod, nameGCMM, 1, JNI_TRUE); + if (jenv->ExceptionCheck()) {return;}; + + jobject nameNMM = jenv->NewStringUTF("NativeMemoryManager"); + if (jenv->ExceptionCheck()) {return;}; + jenv->CallVoidMethod(obj, createMemoryManagerHelperMethod, nameNMM, 1, JNI_FALSE); +}; + +/* + * Class: org_apache_harmony_lang_management_MemoryMXBeanImpl + * Method: getHeapMemoryUsageImpl + * Signature: ()Ljava/lang/management/MemoryUsage; + */ +JNIEXPORT jobject JNICALL Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_getHeapMemoryUsageImpl +(JNIEnv * jenv_ext, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getHeapMemoryUsageImpl stub invocation"); + + JNIEnv_Internal *jenv = (JNIEnv_Internal *)jenv_ext; + + jlong init = 1L<<21; + jlong used = 1L<<20; + jlong committed = 1L<<20; + jlong max = 1L<<22; + + jclass memoryUsageClazz =jenv->FindClass("java/lang/management/MemoryUsage"); + if (jenv->ExceptionCheck()) {return NULL;}; + jmethodID memoryUsageClazzConstructor = jenv->GetMethodID(memoryUsageClazz, "", "(JJJJ)V"); + if (jenv->ExceptionCheck()) {return NULL;}; + + jobject memoryUsage = jenv->NewObject(memoryUsageClazz, memoryUsageClazzConstructor, init, used, + committed, max); + + return memoryUsage; +}; + +/* + * Class: org_apache_harmony_lang_management_MemoryMXBeanImpl + * Method: getNonHeapMemoryUsageImpl + * Signature: ()Ljava/lang/management/MemoryUsage; + */ +JNIEXPORT jobject JNICALL Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_getNonHeapMemoryUsageImpl +(JNIEnv * jenv_ext, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getNonHeapMemoryUsageImpl stub invocation"); + Global_Env* genv = VM_Global_State::loader_env; + + JNIEnv_Internal *jenv = (JNIEnv_Internal *)jenv_ext; + + jlong init = 1L<<21; + jlong used = 1L<<20; + jlong committed = 1L<<20; + jlong max = 1L<<22; + + jclass memoryUsageClazz =jenv->FindClass("java/lang/management/MemoryUsage"); + if (jenv->ExceptionCheck()) {return NULL;}; + jmethodID memoryUsageClazzConstructor = jenv->GetMethodID(memoryUsageClazz, "", "(JJJJ)V"); + if (jenv->ExceptionCheck()) {return NULL;}; + + jobject memoryUsage = jenv->NewObject(memoryUsageClazz, memoryUsageClazzConstructor, init, used, + committed, max); + + return memoryUsage; +}; + +/* + * Class: org_apache_harmony_lang_management_MemoryMXBeanImpl + * Method: getObjectPendingFinalizationCountImpl + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_getObjectPendingFinalizationCountImpl +(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getObjectPendingFinalizationCountImp stub invocation"); + return 20; +} + +jboolean memory_bean_verbose = JNI_TRUE; + +/* + * Class: org_apache_harmony_lang_management_MemoryMXBeanImpl + * Method: isVerboseImpl + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_isVerboseImpl +(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","MemoryMXBeanImpl_isVerboseImpl stub invocation"); + return memory_bean_verbose; +}; + +/* + * Class: org_apache_harmony_lang_management_MemoryMXBeanImpl + * Method: setVerboseImpl + * Signature: (Z)V + */ +JNIEXPORT void JNICALL Java_org_apache_harmony_lang_management_MemoryMXBeanImpl_setVerboseImpl +(JNIEnv *, jobject, jboolean newValue) +{ + // TODO implement this method stub correctly + TRACE2("management","MemoryMXBeanImpl_setVerboseImpl stub invocation"); + memory_bean_verbose = newValue; +}; + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_MemoryMXBeanImpl.cpp ___________________________________________________________________ Name: svn:eol-style + native Index: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_CompilationMXBeanImpl.cpp =================================================================== --- vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_CompilationMXBeanImpl.cpp (revision 0) +++ vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_CompilationMXBeanImpl.cpp (revision 0) @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @author Andrey Yakushev + * @version $Revision$ + */ + +/** + * @file org_apache_harmony_lang_management_CompilationMXBeanImpl.cpp + * + * This file is a part of kernel class natives VM core component. + * It contains implementation for native methods of + * org.apache.harmony.lang.management.CompilationMXBeanImpl class. + */ + +#include +#include "org_apache_harmony_lang_management_CompilationMXBeanImpl.h" +/* + * Class: org_apache_harmony_lang_management_CompilationMXBeanImpl + * Method: isJITEnabled + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_apache_harmony_lang_management_CompilationMXBeanImpl_isJITEnabled +(JNIEnv *, jclass) +{ + // TODO implement this method stub correctly + TRACE2("management","isJITEnabled stub invocation"); + return JNI_TRUE; +}; + +/* + * Class: org_apache_harmony_lang_management_CompilationMXBeanImpl + * Method: getTotalCompilationTimeImpl + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_apache_harmony_lang_management_CompilationMXBeanImpl_getTotalCompilationTimeImpl +(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","getTotalCompilationTimeImpl stub invocation"); + return 1L<<5; +}; + +/* + * Class: org_apache_harmony_lang_management_CompilationMXBeanImpl + * Method: isCompilationTimeMonitoringSupportedImpl + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_apache_harmony_lang_management_CompilationMXBeanImpl_isCompilationTimeMonitoringSupportedImpl +(JNIEnv *, jobject) +{ + // TODO implement this method stub correctly + TRACE2("management","isCompilationTimeMonitoringSupportedImpl stub invocation"); + return JNI_TRUE; +}; + Property changes on: vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_CompilationMXBeanImpl.cpp ___________________________________________________________________ Name: svn:eol-style + native