summaryrefslogtreecommitdiff
path: root/simpleperf/scripts/app_profiler.config
blob: 9102cf0c92c467fd6cf67f03e21ef010f6bc4a48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# 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