harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r584682 - in /harmony/enhanced/drlvm/trunk/vm: include/jit_runtime_support.h vmcore/src/jit/rt_helper_info.cpp vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp
Date Mon, 15 Oct 2007 05:41:32 GMT
Author: varlax
Date: Sun Oct 14 22:41:31 2007
New Revision: 584682

URL: http://svn.apache.org/viewvc?rev=584682&view=rev
Log:
Postfix to HARMONY-3553, IPF support fixed

Modified:
    harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/rt_helper_info.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h?rev=584682&r1=584681&r2=584682&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h Sun Oct 14 22:41:31 2007
@@ -763,6 +763,12 @@
 VMEXPORT const char* vm_helper_get_name(VM_RT_SUPPORT id);
 
 /**
+ * Returns number of helper arguments.
+ * Intended primarily for debugging.
+ */
+VMEXPORT int vm_helper_get_numargs(VM_RT_SUPPORT id);
+
+/**
 * Returns Id of runtime helper by its string representation. 
 * Name comparison is case-insensitive.
 * If the helperName is unknown, then VM_RT_UNKNOWN is returned.

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/rt_helper_info.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/rt_helper_info.cpp?rev=584682&r1=584681&r2=584682&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/rt_helper_info.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/rt_helper_info.cpp Sun Oct 14 22:41:31
2007
@@ -244,3 +244,16 @@
         return CALLING_CONVENTION_STDCALL;
     }
 }
+
+VMEXPORT 
+int vm_helper_get_numargs(VM_RT_SUPPORT id)
+{
+    HelperInfoMap::const_iterator it = helper_map->find(id);
+    if (helper_map->end() != it) {
+        assert(it->second);
+        return it->second->number_of_args;
+    } else {
+        ASSERT(false, "Unexpected helper id " << id);
+        return 0;
+    }
+}

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?rev=584682&r1=584681&r2=584682&view=diff
==============================================================================
--- 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 Sun
Oct 14 22:41:31 2007
@@ -2471,9 +2471,8 @@
 #if _DEBUG
     static bool print_helper_info = false;
     if (print_helper_info) {
-        int   num_args;
-        char *fn_name;
-        VM_Statistics::get_vm_stats().rt_function_map.lookup((void *)f, &num_args, (void
**)&fn_name);
+        int   num_args = vm_helper_get_numargs(f);
+        const char *fn_name = vm_helper_get_name(f);
         printf("Calling helper %s, %d args\n", fn_name, num_args);
     }
 #endif // _DEBUG
@@ -2739,11 +2738,8 @@
 
 #ifdef VM_STATS
     if (true) {
-        int   num_args = 0;
-        char *helper_name = NULL;
-        bool found = VM_Statistics::get_vm_stats().rt_function_map.lookup((void *)f, &num_args,
(void **)&helper_name);
-        assert(found);  // else changes were made to the enum VM_RT_SUPPORT in jit_runtime_support.h.
-
+        int   num_args = vm_helper_get_numargs(f);
+        const char *helper_name = vm_helper_get_name(f);
         void *wrapper = emit_counting_wrapper_for_jit_helper(f, helper, num_args, helper_name);
         return wrapper;
     } else



Mime
View raw message