harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r506992 [2/2] - in /harmony/enhanced: classlib/trunk/modules/portlib/src/main/native/include/shared/ classlib/trunk/modules/portlib/src/main/native/port/shared/ classlib/trunk/modules/portlib/src/main/native/port/unix/ classlib/trunk/module...
Date Tue, 13 Feb 2007 13:15:42 GMT
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp Tue Feb 13 05:15:34 2007
@@ -66,10 +66,10 @@
 //------ End DYNOPT support ----------------------------------------
 
 #define EXECUTABLE_NAME "java"
-#define USE_JAVA_HELP "\nUse " EXECUTABLE_NAME " -help to get help on" \
-    " command line options"
-
-
+#define USE_JAVA_HELP LECHO(29, "Use {0} -help to get help on command line options" << EXECUTABLE_NAME)
+#define LECHO_VERSION LECHO(32, VERSION << VERSION_SVN_TAG << __DATE__ << VERSION_OS \
+        << VERSION_ARCH << VERSION_COMPILER << VERSION_DEBUG_STRING)
+#define LECHO_VM_VERSION LECHO(33, VM_VERSION)
 extern bool dump_stubs;
 extern bool parallel_jit;
 extern const char * dump_file_name;
@@ -88,15 +88,15 @@
 
 void print_generic_help()
 {
-    ECHO("Usage: " EXECUTABLE_NAME " [-options] class [args...]\n"
+    LECHO(21, "Usage: {0} [-options] class [args...]\n"
         "        (to execute a method main() of the class)\n"
-        "    or " EXECUTABLE_NAME " [-options] -jar jarfile [args...]\n"
+        "    or {0} [-options] -jar jarfile [args...]\n"
         "        (to execute the jar file)\n"
         "\n"
         "where options include:\n"
         "    -classpath <class search path of directories and zip/jar files>\n"
         "    -cp        <class search path of directories and zip/jar files>\n"
-        "                  A " PORT_PATH_SEPARATOR_STR " separated list of directories, jar archives,\n"
+        "                  A {1} separated list of directories, jar archives,\n"
         "                  and zip archives to search for class file\n"
         "    -D<name>=<value>\n"
         "                  set a system property\n"
@@ -125,31 +125,13 @@
         "    -? -help      print this help message\n"
         "    -help properties\n"
         "                  help on system properties\n"
-        "    -X            print help on non-standard options");
+        "    -X            print help on non-standard options" 
+        <<  EXECUTABLE_NAME << PORT_PATH_SEPARATOR_STR);
 }
 
 static void print_help_on_nonstandard_options()
 {
-#ifdef _DEBUG
-#    define DEBUG_OPTIONS_HELP \
-    "    -Xlog[:<category>[:<file>]\n" \
-    "              Switch debug logging on [for specified category only\n" \
-    "              [and log that category to a file]]\n" \
-    "    -Xtrace[:<category>[:<file>]\n" \
-    "              Switch trace logging on [for specified category only\n" \
-    "              [and log that category to a file]]\n"
-#else
-#    define DEBUG_OPTIONS_HELP
-#endif //_DEBUG
-#ifdef VM_STATS
-#    define STATS_OPTIONS_HELP \
-    "    -Xstats:<mask>\n" \
-    "              Generates different statistics\n"
-#else
-#    define STATS_OPTIONS_HELP
-#endif // VM_STATS
-
-    ECHO("    -Xbootclasspath:<PATH>\n"
+    LECHO(22, "    -Xbootclasspath:<PATH>\n"
         "              Set bootclasspath to the specified value\n"
         "    -Xbootclasspath/a:<PATH>\n"
         "              Append specified directories and files to bootclasspath\n"
@@ -190,10 +172,21 @@
         "    -Xtimestamp\n"
         "              Add timestamp to logging messages\n"
         "    -Xfunction\n"
-        "              Add function signature to logging messages\n"
-        DEBUG_OPTIONS_HELP
-        STATS_OPTIONS_HELP
-        "    -Xint\n"
+        "              Add function signature to logging messages");
+#ifdef _DEBUG
+    LECHO(23, "    -Xlog[:<category>[:<file>]\n"
+        "              Switch debug logging on [for specified category only\n"
+        "              [and log that category to a file]]\n"
+        "    -Xtrace[:<category>[:<file>]\n"
+        "              Switch trace logging on [for specified category only\n"
+        "              [and log that category to a file]]");
+#endif //_DEBUG
+
+#ifdef VM_STATS
+    LECHO(24, "    -Xstats:<mask>\n"
+    "              Generates different statistics");
+#endif // VM_STATS
+    LECHO(25, "    -Xint\n"
         "              Use interpreter to execute the program\n"
         "    -Xgc:<gc options>\n"
         "              Specify gc specific options\n"
@@ -208,24 +201,19 @@
         "    -Xdumpfile:<file>\n"
         "              Specifies a file name for the dump\n"
         "    -XD<name>=<value>\n"
-        "              set an internal system property\n");
+        "              set an internal system property");
 } //print_help_on_nonstandard_options
 
 void print_vm_standard_properties()
 {
+    LECHO(26, "Boolean-valued properties (set to one of {on,true,1,off,false,0} through -XD<name>=<value>):\n\n"
+        "    vm.assert_dialog (default TRUE):\n"
+        "            If false, prevent assertion failures from popping up a dialog box.");
 #ifdef PLATFORM_POSIX
-#    define PLATFORM_POSIX_STANDARD_PROPERTIES \
-            "    vm.crash_handler (default FALSE):\n" \
-            "            Invoke gdb on crashes.\n"
-#else
-#    define PLATFORM_POSIX_STANDARD_PROPERTIES
+    LECHO(27, "    vm.crash_handler (default FALSE):\n"
+        "            Invoke gdb on crashes.");
 #endif // PLATFORM_POSIX
-
-    ECHO("Boolean-valued properties (set to one of {on,true,1,off,false,0} through -XD<name>=<value>):\n\n"
-        "    vm.assert_dialog (default TRUE):\n"
-        "            If false, prevent assertion failures from popping up a dialog box.\n"
-        PLATFORM_POSIX_STANDARD_PROPERTIES
-        "    vm.finalize (default TRUE):\n"
+    LECHO(28, "    vm.finalize (default TRUE):\n"
         "            Run finalizers.\n"
         "    vm.jit_may_inline_sync (default TRUE):\n"
         "            The JIT is allowed to inline part of the synchronization sequence.\n"
@@ -243,15 +231,15 @@
         "    vm.boot.class.path:\n"
         "            Virtual machine bootclasspath.\n"
         "    vm.dlls:\n"
-        "            A \'" PORT_PATH_SEPARATOR_STR "\'-delimited list of modular dlls (GC/etc.) to load at startup.\n"
+        "            A '{0}'-delimited list of modular dlls (GC/etc.) to load at startup.\n"
         "    vm.em_dll:\n"
-        "            A \'" PORT_PATH_SEPARATOR_STR "\'-execution manager (EM) dll to load at startup.\n"
+        "            A '{0}'-execution manager (EM) dll to load at startup.\n"
         "    vm.other_natives_dlls:\n"
-        "            A \'" PORT_PATH_SEPARATOR_STR "\'-delimited list of dlls contained native methods implementations to load at startup.\n"
+        "            A '{0}'-delimited list of dlls contained native methods implementations to load at startup.\n"
         "    vm.components.<component>.classpath:\n" 
         "            Part of a <component>'s classpath to append to the JDK bootclasspath\n"
         "    vm.components.<component>.startupclass:\n"
-        "            A <component> class to be initialized during startup\n");
+        "            A <component> class to be initialized during startup" << PORT_PATH_SEPARATOR_STR);
 
 }
 
@@ -268,7 +256,8 @@
     if ('\0' == arg[0]) {
         get_assert_reg(p_env)->enable_all = value ? ASRT_ENABLED : ASRT_DISABLED;
     } else if (':' != arg[0]) {
-        ECHO("Unknown option " << option << USE_JAVA_HELP);
+        LECHO(30, "Unknown option {0}" << option);
+        USE_JAVA_HELP;
         LOGGER_EXIT(1);
     } else {
         unsigned len = strlen(++arg);
@@ -280,6 +269,16 @@
     }
 }
 
+void* get_portlib_for_logger(Global_Env *p_env) {
+    for (int i = 0; i < p_env->vm_arguments.nOptions; i++) {
+        const char* option = p_env->vm_arguments.options[i].optionString;
+        if (strcmp(option, "_org.apache.harmony.vmi.portlib") == 0) {
+            return p_env->vm_arguments.options[i].extraInfo;
+        }
+    }
+    return NULL;
+}
+
 void parse_vm_arguments(Global_Env *p_env)
 {
     bool version_printed = false;
@@ -364,7 +363,7 @@
                 print_vm_standard_properties();
 
             } else {
-                ECHO("Unknown argument " << arg << " of -Xhelp: option");
+                LECHO(31, "Unknown argument {0} of -Xhelp: option" << arg);
             }
 
             LOGGER_EXIT(0);
@@ -380,17 +379,17 @@
 #endif
         } else if (strcmp(option, "-version") == 0) {
             // Print the version number and exit
-            ECHO(VERSION);
+            LECHO_VERSION;
             LOGGER_EXIT(0);
         } else if (strcmp(option, "-showversion") == 0) {
             if (!version_printed) {
                 // Print the version number and continue
-                ECHO(VERSION);
+                LECHO_VERSION;
                 version_printed = true;
             }
         } else if (strcmp(option, "-fullversion") == 0) {
             // Print the version number and exit
-            ECHO(VM_VERSION);
+            LECHO_VM_VERSION;
             LOGGER_EXIT(0);
 
         } else if (begins_with(option, "-Xgc:")) {
@@ -410,7 +409,7 @@
             const char* arg = option + 4;
             TRACE2("init", "gc.ms = " << arg);
             if (atoi(arg) == 0) {
-                ECHO("Negative or invalid heap size. Default value will be used!");
+                LECHO(34, "Negative or invalid heap size. Default value will be used!");
             }
             p_env->VmProperties()->set("gc.ms", arg);
 
@@ -419,7 +418,7 @@
             const char* arg = option + 4;
             TRACE2("init", "gc.mx = " << arg);
             if (atoi(arg) == 0) {
-                ECHO("Negative or invalid heap size. Default value will be used!");
+                LECHO(34, "Negative or invalid heap size. Default value will be used!");
             }
             p_env->VmProperties()->set("gc.mx", arg);
         }
@@ -540,7 +539,8 @@
         }
 
         else {
-            ECHO("Unknown option " << option << USE_JAVA_HELP);
+            LECHO(30, "Unknown option {0}" << option);
+            USE_JAVA_HELP;
             LOGGER_EXIT(1);
        }
     } // for
@@ -620,7 +620,8 @@
             *out = ':';
         }
     } else {
-        ECHO("Unknown option " << arg << USE_JAVA_HELP);
+        LECHO(30, "Unknown option {0}" << arg);
+        USE_JAVA_HELP;
         LOGGER_EXIT(1); 
     }
 }
@@ -666,7 +667,8 @@
                 next_sym++;
                 set_threshold_list(next_sym, INFO, NULL, true); // true = convert standard categories to internal
             } else {
-                ECHO("Unknown option " << option << USE_JAVA_HELP);
+                LECHO(30, "Unknown option {0}" << option);
+                USE_JAVA_HELP;
                 LOGGER_EXIT(1);
             }
         } else if (begins_with(option, "-Xverboseconf:")) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/properties.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/properties.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/properties.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/properties.cpp Tue Feb 13 05:15:34 2007
@@ -35,12 +35,12 @@
 Properties::Properties() 
 {
     if (APR_SUCCESS != apr_pool_create(&local_ht_pool, NULL)) {
-        DIE("Cannot initialize properties pool");
+        LDIE(9, "Cannot initialize properties pool");
     }
     hashtables_array = apr_hash_make(local_ht_pool);
     rwlock_array = NULL;
     if (APR_SUCCESS != apr_thread_rwlock_create(&rwlock_array, local_ht_pool)) {
-        DIE("Cannot initialize properties table mutex");
+        LDIE(10, "Cannot initialize properties table mutex");
     }
 }
 
@@ -49,7 +49,7 @@
     TRACE("set property " << key << " = " << value);
 
     if (APR_SUCCESS != apr_thread_rwlock_wrlock(rwlock_array)) {
-        DIE("Cannot lock properties table");
+        LDIE(11, "Cannot lock properties table");
     }
     PropValue* val = (PropValue*) apr_hash_get(hashtables_array, (const void*) key, APR_HASH_KEY_STRING);
     apr_hash_set(hashtables_array, (const void*) strdup(key), APR_HASH_KEY_STRING, (const void*) new PropValue(value));
@@ -57,21 +57,21 @@
         delete(val);
     }
     if (APR_SUCCESS != apr_thread_rwlock_unlock(rwlock_array)) {
-        DIE("Cannot unlock properties table");
+        LDIE(12, "Cannot unlock properties table");
     }
 }
 
 char* Properties::get(const char * key) {
     char* return_value= NULL;
     if (APR_SUCCESS != apr_thread_rwlock_rdlock(rwlock_array)) {
-        DIE("Cannot lock properties table");
+        LDIE(11, "Cannot lock properties table");
     }
     PropValue* val = (PropValue*) apr_hash_get(hashtables_array, (const void*) key, APR_HASH_KEY_STRING);
     if (val != NULL) {
         return_value = strdup(val->value);
     }
     if (APR_SUCCESS != apr_thread_rwlock_unlock(rwlock_array)) {
-        DIE("Cannot unlock properties table");
+        LDIE(12, "Cannot unlock properties table");
     }
     return return_value;
 }
@@ -92,7 +92,7 @@
     apr_hash_index_t* hi;
     const void* deleted_key;
     if (APR_SUCCESS != apr_thread_rwlock_wrlock(rwlock_array)) {
-        DIE("Cannot lock properties table");
+        LDIE(11, "Cannot lock properties table");
     }
     PropValue* val = (PropValue*) apr_hash_get(hashtables_array, (const void*) key, APR_HASH_KEY_STRING);
     if (val != NULL) {
@@ -108,7 +108,7 @@
         delete(val);
     }
     if (APR_SUCCESS != apr_thread_rwlock_unlock(rwlock_array)) {
-        DIE("Cannot unlock properties table");
+        LDIE(12, "Cannot unlock properties table");
     }
 }
 
@@ -118,7 +118,7 @@
     const void* key;
 
     if (APR_SUCCESS != apr_thread_rwlock_rdlock(rwlock_array)) {
-        DIE("Cannot lock properties table");
+        LDIE(11, "Cannot lock properties table");
     }
     for (hi = apr_hash_first(local_ht_pool, hashtables_array); hi; hi = apr_hash_next(hi)) {
         properties_count++;
@@ -131,7 +131,7 @@
     }
     return_value[properties_count] = NULL;
     if (APR_SUCCESS != apr_thread_rwlock_unlock(rwlock_array)) {
-        DIE("Cannot unlock properties table");
+        LDIE(12, "Cannot unlock properties table");
     }
     return return_value;
 }
@@ -142,7 +142,7 @@
     const void* key;
 
     if (APR_SUCCESS != apr_thread_rwlock_rdlock(rwlock_array)) {
-        DIE("Cannot lock properties table");
+        LDIE(11, "Cannot lock properties table");
     }
     for (hi = apr_hash_first(local_ht_pool, hashtables_array); hi; hi = apr_hash_next(hi)) {
         apr_hash_this(hi, &key, NULL, NULL);
@@ -159,7 +159,7 @@
     }
     return_value[properties_count] = NULL;
     if (APR_SUCCESS != apr_thread_rwlock_unlock(rwlock_array)) {
-        DIE("Cannot unlock properties table");
+        LDIE(12, "Cannot unlock properties table");
     }
     return return_value;
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp Tue Feb 13 05:15:34 2007
@@ -128,20 +128,20 @@
     status = CmLoadComponent(dll, "EmInitialize");
     vm_env->VmProperties()->destroy(dll);
     if (status != JNI_OK) {
-        WARN("Cannot load EM component from " << dll);
+        LWARN(13, "Cannot load EM component from {0}" << dll);
         return status;
     }
     
     status = vm_env->cm->CreateInstance(&(vm_env->em_instance), "em");
     if (status != JNI_OK) {
-        WARN("Cannot instantiate EM");
+        LWARN(14, "Cannot instantiate EM");
         return status;
     }
 
     status = vm_env->em_instance->intf->GetInterface(
         (OpenInterfaceHandle*) &(vm_env->em_interface), OPEN_INTF_EM_VM);
     if (status != JNI_OK) {
-        WARN("Cannot get EM_VM interface");
+        LWARN(15, "Cannot get EM_VM interface");
         return status;
     }
 
@@ -166,7 +166,7 @@
             goto next_dll;
         }
 #endif
-        WARN("Mandatory library cannot be loaded: " << tok);
+        LWARN(16, "Mandatory library cannot be loaded: {0}" << tok);
         status = JNI_ERR;
         break;
 next_dll:
@@ -212,7 +212,7 @@
     Boolean gc_compression = gc_supports_compressed_references();
     if (vm_compression) {
         if (!gc_compression) {
-            WARN("VM component mismatch: the VM compresses references but the GC doesn't.");
+            LWARN(17, "VM component mismatch: the VM compresses references but the GC doesn't.");
             return JNI_ERR;
         }
         
@@ -222,20 +222,20 @@
         if (!interpreter_enabled()) {
             Boolean jit_compression = (*jit)->supports_compressed_references();
             if (!jit_compression) {
-                WARN("VM component mismatch: the VM compresses references but a JIT doesn't");
+                LWARN(18, "VM component mismatch: the VM compresses references but a JIT doesn't");
                 return JNI_ERR;
             }
         }
     } else {
         if (gc_compression) {
-            WARN("VM component mismatch: the VM doesn't compress references but the GC does.");
+            LWARN(19, "VM component mismatch: the VM doesn't compress references but the GC does.");
             return JNI_ERR;
         }
         JIT **jit = &jit_compilers[0];
         if (!interpreter_enabled()) {
             Boolean jit_compression = (*jit)->supports_compressed_references();
             if (jit_compression) {
-                WARN("VM component mismatch: the VM doesn't compress references but a JIT does");
+                LWARN(20, "VM component mismatch: the VM doesn't compress references but a JIT does");
                 return JNI_ERR;
             }
         }
@@ -261,7 +261,7 @@
         char error_message[1024];
         natives_describe_error(loading_status, error_message, sizeof(error_message));
 
-        WARN("Failed to initialize JNI NIO support: " << error_message);
+        LWARN(21, "Failed to initialize JNI NIO support: {0}" << error_message);
         return JNI_ERR;
     }
     
@@ -286,7 +286,7 @@
     } 
     else 
     {
-        WARN("Failed to import JNI NIO functions.");
+        LWARN(22, "Failed to import JNI NIO functions.");
         return JNI_ERR;
     }
 }
@@ -452,9 +452,9 @@
     return JNI_OK;
 }
 
-#define PROCESS_EXCEPTION(message) \
+#define PROCESS_EXCEPTION(messageId, message) \
 { \
-    ECHO("Internal error: " << message); \
+    LECHO(messageId, message << "Internal error: "); \
 \
     if (jni_env->ExceptionCheck()== JNI_TRUE) \
     { \
@@ -473,17 +473,17 @@
 
     jclass start_class = jni_env->FindClass("java/lang/VMStart");
     if (jni_env->ExceptionCheck()== JNI_TRUE || start_class == NULL) {
-        PROCESS_EXCEPTION("can't find starter class: java.lang.VMStart.");
+        PROCESS_EXCEPTION(35, "{0}can't find starter class: java.lang.VMStart.");
     }
 
     jmethodID init_method = jni_env->GetStaticMethodID(start_class, "initialize", "()V");
     if (jni_env->ExceptionCheck()== JNI_TRUE || init_method == NULL) {
-        PROCESS_EXCEPTION("can't find java.lang.VMStart.initialize() method.");
+        PROCESS_EXCEPTION(36, "{0}can't find java.lang.VMStart.initialize() method.");
     }
 
     jni_env->CallStaticVoidMethod(start_class, init_method);
     if (jni_env->ExceptionCheck()== JNI_TRUE) {
-        PROCESS_EXCEPTION("java.lang.VMStart.initialize() method completed with an exception.");
+        PROCESS_EXCEPTION(37, "{0}java.lang.VMStart.initialize() method completed with an exception.");
     }
     return JNI_OK;
 }
@@ -634,14 +634,14 @@
     initialize_vm_cmd_state(vm_env, vm_arguments);
 
     // Initialize logging system as soon as possible.
-    init_log_system();
+    init_log_system(get_portlib_for_logger(vm_env));
     set_log_levels_from_cmd(&vm_env->vm_arguments);
 
     vm_monitor_init();
 
     status = CmAcquire(&vm_env->cm);
     if (status != JNI_OK) {
-        WARN("Failed to initialize a \"Component Manager\".");
+        LWARN(23, "Failed to initialize a \"Component Manager\".");
         return status; 
     }
 
@@ -707,7 +707,7 @@
     // "Tool Interface" initialization
     status = vm_env->TI->Init(java_vm);
     if (status != JNI_OK) {
-        WARN("Failed to initialize JVMTI.");
+        LWARN(24, "Failed to initialize JVMTI.");
         return status;
     }
 
@@ -769,7 +769,7 @@
     extern int resolve_const_pool(Global_Env& env, Class *clss);
     status = resolve_const_pool(*vm_env, vm_env->java_lang_Throwable_Class);
     if(status != 0) {
-        WARN("Failed to resolve class java/lang/Throwable");
+        LWARN(25, "Failed to resolve class {0}" << "java/lang/Throwable");
         return JNI_ERR;
     }
 
@@ -837,7 +837,7 @@
     err = WSAStartup(wVersionRequested, &wsaData);
     if (err != 0) {
         // Tell the user that we could not find a usable WinSock DLL.                                      
-        WARN("Couldn't startup Winsock 2.0 dll ");
+        LWARN(26, "Couldn't startup Winsock 2.0 dll");
     }
 #endif
 
@@ -848,7 +848,7 @@
     TRACE2("init", "initializing system class loader");
     status = initialize_system_class_loader(jni_env);
     if (status != JNI_OK) {
-        WARN("Failed to initialize system class loader.");
+        LWARN(27, "Failed to initialize system class loader.");
         if(exn_raised()) {
             print_uncaught_exception_message(stderr,
                 "system class loader initialization", exn_get());

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp Tue Feb 13 05:15:34 2007
@@ -114,18 +114,18 @@
     // java.home to the parent directory.
     char *base_path_buf;
     if (port_executable_name(&base_path_buf, prop_pool) != APR_SUCCESS) {
-        DIE("Failed to find executable location");
+        LDIE(13, "Failed to find executable location");
     }
     // directory for the executable
     char *p = strrchr(base_path_buf, PORT_FILE_SEPARATOR);
     if (NULL == p)
-        DIE("Failed to determine executable parent directory");
+        LDIE(14, "Failed to determine executable parent directory");
     *p = '\0';
     // home directory
     char* home_path = apr_pstrdup(prop_pool, base_path_buf);
     p = strrchr(home_path, PORT_FILE_SEPARATOR);
     if (NULL == p)
-        DIE("Failed to determine java home directory");
+        LDIE(15, "Failed to determine java home directory");
     *p = '\0';
 
     properties.set("java.home", home_path);
@@ -165,14 +165,14 @@
     char *user_buf;
     apr_status_t status = port_user_name(&user_buf, prop_pool);
     if (APR_SUCCESS != status) {
-        DIE("Failed to get user name from the system. Error code " << status);
+        LDIE(16, "Failed to get user name from the system. Error code {0}" << status);
     }
     properties.set("user.name", user_buf);
     // user.home initialization, try to get home from the system.
     char *user_home;
     status = port_user_home(&user_home, prop_pool);
     if (APR_SUCCESS != status) {
-        DIE("Failed to get user home from the system. Error code " << status);
+        LDIE(17, "Failed to get user home from the system. Error code {0}" << status);
     }
     properties.set("user.home", user_home);
     // java.io.tmpdir initialization. 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp Tue Feb 13 05:15:34 2007
@@ -40,9 +40,9 @@
 #define LOG_DOMAIN "vm.core.shutdown"
 #include "cxxlog.h"
 
-#define PROCESS_EXCEPTION(message) \
+#define PROCESS_EXCEPTION(messageId, message) \
 { \
-    ECHO("Internal error: " << message); \
+    LECHO(messageId, message << "Internal error: "); \
 \
     if (jni_env->ExceptionCheck()== JNI_TRUE) \
     { \
@@ -67,18 +67,18 @@
     system_class = jni_env->FindClass("java/lang/System");
     if (jni_env->ExceptionCheck() == JNI_TRUE || system_class == NULL) {
         // This is debug message only. May appear when VM is already in shutdown stage.
-        PROCESS_EXCEPTION("can't find java.lang.System class.");
+        PROCESS_EXCEPTION(38, "{0}can't find java.lang.System class.");
     }
     
     shutdown_method = jni_env->GetStaticMethodID(system_class, "execShutdownSequence", "()V");
     if (jni_env->ExceptionCheck() == JNI_TRUE || shutdown_method == NULL) {
-        PROCESS_EXCEPTION("can't find java.lang.System.execShutdownSequence() method.");
+        PROCESS_EXCEPTION(39, "{0}can't find java.lang.System.execShutdownSequence() method.");
     }
 
     jni_env->CallStaticVoidMethod(system_class, shutdown_method);
 
     if (jni_env->ExceptionCheck() == JNI_TRUE) {
-        PROCESS_EXCEPTION("java.lang.System.execShutdownSequence() method completed with an exception.");
+        PROCESS_EXCEPTION(40, "{0}java.lang.System.execShutdownSequence() method completed with an exception.");
     }
     return JNI_OK;
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/dll_jit.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/dll_jit.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/dll_jit.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/dll_jit.cpp Tue Feb 13 05:15:34 2007
@@ -65,7 +65,7 @@
     apr_dso_handle_t *handle;
     if ((stat = apr_dso_load(&handle, dll_filename, pool)) != APR_SUCCESS)
     {
-        WARN("Failure to open JIT dll " << dll_filename << stat);
+        LWARN(28, "Failure to open JIT dll {0} {1}" << dll_filename << stat);
         printf("apr code: %s\n", apr_dso_error(handle, buf, 1024));
         return;
     }
@@ -76,7 +76,7 @@
 
 #define GET_FUNCTION(fn, handle, name) \
     if (apr_dso_sym(&fn, handle, name) != APR_SUCCESS) {\
-    WARN("Couldn't load dll " << dll_filename << ": missing entry point " << name); \
+    LWARN(29, "Couldn't load dll {0}: missing entry point {1}" << dll_filename << name); \
     return; \
     }
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp Tue Feb 13 05:15:34 2007
@@ -2153,7 +2153,7 @@
     vm_execute_java_method_array((jmethodID) constructor, 0, args);
 
     if (exn_raised()) {
-        DIE("class constructor has thrown an exception");
+        LDIE(18, "class constructor has thrown an exception");
     }
 
     STD_FREE(args);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp Tue Feb 13 05:15:34 2007
@@ -578,7 +578,7 @@
                 bool f = exn_class != env->java_lang_OutOfMemoryError_Class;
                 tmn_suspend_enable();
                 if(f)
-                    DIE("Fatal: an access to findLoadedClass method of java.lang.Class is not provided");
+                    LDIE(19, "Fatal: an access to findLoadedClass method of java.lang.Class is not provided");
                 // OutOfMemoryError should be rethrown after this JNI method exits
                 return 0;
             }
@@ -1610,11 +1610,11 @@
     } else if((ver & JVMTI_VERSION_MASK_INTERFACE_TYPE) == JVMTI_VERSION_INTERFACE_JVMTI) {
         return create_jvmti_environment(vm, penv, ver);
     } else if((ver & JVMTI_VERSION_MASK_INTERFACE_TYPE) == 0x10000000) {
-        WARN("GetEnv requested unsupported JVMPI environment!! Only JVMTI is supported by VM.");
+        LWARN(30, "GetEnv requested unsupported {0} environment!! Only JVMTI is supported by VM." << "JVMPI");
     } else if((ver & JVMTI_VERSION_MASK_INTERFACE_TYPE) == 0x20000000) {
-        WARN("GetEnv requested unsupported JVMDI environment!! Only JVMTI is supported by VM.");
+        LWARN(30, "GetEnv requested unsupported {0} environment!! Only JVMTI is supported by VM." << "JVMDI");
     } else {
-        WARN("GetEnv called with unsupported interface version 0x" << ((void *)((POINTER_SIZE_INT)ver)));
+        LWARN(31, "GetEnv called with unsupported interface version 0x{0}" << ((void *)((POINTER_SIZE_INT)ver)));
     }
 
     *penv = NULL;
@@ -1671,7 +1671,7 @@
     assert(hythread_is_suspend_enabled());
     if (exn_raised()) {
         print_uncaught_exception_message(stderr, "static initializing", exn_get());
-        DIE("Error initializing java machine\n");
+        LDIE(20, "Error initializing java machine");
     }
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_method.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_method.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_method.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_method.cpp Tue Feb 13 05:15:34 2007
@@ -138,8 +138,7 @@
 
     Method *method = class_lookup_method_recursive(vtable->clss, name, desc);
     if (method == 0) {
-        DIE(" Can't find method " << name->bytes << " " 
-            << desc->bytes);
+        LDIE(21, "Can't find method {0} {1}" << name->bytes << desc->bytes);
     }
 
     return method;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp Tue Feb 13 05:15:34 2007
@@ -429,7 +429,7 @@
     {
         if (print_error) {
             char buf[256];
-            WARN("Failed to open agent library " << lib_name << " : " 
+            LWARN(32, "Failed to open agent library {0} : {1}" << lib_name
                 << apr_dso_error(agent->agentLib, buf, 256));
         }
         return false;
@@ -465,7 +465,7 @@
     if (!find_agent_onload_function(agent, callback))
     {
         char buf[256];
-        WARN("No agent entry function found in library " << lib_name << " : " 
+        LWARN(33, "No agent entry function found in library {0} : {1}" << lib_name
             << apr_dso_error(agent->agentLib, buf, 256));
         return -1;
     }
@@ -483,7 +483,7 @@
     assert(agent->Agent_OnLoad_func);
     jint result = agent->Agent_OnLoad_func(vm, agent_options, NULL);
     if (0 != result)
-        WARN("Agent library " << lib_name << " initialization function returned " << result);
+        LWARN(34, "Agent library {0} initialization function returned {1}" << lib_name << result);
     return result;
 }
 
@@ -514,7 +514,7 @@
         status = open_agent_library(agent, path2, true);
         if (!status)
         {
-            WARN("Failed to open agent library " << path2);
+            LWARN(35, "Failed to open agent library {0}" << path2);
             return -1;
         }
         else
@@ -530,7 +530,7 @@
     if (!find_agent_onload_function(agent, callback))
     {
         char buf[256];
-        WARN("No agent entry function found in library " << path << " : " 
+        LWARN(33, "No agent entry function found in library {0} : {1}" << path
             << apr_dso_error(agent->agentLib, buf, 256));
         return -1;
     }
@@ -548,7 +548,7 @@
     assert(agent->Agent_OnLoad_func);
     jint result = agent->Agent_OnLoad_func(vm, agent_options, NULL);
     if (0 != result)
-        WARN("Agent library " << path << " initialization function returned " << result);
+        LWARN(34, "Agent library {0} initialization function returned {1}" << path << result);
     return result;
 }
 
@@ -565,7 +565,7 @@
         status = open_agent_library(agent, path2, true);
         if (!status)
         {
-            WARN("Failed to open agent library " << path2);
+            LWARN(35, "Failed to open agent library {0}" << path2);
             return -1;
         }
         else
@@ -584,7 +584,7 @@
         if (!find_agent_onload_function(agent, callback2))
         {
             char buf[256];
-            WARN("No agent entry function found in library" << path << " : " 
+            LWARN(33, "No agent entry function found in library {0} : {1}" << path 
                 << apr_dso_error(agent->agentLib, buf, 256));
             return -1;
         }
@@ -606,7 +606,7 @@
     assert(agent->Agent_OnLoad_func);
     jint result = agent->Agent_OnLoad_func(vm, agent_options, NULL);
     if (0 != result)
-        WARN("Agent library " << path << " initialization function returned " << result);
+        LWARN(34, "Agent library {0} initialization function returned {1}" << path << result);
     return result;
 }
 
@@ -655,7 +655,7 @@
             else if (strncmp(str, "-Xrun:", 5) == 0)
                 result = load_xrun(agent, str, (JavaVM_Internal*)vm);
             else
-                DIE("Unknown agent loading option " << str);
+                LDIE(22, "Unknown agent loading option {0}" << str);
             current_loading_agent = NULL;
 
 
@@ -687,7 +687,7 @@
         if (APR_SUCCESS != apr_dso_unload(agent->agentLib))
         {
             char buf[256];
-            WARN("Failed to unload agent library " << agent->agentName << " : " 
+            LWARN(36, "Failed to unload agent library {0} : {1}" << agent->agentName
                 << apr_dso_error(agent->agentLib, buf, 256));
         }
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp Tue Feb 13 05:15:34 2007
@@ -138,7 +138,7 @@
             return;
         }
     }
-    DIE2("jvmti.break", "VMBreakPoints::release_intf: try to release unknown interface");
+    LDIE2("jvmti.break", 23, "{0} try to release unknown interface" << "VMBreakPoints::release_intf:");
 }
 
 VMBreakInterface*

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp Tue Feb 13 05:15:34 2007
@@ -1364,7 +1364,7 @@
 
     if (NULL == jit)
     {
-        WARN("Zero interrupted method encountered");
+        LWARN(37, "Zero interrupted method encountered");
         return exn_object;
     }
 
@@ -1374,10 +1374,9 @@
     TRACE2("jvmti.event.exn",
         "Exception method = " << (Method_Handle)method << " location " << bc);
     if (EXE_ERROR_NONE != result)
-        WARN("JIT " << jit <<
-            " get_bc_location_for_native returned error " <<
-            result << " for exception method " << (Method_Handle)method <<
-            " location " << native_location);
+        LWARN(38, "JIT {0} {1} returned error {2} for exception method {3} location {4}" 
+                  << jit << "get_bc_location_for_native"
+                  << result << (Method_Handle)method << native_location);
     location = bc;
 
     if (catch_method)
@@ -1389,10 +1388,9 @@
             "Exception catch method = " << (Method_Handle)catch_method <<
             " location " << bc);
         if (EXE_ERROR_NONE != result)
-            WARN("JIT " << jit <<
-                " get_bc_location_for_native returned error " <<
-                result << " for catch method " << (Method_Handle)catch_method <<
-                " location " << native_catch_location);
+            LWARN(39, "JIT {0} {1} returned error {2} for catch method {3} location {4}"
+                     << jit << "get_bc_location_for_native" << result
+                     << (Method_Handle)catch_method << native_catch_location);
         catch_location = bc;
     }
 
@@ -1498,10 +1496,9 @@
     TRACE2("jvmti.event.exn",
         "Exception method = " << (Method_Handle)catch_method << " location " << bc);
     if (EXE_ERROR_NONE != result)
-        WARN("JIT " << catch_jit <<
-            " get_bc_location_for_native returned error " <<
-            result << " for exception method " << (Method_Handle)catch_method <<
-            " location " << native_catch_location);
+        LWARN(38, "JIT {0} {1} returned error {2} for exception method {3} location {4}" 
+                  << catch_jit << "get_bc_location_for_native"
+                  << result << (Method_Handle)catch_method << native_catch_location);
     catch_location = bc;
 
     exn_object = jvmti_exception_catch_event_callback_call(exn_object,
@@ -2123,7 +2120,7 @@
     JavaVMAttachArgs vm_args = {JNI_VERSION_1_2, "TIEventThread", NULL};
     int status = AttachCurrentThreadAsDaemon(java_vm, (void**)&jni_env, &vm_args);
     if(status != JNI_OK) {
-        DIE("jvmti_event_thread_function: cannot attach current thread");
+        LDIE(24, "{0} cannot attach current thread" << "jvmti_event_thread_function:");
     }
 
     assert(hythread_is_suspend_enabled());

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp Tue Feb 13 05:15:34 2007
@@ -419,7 +419,7 @@
         // ret instruction
         case OPCODE_RET:            /* 0xa9 + u1|u2  */
             // FIXME - need to obtain return address from stack.
-            DIE2("jvmti", "SingleStepLocation: not implemented ret instruction");
+            LDIE2("jvmti", 25, "SingleStepLocation: not implemented ret instruction");
             break;
         }
         break;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_reflect_VMReflection.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_reflect_VMReflection.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_reflect_VMReflection.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_reflect_VMReflection.cpp Tue Feb 13 05:15:34 2007
@@ -113,7 +113,7 @@
     jthrowable exn = exn_get(); 
     //FIXME need better handling for lazy exceptions
     if (!exn) {
-        WARN("ATTENTION! Could not get cause exception from lazy machinery");
+        LWARN(40, "ATTENTION! Could not get cause exception from lazy machinery");
     }
     exn_clear();
     //static Class* ITE_class = genv->LoadCoreClass(

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp Tue Feb 13 05:15:34 2007
@@ -343,7 +343,7 @@
                 || strncmp(desc->bytes + 1, type->bytes, type->len)
                 || desc->bytes[type->len + 1] != ';')
             {
-                DIE("Invalid enum field descriptor: " << desc->bytes);
+                LDIE(26, "Invalid enum field descriptor: {0}" << desc->bytes);
             }
 #endif
             return GetStaticObjectField(jenv, 0, (jfieldID)(enum_type->get_field(i)));

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp Tue Feb 13 05:15:34 2007
@@ -124,7 +124,7 @@
             }
             break;
         case VM_DATA_TYPE_VALUE:
-            DIE("This functionality is not currently supported");
+            LDIE(30, "This functionality is not currently supported");
         default:
             ASSERT(0, "Unexpected data type: " << type_info_get_type(tih));
         }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/ini_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/ini_em64t.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/ini_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/ini_em64t.cpp Tue Feb 13 05:15:34 2007
@@ -299,7 +299,7 @@
             }
             break;
         default:
-            DIE("INTERNAL ERROR: Unexpected type of the argument: " << type);
+            LDIE(31, "INTERNAL ERROR: Unexpected type of the argument: {0}" << type);
         }
         iter = advance_arg_iterator(iter);
     }
@@ -351,7 +351,7 @@
             gr_args, fr_args, stack_args);
         break;
     default:
-        DIE("INTERNAL ERROR: Unexpected return type: " << type);
+        LDIE(32, "INTERNAL ERROR: Unexpected return type: {0}" << type);
     }
 
     STD_FREE(stack_args);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp Tue Feb 13 05:15:34 2007
@@ -137,7 +137,7 @@
                 // This should never cause loading
                 Class_Handle UNUSED c = type_info_get_class(tih);
                 assert(c);
-                DIE("This functionality is not currently supported");
+                LDIE(30, "This functionality is not currently supported");
                 break;
             }
         default:

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp Tue Feb 13 05:15:34 2007
@@ -125,7 +125,7 @@
 
 static void unimplemented_rt_support_func1(int f, const char *name)
 {
-    DIE("This runtime support function is not implemented: f=" << f << ", " << name);
+    LDIE(34, "This runtime support function is not implemented: f={0}, {1}" << f << name);
 } //unimplemented_rt_support_func1
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp Tue Feb 13 05:15:34 2007
@@ -142,7 +142,7 @@
 
     if ('\0' == executable[0]) {
         // no executable name is available, degrade gracefully
-        WARN("Execution stack follows, consider using addr2line\n" << buf);
+        LWARN(41, "Execution stack follows, consider using addr2line\n{0}" << buf);
         return;
     }
 
@@ -185,7 +185,7 @@
  */
 void print_native_stack (unsigned *rbp) {
     int depth = 17;
-    WARN("Fatal error");
+    LWARN(42, "Fatal error");
     char buf[1024];
     int n = 0;
     while (rbp && rbp[1] && --depth >= 0 && (n<int(sizeof(buf))-20)) {
@@ -436,7 +436,7 @@
     return;
     }
 
-    DIE("Cannot find Java thread using signal context");
+    LDIE(35, "Cannot find Java thread using signal context");
 }
 */
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp Tue Feb 13 05:15:34 2007
@@ -184,7 +184,7 @@
 
     if ('\0' == executable[0]) {
         // no executable name is available, degrade gracefully
-        WARN("Execution stack follows, consider using addr2line\n" << buf);
+        LWARN(41, "Execution stack follows, consider using addr2line\n{0}" << buf);
         return;
     }
 
@@ -227,7 +227,7 @@
  */
 void print_native_stack (unsigned *ebp) {
     int depth = 17;
-    WARN("Fatal error");
+    LWARN(42, "Fatal error");
     char buf[1024];
     unsigned int n = 0;
     while (ebp && ebp[1] && --depth >= 0 && (n<sizeof(buf)-20)) {
@@ -674,7 +674,7 @@
     return;
     }
 
-    DIE("Cannot find Java thread using signal context");
+    LDIE(35, "Cannot find Java thread using signal context");
 
 }
 */

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/mem_alloc.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/mem_alloc.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/mem_alloc.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/mem_alloc.cpp Tue Feb 13 05:15:34 2007
@@ -129,16 +129,14 @@
     apr_status_t status = port_vmem_reserve(&pDesc->_descriptor, &pool_storage, 
          size, mem_protection, ps, aux_pool);
     if (status != APR_SUCCESS)  {
-         DIE("Cannot allocate pool storage: " << (void *)size 
-             << " bytes of virtual memory for code or data.\n"
-             "Error code = " << status);
+         LDIE(27, "Cannot allocate pool storage: {0} bytes of virtual memory for code or data.\n"
+             "Error code = {1}" << (void *)size << status);
      }
  
     status = port_vmem_commit(&pool_storage, size, pDesc->_descriptor);
     if (status != APR_SUCCESS || pool_storage == NULL)  {
-        DIE("Cannot allocate pool storage: " << (void *)size 
-            << " bytes of virtual memory for code or data.\n"
-            "Error code = " << status);
+         LDIE(27, "Cannot allocate pool storage: {0} bytes of virtual memory for code or data.\n"
+             "Error code = {1}" << (void *)size << status);
      }
  
 #ifdef VM_STATS
@@ -175,7 +173,7 @@
      size_t mem_left_in_pool = (pool_end - pool_start);
     while (size > mem_left_in_pool) {
         if (!_is_resize_allowed) {
-            DIE("Error: VTable pool overflow, resize is not allowed. Please, extand VTable pool size.\n");
+            LDIE(28, "Error: VTable pool overflow, resize is not allowed. Please, extand VTable pool size.\n");
             // TODO: add functionality to commit additional part of memory if reserved enough:
             // need for (is_resize_allowed = false) case - commit every time by little pieces 
          }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/natives_support.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/natives_support.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/natives_support.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/natives_support.cpp Tue Feb 13 05:15:34 2007
@@ -267,7 +267,7 @@
         apr_dso_unload(handle);
         jni_libs.lock._unlock();
 
-        DIE("natives_load_library: apr_palloc failed");
+        LDIE(29,"{0} apr_palloc failed" << "natives_load_library: ");
 
         returnCode = NULL;
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/nt_exception_filter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/nt_exception_filter.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/nt_exception_filter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/nt_exception_filter.cpp Tue Feb 13 05:15:34 2007
@@ -82,7 +82,7 @@
         vm_identify_eip((void *)p_NT_exception->ContextRecord->Eip);
     if(vmct != VM_TYPE_JAVA) {
         if (!get_boolean_property("vm.assert_dialog", TRUE, VM_PROPERTIES)) {
-            WARN("Fatal exception, terminating");
+            LWARN(43, "Fatal exception, terminating");
             return EXCEPTION_EXECUTE_HANDLER;
         }
         return EXCEPTION_CONTINUE_SEARCH;
@@ -113,7 +113,7 @@
 
     case STATUS_PRIVILEGED_INSTRUCTION:
         {
-            DIE("Unexpected exception code");
+            LDIE(36, "Unexpected exception code");
         }
         break;
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp Tue Feb 13 05:15:34 2007
@@ -1371,7 +1371,7 @@
             count = outlen;
             break;
         default:
-            DIE( "Verifier: vf_parse_description: incorrect structure of constant pool" );
+            LDIE(37, "Verifier: vf_parse_description: incorrect structure of constant pool" );
             break;
         }
     }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_dataflow.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_dataflow.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_dataflow.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_dataflow.cpp Tue Feb 13 05:15:34 2007
@@ -529,7 +529,7 @@
                     0, VF_CHECK_INVOKESPECIAL );
         break;
     default:
-        DIE( "Verifier: vf_check_entry_refs: unknown check in switch" );
+        LDIE(38, "Verifier: vf_check_entry_refs: unknown check in switch" );
     }
     // check error
     if( is_error ) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_utils.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_utils.cpp?view=diff&rev=506992&r1=506991&r2=506992
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_utils.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_utils.cpp Tue Feb 13 05:15:34 2007
@@ -527,7 +527,7 @@
         }
         return false;
     default:
-        DIE("Verifier: CompareTypes: unknown check type in switch");
+        LDIE(39, "Verifier: CompareTypes: unknown check type in switch");
         return true;
     }
     // unreachable code
@@ -1013,7 +1013,7 @@
         return vf_is_super_class( source, current )
                     && vf_is_super_class( current, target );
     default:
-        DIE( "Verifier: vf_is_valid: invalid check type" );
+        LDIE(40, "Verifier: vf_is_valid: invalid check type" );
         return false;
     }
     // unreachable code
@@ -1079,7 +1079,7 @@
             << ") Incompatible object argument for invokespecial" );
         break;
     default:
-        DIE( "Verifier: vf_set_error: unknown check type" );
+        LDIE(41, "Verifier: vf_set_error: unknown check type" );
         break;
     }
     return;
@@ -1514,7 +1514,7 @@
 void
 vf_error_func( VERIFY_SOURCE_PARAMS )
 {
-    DIE( VERIFY_REPORT_SOURCE << "Verifier: abort!" );
+    LDIE(42, "{0} Verifier: abort!" << VERIFY_REPORT_SOURCE );
     exit(1);
 } // vf_error_func
 
@@ -1531,7 +1531,7 @@
     void *result = STD_CALLOC( num, size );
     if( result == NULL ) {
         // out of memory error
-        ECHO( "Verifier: vf_calloc_func: out of memory" );
+        LECHO(41, "Verifier: {0}: out of memory" << "vf_calloc_func");
         vf_error();
     }
 
@@ -1556,7 +1556,7 @@
     void *result = STD_MALLOC( size );
     if( result == NULL ) {
         // out of memory error
-        ECHO( "Verifier: vf_malloc_func: out of memory" );
+        LECHO(41, "Verifier: {0}: out of memory" << "vf_malloc_func");
         vf_error();
     }
 
@@ -1582,7 +1582,7 @@
     void *result = STD_REALLOC( pointer, size );
     if( result == NULL ) {
         // out of memory error
-        ECHO( "Verifier: vf_realloc_func: out of memory" );
+        LECHO(41, "Verifier: {0}: out of memory" << "vf_realloc_func");
         vf_error();
     }
 
@@ -1606,7 +1606,7 @@
     if( pointer ) {
         STD_FREE( pointer );
     } else {
-        ECHO( "Verifier: vf_free_func: null pointer for free" );
+        LECHO(41, "Verifier: {0}: null pointer for free" << "vf_free_func" );
         vf_error();
     }
 



Mime
View raw message