LCOV - code coverage report
Current view: top level - native/vm/gnuclasspath - gnu_java_lang_management_VMRuntimeMXBeanImpl.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 5 11 45.5 %
Date: 2015-06-10 18:10:59 Functions: 1 3 33.3 %

          Line data    Source code
       1             : /* src/native/vm/gnuclasspath/gnu_java_lang_management_VMRuntimeMXBeanImpl.cpp
       2             : 
       3             :    Copyright (C) 1996-2013
       4             :    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
       5             : 
       6             :    This file is part of CACAO.
       7             : 
       8             :    This program is free software; you can redistribute it and/or
       9             :    modify it under the terms of the GNU General Public License as
      10             :    published by the Free Software Foundation; either version 2, or (at
      11             :    your option) any later version.
      12             : 
      13             :    This program is distributed in the hope that it will be useful, but
      14             :    WITHOUT ANY WARRANTY; without even the implied warranty of
      15             :    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      16             :    General Public License for more details.
      17             : 
      18             :    You should have received a copy of the GNU General Public License
      19             :    along with this program; if not, write to the Free Software
      20             :    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
      21             :    02110-1301, USA.
      22             : 
      23             : */
      24             : 
      25             : 
      26             : #include "config.h"
      27             : 
      28             : #include <stdint.h>
      29             : 
      30             : #include "native/jni.hpp"
      31             : #include "native/native.hpp"
      32             : 
      33             : #include "toolbox/logging.hpp"
      34             : 
      35             : #if defined(ENABLE_JNI_HEADERS)
      36             : # include "native/vm/include/gnu_java_lang_management_VMRuntimeMXBeanImpl.h"
      37             : #endif
      38             : 
      39             : #include "vm/array.hpp"
      40             : #include "vm/jit/builtin.hpp"
      41             : #include "vm/global.hpp"
      42             : #include "vm/globals.hpp"
      43             : #include "vm/utf8.hpp"
      44             : #include "vm/vm.hpp"
      45             : 
      46             : 
      47             : // Native functions are exported as C functions.
      48             : extern "C" {
      49             : 
      50             : /*
      51             :  * Class:     gnu/java/lang/management/VMRuntimeMXBeanImpl
      52             :  * Method:    getInputArguments
      53             :  * Signature: ()[Ljava/lang/String;
      54             :  */
      55           0 : JNIEXPORT java_handle_objectarray_t* JNICALL Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getInputArguments(JNIEnv *env, jclass clazz)
      56             : {
      57           0 :         log_println("Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getInputArguments: IMPLEMENT ME!");
      58             : 
      59           0 :         ObjectArray oa(0, class_java_lang_String);
      60             : 
      61           0 :         return oa.get_handle();
      62             : }
      63             : 
      64             : 
      65             : /*
      66             :  * Class:     gnu/java/lang/management/VMRuntimeMXBeanImpl
      67             :  * Method:    getStartTime
      68             :  * Signature: ()J
      69             :  */
      70           0 : JNIEXPORT int64_t JNICALL Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getStartTime(JNIEnv *env, jclass clazz)
      71             : {
      72           0 :         return VM::get_current()->get_starttime();
      73             : }
      74             : 
      75             : } // extern "C"
      76             : 
      77             : 
      78             : /* native methods implemented by this file ************************************/
      79             : 
      80             : static JNINativeMethod methods[] = {
      81             :         { (char*) "getInputArguments", (char*) "()[Ljava/lang/String;", (void*) (uintptr_t) &Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getInputArguments },
      82             :         { (char*) "getStartTime",      (char*) "()J",                   (void*) (uintptr_t) &Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getStartTime      },
      83             : };
      84             : 
      85             : 
      86             : /* _Jv_gnu_java_lang_management_VMRuntimeMXBeanImpl_init ***********************
      87             : 
      88             :    Register native functions.
      89             : 
      90             : *******************************************************************************/
      91             : 
      92         163 : void _Jv_gnu_java_lang_management_VMRuntimeMXBeanImpl_init(void)
      93             : {
      94         163 :         Utf8String u = Utf8String::from_utf8("gnu/java/lang/management/VMRuntimeMXBeanImpl");
      95             : 
      96         163 :         NativeMethods& nm = VM::get_current()->get_nativemethods();
      97         163 :         nm.register_methods(u, methods, NATIVE_METHODS_COUNT);
      98         163 : }
      99             : 
     100             : 
     101             : /*
     102             :  * These are local overrides for various environment variables in Emacs.
     103             :  * Please do not remove this and leave it at the end of the file, where
     104             :  * Emacs will automagically detect them.
     105             :  * ---------------------------------------------------------------------
     106             :  * Local variables:
     107             :  * mode: c++
     108             :  * indent-tabs-mode: t
     109             :  * c-basic-offset: 4
     110             :  * tab-width: 4
     111             :  * End:
     112             :  * vim:noexpandtab:sw=4:ts=4:
     113             :  */

Generated by: LCOV version 1.11