memory. All functions writing values into the data area return the offset
relative the begin of the code area (start of procedure).
- $Id: codegen-common.c 7966 2007-05-25 12:41:03Z pm $
+ $Id: codegen-common.c 8006 2007-06-05 07:40:49Z twisti $
*/
stackframeinfo *sfi;
localref_table *lrt;
+ STATISTICS(count_calls_java_to_native++);
+
/* get data structures from stack */
sfi = (stackframeinfo *) (datasp - sizeof(stackframeinfo));
{
java_objectheader *o;
+ STATISTICS(count_calls_native_to_java++);
+
#if defined(ENABLE_JIT)
# if defined(ENABLE_INTRP)
if (opt_intrp)
{
s4 i;
+ STATISTICS(count_calls_native_to_java++);
+
#if defined(ENABLE_JIT)
# if defined(ENABLE_INTRP)
if (opt_intrp)
{
s8 l;
+ STATISTICS(count_calls_native_to_java++);
+
#if defined(ENABLE_JIT)
# if defined(ENABLE_INTRP)
if (opt_intrp)
{
float f;
+ STATISTICS(count_calls_native_to_java++);
+
#if defined(ENABLE_JIT)
# if defined(ENABLE_INTRP)
if (opt_intrp)
{
double d;
+ STATISTICS(count_calls_native_to_java++);
+
#if defined(ENABLE_JIT)
# if defined(ENABLE_INTRP)
if (opt_intrp)
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: statistics.c 7956 2007-05-23 18:08:42Z twisti $
+ $Id: statistics.c 8006 2007-06-05 07:40:49Z twisti $
*/
s4 size_lock_hashtable = 0;
s4 size_lock_waiter = 0;
+u8 count_calls_java_to_native = 0;
+u8 count_calls_native_to_java = 0;
+
int count_const_pool_len = 0;
int count_classref_len = 0;
int count_parsed_desc_len = 0;
s4 count_branches_resolved = 0;
s4 count_branches_unresolved = 0;
-u8 count_native_function_calls=0;
u8 count_jni_callXmethod_calls=0;
u8 count_jni_calls=0;
s4 count_schedule_critical_path = 0;
-/* nativeinvokation ***********************************************************
-
- increments the native invokation count by one
-
-*******************************************************************************/
-
-void nativeinvokation(void)
-{
- /* XXX do locking here */
- count_native_function_calls++;
-}
-
-
/* jnicallXmethodinvokation ***************************************************
increments the jni CallXMethod invokation count by one
/* call statistics ********************************************************/
dolog("Function call statistics:");
- dolog("Number of native function invokations: %ld",
- count_native_function_calls);
dolog("Number of jni->CallXMethod function invokations: %ld",
count_jni_callXmethod_calls);
dolog("Overall number of jni invokations: %ld",
count_jni_calls);
+ log_println("java-to-native calls: %10ld", count_calls_java_to_native);
+ log_println("native-to-java calls: %10ld", count_calls_native_to_java);
+
/* now print other statistics ********************************************/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: statistics.h 7916 2007-05-18 14:24:21Z twisti $
+ $Id: statistics.h 8006 2007-06-05 07:40:49Z twisti $
*/
extern s4 size_lock_hashtable;
extern s4 size_lock_waiter;
+extern u8 count_calls_java_to_native;
+extern u8 count_calls_native_to_java;
+
extern int count_const_pool_len;
extern int count_classref_len;
extern int count_parsed_desc_len;
void mem_usagelog(bool givewarnings);
-void nativeinvokation(void);
void compiledinvokation(void);
void jnicallXmethodnvokation(void);
void jniinvokation(void);