* src/threads/posix/thread-posix.cpp: Eliminated some easy-to-fix or pointless compil...
[cacao.git] / src / vm / options.c
index 5a6f5c29f89afa645dff5dcab7b1016e15b1cebc..f503ce6829c78cd958d273a3a8c10b98e7b06267 100644 (file)
@@ -1,6 +1,6 @@
 /* src/vm/options.c - contains global options
 
-   Copyright (C) 1996-2005, 2006, 2007, 2008
+   Copyright (C) 1996-2005, 2006, 2007, 2008, 2010
    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
@@ -207,9 +207,13 @@ int      opt_TraceHPI                     = 0;
 int      opt_TraceInlining                = 0;
 #endif
 int      opt_TraceJavaCalls               = 0;
+bool     opt_TraceJMMCalls                = false;
 int      opt_TraceJNICalls                = 0;
 int      opt_TraceJVMCalls                = 0;
 int      opt_TraceJVMCallsVerbose         = 0;
+#if defined(ENABLE_JVMTI)
+int      opt_TraceJVMTICalls              = 0;
+#endif
 int      opt_TraceLinkClass               = 0;
 #if defined(ENABLE_REPLACEMENT)
 int      opt_TraceReplacement             = 0;
@@ -271,9 +275,11 @@ enum {
        OPT_TraceHPI,
        OPT_TraceInlining,
        OPT_TraceJavaCalls,
+       OPT_TraceJMMCalls,
        OPT_TraceJNICalls,
        OPT_TraceJVMCalls,
        OPT_TraceJVMCallsVerbose,
+       OPT_TraceJVMTICalls,
        OPT_TraceLinkClass,
        OPT_TraceReplacement,
        OPT_TraceSubsystemInitialization,
@@ -348,9 +354,13 @@ option_t options_XX[] = {
 #if !defined(ENABLE_VMLOG)
        { "TraceJavaCalls",               OPT_TraceJavaCalls,               OPT_TYPE_BOOLEAN, "trace Java method calls" },
 #endif
+       { "TraceJMMCalls",                OPT_TraceJMMCalls,                OPT_TYPE_BOOLEAN, "trace JMM method calls" },
        { "TraceJNICalls",                OPT_TraceJNICalls,                OPT_TYPE_BOOLEAN, "trace JNI method calls" },
        { "TraceJVMCalls",                OPT_TraceJVMCalls,                OPT_TYPE_BOOLEAN, "trace JVM method calls but omit very frequent ones" },
        { "TraceJVMCallsVerbose",         OPT_TraceJVMCallsVerbose,         OPT_TYPE_BOOLEAN, "trace all JVM method calls" },
+#if defined(ENABLE_JVMTI)
+       { "TraceJVMTICalls",              OPT_TraceJVMTICalls,              OPT_TYPE_BOOLEAN, "trace JVMTI method calls" },
+#endif
        { "TraceLinkClass",               OPT_TraceLinkClass,               OPT_TYPE_BOOLEAN, "trace class linking" },
 #if defined(ENABLE_REPLACEMENT)
        { "TraceReplacement",             OPT_TraceReplacement,             OPT_TYPE_VALUE,   "trace on-stack replacement with the given verbosity level (default: 1)" },
@@ -784,7 +794,7 @@ void options_xx(JavaVMInitArgs *vm_args)
                        file = fopen(filename, "w");
 
                        if (file == NULL)
-#warning Use below method instead!
+                               /* FIXME Use below method instead! */
                                //os::abort_errno("options_xx: fopen failed");
                                vm_abort("options_xx: fopen failed");
 
@@ -831,6 +841,10 @@ void options_xx(JavaVMInitArgs *vm_args)
                        opt_TraceJavaCalls = enable;
                        break;
 
+               case OPT_TraceJMMCalls:
+                       opt_TraceJMMCalls = enable;
+                       break;
+
                case OPT_TraceJNICalls:
                        opt_TraceJNICalls = enable;
                        break;
@@ -843,6 +857,12 @@ void options_xx(JavaVMInitArgs *vm_args)
                        opt_TraceJVMCallsVerbose = enable;
                        break;
 
+#if defined(ENABLE_JVMTI)
+               case OPT_TraceJVMTICalls:
+                       opt_TraceJVMTICalls = enable;
+                       break;
+#endif
+
                case OPT_TraceLinkClass:
                        opt_TraceLinkClass = enable;
                        break;