MethodPool: removed demo call stuff - added printGCStats instead;
[mate.git] / Mate / MethodPool.hs
index da3e5e055808de09698423cc8173a4d3929178aa..79b63e3ca2d9ec768221830cd14d0b926eaf6b48 100644 (file)
@@ -32,17 +32,20 @@ import Mate.NativeMachine
 import Mate.ClassPool
 import Mate.Debug
 import Mate.Utilities
-import Mate.GarbageAlloc
+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
   mmap <- getMethodMap
@@ -74,8 +77,10 @@ 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
                     _ ->