blob: 63dbd962468612e1c3d41399a92fa97a4db13409 [file] [log] [blame]
# This configuration is written in python and used by app_profiler.py.
import os
import os.path
# The name of the android package, like com.example.android.
app_package_name = "com.example.android"
# Path of android studio project. It is used to find debug version of native shared libraries.
# Set to "" if not available.
android_studio_project_dir = ""
# Path to find debug version of native shared libraries.
native_lib_dir = ""
if android_studio_project_dir and not native_lib_dir:
tmp_dir = os.path.join(android_studio_project_dir,
"app/build/intermediates/binaries/debug".replace('/', os.sep))
if os.path.isdir(tmp_dir):
native_lib_dir = tmp_dir
# The path of the apk file. It is used when we need to reinstall the app to
# fully compile dalvik bytecode into native instructions.
# Set to "" if not available.
apk_file_path = ""
# To profile java code, we need to compile dalvik bytecode into native binaries
# with debug information. Set to False if there is no need to do so (For example,
# when the app has been recompiled.).
recompile_app = True
# If launch_activity is specified, we use `am start -n [app_package_name]/[launch_activity]` to start the app.
launch_activity = '.MainActivity'
# If launch_activity is not set, and launch_inst_test is, we launch an instrumentation test:
# `am instrument -e class [launch_inst_test] [app_package_name]/android.support.test.runner.AndroidJUnitRunner`
# Generally, will be of the form 'com.example.MyTestClass#myTestMethod'
launch_inst_test = ''
if recompile_app and not launch_activity and not launch_inst_test:
raise Exception('one of [launch_activity or launch_inst_test] is'
+ 'needed for [recompile_app] to take effect.')
# Profiling record options that will be passed directly to `simpleperf record` command on device.
# As we can't stop profiling by Ctrl-C, we need to set how long to profile using "--duration".
record_options = "-e cpu-cycles:u -f 4000 -g --duration 10"
# The path to store generated perf.data on host.
perf_data_path = "perf.data"
# The path of adb.
adb_path = "adb"
# The path of readelf, used to read build id of files in binary cache.
# Set to "" if not available.
readelf_path = "readelf"
# binary_cache_dir is used to cache binaries pulled from device. To report precisely, we pull each
# binary hit by perf.data on host.
binary_cache_dir = "binary_cache"