harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcfi...@apache.org
Subject svn commit: r634360 - in /harmony/enhanced/drlvm/trunk/vm/vmcore: include/ src/class_support/ src/init/ src/jni/ src/kernel_classes/native/ src/util/
Date Thu, 06 Mar 2008 17:39:27 GMT
Author: mcfirst
Date: Thu Mar  6 09:39:20 2008
New Revision: 634360

URL: http://svn.apache.org/viewvc?rev=634360&view=rev
Log:
Applying the patch from HARMONY-5499 [drlvm][startup] make a number of string hash table buckets
configurable

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/String_Pool.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/init.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/mem_alloc.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/String_Pool.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMExecutionEngine.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_stats.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/String_Pool.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/String_Pool.h?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/String_Pool.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/String_Pool.h Thu Mar  6 09:39:20 2008
@@ -49,7 +49,7 @@
 
 class String_Pool {
 public:
-    String_Pool();
+    String_Pool(size_t st_size);
 
     // lookup string in string table & insert if not found
     String * lookup(const char *str);
@@ -68,8 +68,16 @@
     void lock_pool();
     void unlock_pool();
 
+#ifdef VM_STATS
+    friend class VM_Statistics;
+public:
+    apr_hash_t * string_stat;
+    unsigned num_ambiguity;
+#endif
+
 private:
-    enum { STRING_TABLE_SIZE = 44449, INTERNED_STRING_ARRAY_SIZE = STRING_TABLE_SIZE / 10
};
+    enum { INTERNED_STRING_ARRAY_SIZE = 32768 };
+    size_t string_pool_size;
 
     class Entry {
     public:
@@ -108,10 +116,7 @@
     POINTER_SIZE_INT hash_it(const char * str, size_t len);
     String * lookup(const char *str, size_t len, POINTER_SIZE_INT hash);
     void register_interned_string(String * str);
-    private:
     POINTER_SIZE_INT hash_it_unaligned(const char * str, size_t len);
-    public:
-    
     // memory pool
     tl::MemoryPool      memory_pool;    
     // table of string entries
@@ -130,12 +135,6 @@
     // The protocol is simple and the lock is local to this string pool.
     volatile POINTER_SIZE_INT string_pool_lock; // 1 is locked, 0 is unlocked
 
-#ifdef VM_STATS
-    friend class VM_Statistics;
-public:
-    apr_hash_t * string_stat;
-    unsigned num_ambiguity;
-#endif
 };
 
 #endif // _STRING_POOL_H_

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h Thu Mar  6 09:39:20 2008
@@ -323,7 +323,7 @@
     OpenInstanceHandle em_instance;
     OpenEmVmHandle em_interface;
 
-    Global_Env(apr_pool_t * pool);
+    Global_Env(apr_pool_t *pool, size_t string_pool_size);
     ~Global_Env();
 
     void * operator new(size_t size, apr_pool_t * pool) {
@@ -404,5 +404,11 @@
     Properties* m_java_properties;
     Properties* m_vm_properties;
 };
+
+/**
+ * Parses a size string, e. g. <num>, <num>k, <num>m.
+ * @return size in bytes, or 0 if parsing failed
+ */
+size_t parse_size(const char* value);
 
 #endif // _ENVIRONMENT_H

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/init.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/init.h?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/init.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/init.h Thu Mar  6 09:39:20 2008
@@ -25,13 +25,26 @@
                         char * name, jboolean daemon);
 jint vm_init1(JavaVM_Internal * java_vm, JavaVMInitArgs * vm_arguments);
 jint vm_init2(JNIEnv * jni_env);
+/**
+ * The method is called from both paths of VM shutdown, namely during <code>DestroyJavaVM</code>
and
+ * <code>System.exit</code> right after <code>java.lang.System.execShutdownSequence</code>
completion.
+ * @see java.lang.System.execShutdownSequence
+ */
+void exec_native_shutdown_sequence();
 jint vm_destroy(JavaVM_Internal * java_vm, jthread java_thread);
 void vm_interrupt_handler(int);
 void vm_dump_handler(int);
 
 void initialize_vm_cmd_state(Global_Env *p_env, JavaVMInitArgs* arguments);
 void set_log_levels_from_cmd(JavaVMInitArgs* vm_arguments);
-void parse_vm_arguments(Global_Env *p_env);
+/**
+ * Parses string pool size required for environment initialization.
+ */
+void parse_vm_arguments1(JavaVMInitArgs *vm_args, size_t *string_pool_size);
+/**
+ * Collects all arguments in VM properties.
+ */
+void parse_vm_arguments2(Global_Env *p_env);
 void* get_portlib_for_logger(Global_Env *p_env);
 void parse_jit_arguments(JavaVMInitArgs* vm_arguments);
 void print_generic_help();

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/mem_alloc.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/mem_alloc.h?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/mem_alloc.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/mem_alloc.h Thu Mar  6 09:39:20 2008
@@ -30,15 +30,17 @@
 #define GBYTE 1024*MBYTE
 
 // pool is used for common stub code
-#define DEFAULT_COMMOT_JIT_CODE_POOL_SIZE           256*KBYTE
-// used for comressed VTable pointers
-#define DEFAULT_COMMOT_VTABLE_POOL_SIZE_NO_RESIZE   8*MBYTE
-//used for uncompressed VTable pointers
+#define DEFAULT_JIT_CODE_POOL_SIZE                  256*KBYTE
+// used for compressed VTable pointers
+#define DEFAULT_VTABLE_POOL_SIZE_NO_RESIZE          8*MBYTE
+// used for uncompressed VTable pointers
 #define DEFAULT_VTABLE_POOL_SIZE                    256*KBYTE
 // used for compiled code of a user class loader
 #define DEFAULT_CLASSLOADER_JIT_CODE_POOL_SIZE      256*KBYTE
 // used for compiled code of the bootstrap class loader
 #define DEFAULT_BOOTSTRAP_JIT_CODE_POOL_SIZE        1*MBYTE
+// used for a string pool
+#define DEFAULT_STRING_TABLE_SIZE                   262143
 
 #define MEMORY_UTILIZATION_LIMIT 15
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp Thu Mar  6 09:39:20
2008
@@ -34,8 +34,7 @@
 #include "compile.h"
 #include "component_manager.h"
 
-
-Global_Env::Global_Env(apr_pool_t * pool):
+Global_Env::Global_Env(apr_pool_t * pool, size_t string_pool_size):
 mem_pool(pool),
 bootstrap_class_loader(NULL),
 system_class_loader(NULL),
@@ -45,6 +44,7 @@
 dcList(NULL),
 assert_reg(NULL),
 vm_methods(NULL),
+string_pool(string_pool_size),
 total_loaded_class_count(0),
 unloaded_class_count(0),
 class_loading_verbose(false),
@@ -304,45 +304,50 @@
     return LoadCoreClass(this->string_pool.lookup(s));
 }
 
-static size_t parse_pool_size(const char* name, size_t default_size) {
-    if(!is_property_set(name, VM_PROPERTIES)) {
-        return default_size;
-    }
-
-    char* value = get_property(name, VM_PROPERTIES);
+size_t parse_size(const char* value) {
     size_t size = atol(value);
     int sizeModifier = tolower(value[strlen(value) - 1]);
-    destroy_property_value(value);
 
     size_t modifier;
     switch(sizeModifier) {
         case 'k': modifier = 1024; break;
-        case 'm': modifier = 1024*1024; break;
+        case 'm': modifier = 1024 * 1024; break;
         default: modifier = 1; break;
     }
 
-    return size*modifier;
+    return size * modifier;
+}
+
+static size_t parse_size_prop(const char* name, size_t default_size) {
+    if(!is_property_set(name, VM_PROPERTIES)) {
+        return default_size;
+    }
+
+    char* value = get_property(name, VM_PROPERTIES);
+    size_t size = parse_size(value);
+    destroy_property_value(value);
+    return size;
 }
 
 void Global_Env::init_pools() {
     size_t pool_size;
 
-    pool_size = parse_pool_size("vm.code_pool_size.stubs", DEFAULT_COMMOT_JIT_CODE_POOL_SIZE);
+    pool_size = parse_size_prop("vm.code_pool_size.stubs", DEFAULT_JIT_CODE_POOL_SIZE);
     assert(pool_size);
     GlobalCodeMemoryManager = new PoolManager(pool_size, system_page_size, use_large_pages,

         true/*is_code*/, true/*is_resize_allowed*/);
 
     bool compress_vtables = vm_vtable_pointers_are_compressed();
-    pool_size = parse_pool_size("vm.vtable_pool_size",
-        compress_vtables?DEFAULT_COMMOT_VTABLE_POOL_SIZE_NO_RESIZE:DEFAULT_VTABLE_POOL_SIZE);
+    pool_size = parse_size_prop("vm.vtable_pool_size",
+        compress_vtables?DEFAULT_VTABLE_POOL_SIZE_NO_RESIZE : DEFAULT_VTABLE_POOL_SIZE);
     assert(pool_size);
     VTableMemoryManager = new PoolManager(pool_size, system_page_size, use_large_pages, 
         false/*is_code*/, !compress_vtables/*is_resize_allowed*/);
 
-    bootstrap_code_pool_size = pool_size = parse_pool_size("vm.code_pool_size.bootstrap_loader",
+    bootstrap_code_pool_size = pool_size = parse_size_prop("vm.code_pool_size.bootstrap_loader",
         DEFAULT_BOOTSTRAP_JIT_CODE_POOL_SIZE);
     assert(pool_size);
-    user_code_pool_size = pool_size = parse_pool_size("vm.code_pool_size.user_loader",
+    user_code_pool_size = pool_size = parse_size_prop("vm.code_pool_size.user_loader",
         DEFAULT_CLASSLOADER_JIT_CODE_POOL_SIZE);
     assert(pool_size);
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/String_Pool.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/String_Pool.cpp?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/String_Pool.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/String_Pool.cpp Thu Mar  6 09:39:20
2008
@@ -69,8 +69,9 @@
 } //String_Pool::Entry::Entry
 
 
-String_Pool::String_Pool() {
-    unsigned size = sizeof(Entry*) * STRING_TABLE_SIZE;
+String_Pool::String_Pool(size_t sp_size) {
+    string_pool_size = sp_size;
+    size_t size = sizeof(Entry*) * sp_size;
     table = (Entry **)memory_pool.alloc(size);
     memset(table, 0, size);
     
@@ -205,7 +206,7 @@
     ++key_stats->num_lookup;
 #endif
 
-    int hash = (int)(raw_hash % STRING_TABLE_SIZE);
+    int hash = (int)(raw_hash % string_pool_size);
 
     // search bucket for string, no lock
     for (Entry *e = table[hash]; e != NULL; e = e->next) {

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?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp Thu Mar  6 09:39:20
2008
@@ -70,6 +70,8 @@
 #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)
+#define STRING_POOL_SIZE_OPT "-XX:vm.stringPoolSize="
+
 extern bool dump_stubs;
 extern bool parallel_jit;
 extern const char * dump_file_name;
@@ -148,7 +150,24 @@
     return NULL;
 }
 
-void parse_vm_arguments(Global_Env *p_env)
+void parse_vm_arguments1(JavaVMInitArgs *vm_args, size_t *p_string_pool_size)
+{
+    *p_string_pool_size = DEFAULT_STRING_TABLE_SIZE;
+    for (int i = 0; i < vm_args->nOptions; i++) {
+        const char* option = vm_args->options[i].optionString;
+        if (begins_with(option, STRING_POOL_SIZE_OPT)) {
+            const char* arg = option + strlen(STRING_POOL_SIZE_OPT);
+            *p_string_pool_size = parse_size(arg);
+            if (0 == *p_string_pool_size) {
+                LECHO(34, "Negative or invalid string pool size. A default value is used,
" << DEFAULT_STRING_TABLE_SIZE << " bytes.");
+                *p_string_pool_size = DEFAULT_STRING_TABLE_SIZE;
+            }
+            TRACE2("init", "string_pool_size = " << *p_string_pool_size);
+        }
+    }
+} // parse_vm_arguments1
+
+void parse_vm_arguments2(Global_Env *p_env)
 {
     bool version_printed = false;
 #ifdef _DEBUG
@@ -268,7 +287,7 @@
             // cut -Xms || -ms
             const char* arg = option + (begins_with(option, "-ms") ? 3 : 4);
             TRACE2("init", "gc.ms = " << arg);
-            if (atoi(arg) == 0) {
+            if (atoi(arg) <= 0) {
                 LECHO(34, "Negative or invalid heap size. Default value will be used!");
             }
             p_env->VmProperties()->set("gc.ms", arg);
@@ -277,18 +296,21 @@
             // cut -Xmx
             const char* arg = option + (begins_with(option, "-mx") ? 3 : 4);
             TRACE2("init", "gc.mx = " << arg);
-            if (atoi(arg) == 0) {
+            if (atoi(arg) <= 0) {
                 LECHO(34, "Negative or invalid heap size. Default value will be used!");
             }
             p_env->VmProperties()->set("gc.mx", arg);
         } else if (begins_with(option, "-Xss")) {
             const char* arg = option + 4;
             TRACE2("init", "thread.stacksize = " << arg);
-            if (atoi(arg) == 0) {
+            if (atoi(arg) <= 0) {
                 LECHO(34, "Negative or invalid stack size. Default value will be used!");
             }
             p_env->VmProperties()->set("thread.stacksize", arg);
-	}	  
+    	}	  
+        else if (begins_with(option, STRING_POOL_SIZE_OPT)) {
+            // the pool is already created
+        }
         else if (begins_with(option, "-agentlib:")) {
             p_env->TI->addAgent(option);
         }
@@ -404,7 +426,6 @@
                     p_env->assert_reg->enable_system = false;
                 }
         }
-
         else {
             LECHO(30, "Unknown option {0}" << option);
             USE_JAVA_HELP;
@@ -413,7 +434,7 @@
     } // for
 
     apr_pool_destroy(pool);
-} //parse_vm_arguments
+} //parse_vm_arguments2
 
 void parse_jit_arguments(JavaVMInitArgs* vm_arguments)
 {
@@ -518,9 +539,8 @@
 
         if (begins_with(option, "-verbose")) {
             /*
-            * -verbose[:class|:gc|:jni]
-            * Set specification log filters.
-            */
+             * -verbose[:class|:gc|:jni] set specification log filters.
+             */
             char* next_sym = option + 8;
             if (*next_sym == '\0') {
                 set_threshold(util::CLASS_LOGGER, INFO);

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?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp Thu Mar  6 09:39:20 2008
@@ -750,7 +750,7 @@
 
     tm_properties->use_soft_unreservation = get_boolean_property("thread.soft_unreservation",
FALSE, VM_PROPERTIES);
 
-    parse_vm_arguments(vm_env);
+    parse_vm_arguments2(vm_env);
 
     vm_env->verify = get_boolean_property("vm.use_verifier", TRUE, VM_PROPERTIES);
 #ifdef REFS_USE_RUNTIME_SWITCH

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?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp Thu Mar  6 09:39:20 2008
@@ -202,6 +202,16 @@
 }
 
 /**
+ * A native analogue of <code>java.lang.System.execShutdownSequence</code>.
+ */
+void exec_native_shutdown_sequence() {
+    // print out gathered data
+#ifdef VM_STATS
+    VM_Statistics::get_vm_stats().print();
+#endif
+}
+
+/**
  * Waits until all non-daemon threads finish their execution,
  * initiates VM shutdown sequence and stops running threads if any.
  *
@@ -225,17 +235,13 @@
         return JNI_ERR;
     }
 
-    // Print out gathered data.
-#ifdef VM_STATS
-    VM_Statistics::get_vm_stats().print();
-#endif
-
     // Remember thread's uncaught exception if any.
     uncaught_exception = jni_env->ExceptionOccurred();
     jni_env->ExceptionClear();
 
     // Execute pending shutdown hooks & finalizers
     status = exec_shutdown_sequence(jni_env);
+    exec_native_shutdown_sequence();
     if (status != JNI_OK) return (jint)status;
     
     if(get_native_finalizer_thread_flag())
@@ -322,6 +328,7 @@
     jint status = AttachCurrentThread(java_vm, (void **)&jni_env, &vm_args);
     if (status == JNI_OK) {
         exec_shutdown_sequence(jni_env);
+        exec_native_shutdown_sequence();
         DetachCurrentThread(java_vm);
     }
 

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?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp Thu Mar  6 09:39:20 2008
@@ -481,8 +481,12 @@
         goto done;
     }
 
+    // Get a string pool size.
+    size_t string_pool_size;
+    parse_vm_arguments1(vm_args, &string_pool_size);
+
     // Create Global_Env.
-    vm_env = new(vm_global_pool) Global_Env(vm_global_pool);
+    vm_env = new(vm_global_pool) Global_Env(vm_global_pool, string_pool_size);
     if (vm_env == NULL) {
         status = JNI_ENOMEM;
         goto done;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMExecutionEngine.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMExecutionEngine.cpp?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMExecutionEngine.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMExecutionEngine.cpp
Thu Mar  6 09:39:20 2008
@@ -16,7 +16,7 @@
  */
 
 /**
- * @file jjava_lang_VMExecutionEngine.cpp
+ * @file java_lang_VMExecutionEngine.cpp
  *
  * This file is a part of kernel class natives VM core component.
  * It contains implementation for native methods of 
@@ -49,6 +49,8 @@
 JNIEXPORT void JNICALL Java_java_lang_VMExecutionEngine_exit
   (JNIEnv * jni_env, jclass, jint status, jboolean needFinalization, jobjectArray)
 {
+    exec_native_shutdown_sequence();
+
     // ToDo: process jobjectArray
     hythread_global_lock();
     _exit(status);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_stats.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_stats.cpp?rev=634360&r1=634359&r2=634360&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_stats.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_stats.cpp Thu Mar  6 09:39:20 2008
@@ -525,7 +525,7 @@
 
 void VM_Statistics::print_string_pool_stats() {
     printf("\nBegin: Virtual Machine String Pool Statistics\n");
-    //printf("\tname\ttotal lookups\ttotal collisions\n");
+    printf("\tname\ttotal lookups\ttotal collisions\n");
     unsigned long num_lookup_total = 0;
     unsigned long num_lookup_collision_total = 0;
     String_Pool & string_pool = VM_Global_State::loader_env->string_pool;
@@ -810,15 +810,11 @@
     printf("%11" FMT64 "u ::::total_memory_allocated\n",     total_memory_allocated);
     printf("%11" FMT64 "u ::::total_memory_used\n",     total_memory_used);
     printf("%11" FMT64 "u ::::number_memorymanager_created\n",     number_memorymanager_created);
-#ifdef VM_STATS    
-    fflush(stdout);
 
     print_rt_function_stats();
-
     print_string_pool_stats();
-#endif // VM_STATS
-
     printf("==== end VM statistics\n");
+    fflush(stdout);
 } //VM_Statistics::print
 
 #endif //VM_STATS



Mime
View raw message