Merged revisions 7797-7917 via svnmerge from
[cacao.git] / src / vm / vm.c
index 1375634ef8e5227f0035e77bdc892d2485d44f23..00abe045ef45aa17a1d9dd828861d9a142739e28 100644 (file)
@@ -48,9 +48,7 @@
 #include "native/include/java_lang_String.h" /* required by java_lang_Class.h */
 #include "native/include/java_lang_Class.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/threads.h"
-#endif
+#include "threads/threads-common.h"
 
 #include "toolbox/logging.h"
 
@@ -489,7 +487,7 @@ static void XXusage(void)
 {
        puts("    -v                       write state-information");
 #if !defined(NDEBUG)
-       puts("    -verbose[:call|exception|jit|memory]");
+       puts("    -verbose[:call|exception|jit|memory|threads]");
        puts("                             enable specific verbose output");
        puts("    -debug-color             colored output for ANSI terms");
 #endif
@@ -1122,12 +1120,16 @@ bool vm_create(JavaVMInitArgs *vm_args)
                                opt_stat = true;
 # endif
                        }
+                       else if (strcmp("threads", opt_arg) == 0) {
+                               opt_verbosethreads = true;
+                       }
+#endif
                        else {
                                printf("Unknown -verbose option: %s\n", opt_arg);
                                usage();
                        }
-#endif
                        break;
+
                case OPT_DEBUGCOLOR:
                        opt_debugcolor = true;
                        break;