DEBUG_JIT_COMPILEVERBOSE("Generating code done: ");
+#if !defined(NDEBUG) && defined(ENABLE_REPLACEMENT)
+ /* activate replacement points inside newly created code */
+
+ if (opt_TestReplacement)
+ replace_activate_replacement_points(code, false);
+#endif
+
#if !defined(NDEBUG)
#if defined(ENABLE_DEBUG_FILTER)
if (jd->m->filtermatches & SHOW_FILTER_FLAG_SHOW_METHOD)
int32_t opt_ProfileGCMemoryUsage = 0;
int32_t opt_ProfileMemoryUsage = 0;
FILE *opt_ProfileMemoryUsageGNUPlot = NULL;
+#if defined(ENABLE_REPLACEMENT)
+int opt_TestReplacement = 0;
+#endif
int32_t opt_ThreadStackSize = 0;
int32_t opt_TraceExceptions = 0;
int32_t opt_TraceJavaCalls = 0;
OPT_ProfileGCMemoryUsage,
OPT_ProfileMemoryUsage,
OPT_ProfileMemoryUsageGNUPlot,
+ OPT_TestReplacement,
OPT_ThreadStackSize,
OPT_TraceExceptions,
OPT_TraceJavaCalls,
{ "ProfileGCMemoryUsage", OPT_ProfileGCMemoryUsage, OPT_TYPE_VALUE, "profiles GC memory usage in the given interval, <value> is in seconds (default: 5)" },
{ "ProfileMemoryUsage", OPT_ProfileMemoryUsage, OPT_TYPE_VALUE, "TODO" },
{ "ProfileMemoryUsageGNUPlot", OPT_ProfileMemoryUsageGNUPlot, OPT_TYPE_VALUE, "TODO" },
+#if defined(ENABLE_REPLACEMENT)
+ { "TestReplacement" , OPT_TestReplacement, OPT_TYPE_BOOLEAN, "activate all replacement points during code generation" },
+#endif
{ "ThreadStackSize", OPT_ThreadStackSize, OPT_TYPE_VALUE, "TODO" },
{ "TraceExceptions", OPT_TraceExceptions, OPT_TYPE_BOOLEAN, "trace Exception throwing" },
{ "TraceJavaCalls", OPT_TraceJavaCalls, OPT_TYPE_BOOLEAN, "trace Java method calls" },
opt_ProfileMemoryUsageGNUPlot = file;
break;
+#if defined(ENABLE_REPLACEMENT)
+ case OPT_TestReplacement:
+ opt_TestReplacement = enable;
+ break;
+#endif
+
case OPT_ThreadStackSize:
/* currently ignored */
break;
opt_TraceJVMCalls = enable;
break;
- case OPT_TraceLinkClass:
- opt_TraceLinkClass = enable;
- break;
+ case OPT_TraceLinkClass:
+ opt_TraceLinkClass = enable;
+ break;
#if defined(ENABLE_REPLACEMENT)
case OPT_TraceReplacement: