diff options
| author | 2014-05-30 23:44:11 +0100 | |
|---|---|---|
| committer | 2014-06-06 12:14:01 +0100 | |
| commit | c1b643cc6ac45dbd0eabdcd7425c7e86006c27d6 (patch) | |
| tree | 250455427da979409a075a2b3197bd43ccd40fe1 /runtime/native/dalvik_system_VMRuntime.cc | |
| parent | bb0b53f58f11c628f077603b56077dfed1a18f11 (diff) | |
Fixed and refactored profiler options handling
- extracted profiler options in a separate class
- switched from system property reading to command line arguments
- added profile based compilation options to CompilerOptions
- removed no longer used kProfile compilation filter
- optimize dex files only if the profiler is enabled
- clean up unused arguments
Bug: 12877748
Bug: 15275634
Change-Id: I37ff68e7694370950ce8db2360562e9058ecebb7
Diffstat (limited to 'runtime/native/dalvik_system_VMRuntime.cc')
| -rw-r--r-- | runtime/native/dalvik_system_VMRuntime.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/runtime/native/dalvik_system_VMRuntime.cc b/runtime/native/dalvik_system_VMRuntime.cc index e5cc6716a4..63d7c7754c 100644 --- a/runtime/native/dalvik_system_VMRuntime.cc +++ b/runtime/native/dalvik_system_VMRuntime.cc @@ -510,15 +510,13 @@ static void VMRuntime_preloadDexCaches(JNIEnv* env, jobject) { * process name. We use this information to start up the sampling profiler for * for ART. */ -static void VMRuntime_registerAppInfo(JNIEnv* env, jclass, jstring pkgName, jstring appDir, jstring procName) { +static void VMRuntime_registerAppInfo(JNIEnv* env, jclass, jstring pkgName, + jstring appDir, jstring procName) { const char *pkgNameChars = env->GetStringUTFChars(pkgName, NULL); - const char *appDirChars = env->GetStringUTFChars(appDir, NULL); - const char *procNameChars = env->GetStringUTFChars(procName, NULL); - std::string profileFile = StringPrintf("/data/dalvik-cache/profiles/%s", pkgNameChars); - Runtime::Current()->StartProfiler(profileFile.c_str(), procNameChars); - env->ReleaseStringUTFChars(appDir, appDirChars); - env->ReleaseStringUTFChars(procName, procNameChars); + + Runtime::Current()->StartProfiler(profileFile.c_str()); + env->ReleaseStringUTFChars(pkgName, pkgNameChars); } |