MethodPool: removed demo call stuff - added printGCStats instead;
[mate.git] / Mate / MethodPool.hs
index 73f47c090a76259fde609f4b1139a28a4191baca..79b63e3ca2d9ec768221830cd14d0b926eaf6b48 100644 (file)
@@ -32,13 +32,19 @@ import Mate.NativeMachine
 import Mate.ClassPool
 import Mate.Debug
 import Mate.Utilities
+import Mate.Rts()
 
 foreign import ccall "dynamic"
    code_void :: FunPtr (IO ()) -> IO ()
 
-foreign import ccall "&demoInterfaceCall"
-  demoInterfaceCallAddr :: FunPtr (CUInt -> IO ())
+foreign import ccall "&printMemoryUsage"
+  printMemoryUsageAddr :: FunPtr (IO ())
+foreign import ccall "&loadLibrary"
+  loadLibraryAddr :: FunPtr (IO ())
 
+foreign import ccall "&printGCStats"
+  printGCStatsAddr :: FunPtr (IO ())
 
 getMethodEntry :: CPtrdiff -> CPtrdiff -> IO CPtrdiff
 getMethodEntry signal_from methodtable = do
@@ -71,8 +77,12 @@ getMethodEntry signal_from methodtable = do
                 let scm = toString cm; smethod = toString method
                 if scm == "jmate/lang/MateRuntime" then do
                   case smethod of
-                    "demoInterfaceCall" ->
-                       return . funPtrToAddr $ demoInterfaceCallAddr
+                    "loadLibrary" ->
+                       return . funPtrToAddr $ loadLibraryAddr
+                    "printGCStats" ->
+                       return . funPtrToAddr $ printGCStatsAddr
+                    "printMemoryUsage" ->
+                       return . funPtrToAddr $ printMemoryUsageAddr
                     _ ->
                        error $ "native-call: " ++ smethod ++ " not found."
                 else do