Add an option to enable JIT trace profiling for app_process.
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index c322b17..63dc9e8 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -746,6 +746,15 @@
opt.optionString = "-Xincludeselectedmethod";
mOptions.add(opt);
}
+
+ /*
+ * Enable profile collection on JIT'ed code.
+ */
+ property_get("dalvik.vm.jit.profile", propBuf, "");
+ if (strlen(propBuf) > 0) {
+ opt.optionString = "-Xjitprofile";
+ mOptions.add(opt);
+ }
#endif
if (executionMode == kEMIntPortable) {