* src/vm/jit/jit.cpp: Use C++ interface of OprofileAgent.
authorRobert Schuster <robertschuster@fsfe.org>
Sat, 20 Sep 2008 00:56:45 +0000 (02:56 +0200)
committerRobert Schuster <robertschuster@fsfe.org>
Sat, 20 Sep 2008 00:56:45 +0000 (02:56 +0200)
 * src/vm/jit/oprofile-agent.hpp: Remove C interface.
 * src/vm/jit/oprofile-agent.cpp: Remove C implementation.

src/vm/jit/jit.cpp
src/vm/jit/oprofile-agent.cpp
src/vm/jit/oprofile-agent.hpp

index 3921fbab1328ff393b175f742a103b9d0a31287c..b889cd59ca5d84a701e9918505f92b7631f164dd 100644 (file)
@@ -176,7 +176,7 @@ void jit_init(void)
 
 #if defined(ENABLE_OPAGENT)
        if (opt_EnableOpagent)
-               OprofileAgent_initialize();
+               OprofileAgent::initialize();
 #endif
 }
 
@@ -191,7 +191,7 @@ void jit_close(void)
 {
 #if defined(ENABLE_OPAGENT)
        if (opt_EnableOpagent)
-               OprofileAgent_close();
+               OprofileAgent::close();
 #endif
 }
 
@@ -411,7 +411,7 @@ u1 *jit_compile(methodinfo *m)
 
 #if defined(ENABLE_OPAGENT)
        if (opt_EnableOpagent)
-               OprofileAgent_newmethod(m);
+               OprofileAgent::newmethod(m);
 #endif
 
        /* leave the monitor */
@@ -522,7 +522,7 @@ u1 *jit_recompile(methodinfo *m)
 
 #if defined(ENABLE_OPAGENT)
        if (opt_EnableOpagent)
-               OprofileAgent_newmethod(m);
+               OprofileAgent::newmethod(m);
 #endif
 
        DEBUG_JIT_COMPILEVERBOSE("Recompiling done: ");
index cce16b84d7550c6ad30adf6ca228f1cae8485bde..36e97a77f99a7bcfd8723c4b88a97690fe8309d7 100644 (file)
@@ -22,7 +22,6 @@
 
 */
 
-
 #include "config.h"
 
 #include "mm/memory.h"
@@ -94,15 +93,6 @@ void OprofileAgent::close()
 
        _handle = 0;
 }
-/* Legacy C interface *********************************************************/
-
-extern "C" {
-
-void OprofileAgent_initialize() { OprofileAgent::initialize(); }
-void OprofileAgent_newmethod(methodinfo *m) { OprofileAgent::newmethod(m); }
-void OprofileAgent_close() { OprofileAgent::close(); }
-
-}
 
 /*
  * These are local overrides for various environment variables in Emacs.
index 9b8cbdb5d2d9dcfcb5e09c8d2be4e8f980e9fd0e..14bc54968ca41958a206f86673049a1aef5c90d4 100644 (file)
 
 #include "config.h"
 
-#ifdef __cplusplus
 extern "C" {
-#endif
 
 #include "vm/method.h"
-
 #include <opagent.h>
 
-#ifdef __cplusplus
 }
-#endif
-
-#ifdef __cplusplus
 
 class OprofileAgent
 {
@@ -54,18 +47,6 @@ public:
        static void close();
 };
 
-#else
-
-/* Legacy C interface *********************************************************/
-
-typedef struct OprofileAgent OprofileAgent;
-
-void  OprofileAgent_initialize(void);
-void  OprofileAgent_newmethod(methodinfo *);
-void  OprofileAgent_close();
-
-#endif
-
 #endif /* _OPROFILE_AGENT_HPP */