57 lines
2 KiB
Text
57 lines
2 KiB
Text
# 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 = ""
|
|
|
|
|
|
# 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 = ''
|
|
|
|
|
|
# Profiling record options that will be passed directly to `simpleperf record` command on device.
|
|
# You can set how long to profile using "--duration" option, or use Ctrl-C to stop profiling.
|
|
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"
|
|
|
|
|
|
# Collect binaries used in profiling data from device to binary_cache directory.
|
|
# It can be used to annotate source code.
|
|
collect_binaries = True
|