configure.ac: Added AC_CHECK_ENABLE_OPAGENT.
[cacao.git] / src / vmcore / options.c
index 47981338a37242ddc3529a4299cbb2b41ee20841..641dd47a2306a7976372be4ca26305c6667328b5 100644 (file)
@@ -113,6 +113,9 @@ bool opt_prof    = false;
 bool opt_prof_bb = false;
 #endif
 
+#if defined(ENABLE_OPAGENT)
+bool opt_opagent = false;
+#endif
 
 /* optimization options *******************************************************/
 
@@ -175,6 +178,9 @@ int      opt_DebugThreads                 = 0;
 #if defined(ENABLE_DISASSEMBLER)
 int      opt_DisassembleStubs             = 0;
 #endif
+#if defined(ENABLE_OPAGENT)
+int      opt_EnableOpagent                = 0;
+#endif
 #if defined(ENABLE_GC_CACAO)
 int      opt_GCDebugRootSet               = 0;
 int      opt_GCStress                     = 0;
@@ -240,6 +246,7 @@ enum {
        OPT_DebugStackTrace,
        OPT_DebugThreads,
        OPT_DisassembleStubs,
+       OPT_EnableOpagent,
        OPT_GCDebugRootSet,
        OPT_GCStress,
        OPT_Inline,
@@ -294,6 +301,9 @@ option_t options_XX[] = {
 #if defined(ENABLE_DISASSEMBLER)
        { "DisassembleStubs",             OPT_DisassembleStubs,             OPT_TYPE_BOOLEAN, "disassemble builtin and native stubs when generated" },
 #endif
+#if defined(ENABLE_OPAGENT)
+       { "EnableOpagent",                OPT_EnableOpagent,                OPT_TYPE_BOOLEAN, "enable providing JIT output to Oprofile" },
+#endif
 #if defined(ENABLE_GC_CACAO)
        { "GCDebugRootSet",               OPT_GCDebugRootSet,               OPT_TYPE_BOOLEAN, "GC: print root-set at collection" },
        { "GCStress",                     OPT_GCStress,                     OPT_TYPE_BOOLEAN, "GC: forced collection at every allocation" },
@@ -656,6 +666,12 @@ void options_xx(JavaVMInitArgs *vm_args)
                        break;
 #endif
 
+#if defined(ENABLE_OPAGENT)
+               case OPT_EnableOpagent:
+                       opt_EnableOpagent = enable;
+                       break;
+#endif
+
 #if defined(ENABLE_GC_CACAO)
                case OPT_GCDebugRootSet:
                        opt_GCDebugRootSet = enable;