/* debug macros ***************************************************************/
#if !defined(NDEBUG)
-#define DEBUG_JIT_COMPILEVERBOSE(x) \
- do { \
- if (compileverbose) { \
- log_message_method(x, m); \
- } \
+#define DEBUG_JIT_COMPILEVERBOSE(x) \
+ do { \
+ if (compileverbose) { \
+ log_message_method(x, m); \
+ } \
} while (0)
#else
#define DEBUG_JIT_COMPILEVERBOSE(x) /* nothing */
#endif
-
+#if !defined(NDEBUG)
+# define TRACECOMPILERCALLS() \
+ do { \
+ if (opt_TraceCompilerCalls) { \
+ log_start(); \
+ log_print("[JIT compiler started: method="); \
+ method_print(m); \
+ log_print("]"); \
+ log_finish(); \
+ } \
+ } while (0)
+#else
+# define TRACECOMPILERCALLS()
+#endif
+
+
/* the ICMD table ************************************************************/
#if !defined(NDEBUG)
return m->code->entrypoint;
}
+ TRACECOMPILERCALLS();
+
STATISTICS(count_methods++);
#if defined(ENABLE_STATISTICS)
code = jd->code;
cd = jd->cd;
- /* print log message for compiled method */
-
- DEBUG_JIT_COMPILEVERBOSE("Compiling: ");
-
#if defined(ENABLE_DEBUG_FILTER)
show_filters_apply(jd->m);
#endif
}
#endif
- DEBUG_JIT_COMPILEVERBOSE("Compiling done: ");
-
/* switch to the newly generated code */
assert(code);
int opt_TestReplacement = 0;
#endif
int32_t opt_ThreadStackSize = 0;
+int opt_TraceCompilerCalls = 0;
int32_t opt_TraceExceptions = 0;
int32_t opt_TraceJavaCalls = 0;
int32_t opt_TraceJNICalls = 0;
OPT_ProfileMemoryUsageGNUPlot,
OPT_TestReplacement,
OPT_ThreadStackSize,
+ OPT_TraceCompilerCalls,
OPT_TraceExceptions,
OPT_TraceJavaCalls,
OPT_TraceJNICalls,
{ "TestReplacement" , OPT_TestReplacement, OPT_TYPE_BOOLEAN, "activate all replacement points during code generation" },
#endif
{ "ThreadStackSize", OPT_ThreadStackSize, OPT_TYPE_VALUE, "TODO" },
+ { "TraceCompilerCalls", OPT_TraceCompilerCalls, OPT_TYPE_BOOLEAN, "trace JIT compiler calls" },
{ "TraceExceptions", OPT_TraceExceptions, OPT_TYPE_BOOLEAN, "trace Exception throwing" },
{ "TraceJavaCalls", OPT_TraceJavaCalls, OPT_TYPE_BOOLEAN, "trace Java method calls" },
{ "TraceJNICalls", OPT_TraceJNICalls, OPT_TYPE_BOOLEAN, "trace JNI method calls" },
/* currently ignored */
break;
+ case OPT_TraceCompilerCalls:
+ opt_TraceCompilerCalls = enable;
+ break;
+
case OPT_TraceExceptions:
opt_TraceExceptions = enable;
break;
extern int opt_TestReplacement;
#endif
extern int32_t opt_ThreadStackSize;
+extern int opt_TraceCompilerCalls;
extern int32_t opt_TraceExceptions;
extern int32_t opt_TraceJavaCalls;
extern int32_t opt_TraceJNICalls;