Home
last modified time | relevance | path

Searched refs:simpleperf (Results 1 – 25 of 236) sorted by relevance

12345678910

/aosp12/system/sepolicy/prebuilts/api/30.0/private/
H A Dsimpleperf.te1 # Domain used when running /system/bin/simpleperf to profile a specific app.
5 typeattribute simpleperf coredomain;
8 domain_auto_trans({ untrusted_app_all -runas_app }, simpleperf_exec, simpleperf)
10 # When running in this domain, simpleperf is scoped to profiling an individual
14 app_domain(simpleperf)
15 untrusted_app_domain(simpleperf)
19 allow simpleperf untrusted_app_all:process ptrace;
22 allow simpleperf self:perf_event { open read write kernel };
26 r_dir_file(simpleperf, untrusted_app_all)
32 dontaudit simpleperf domain:dir search;
[all …]
H A Drunas_app.te9 # when using run-as on a debuggable app. Used to run lldb/ndk-gdb/simpleperf,
13 # Allow lldb/ndk-gdb/simpleperf to read maps of debuggable app processes.
16 # Allow lldb/ndk-gdb/simpleperf to ptrace attach to debuggable app processes.
20 # Allow executing system image simpleperf without a domain transition.
23 # Suppress denial logspam when simpleperf is trying to find a matching process
/aosp12/system/sepolicy/prebuilts/api/31.0/private/
H A Dsimpleperf.te1 # Domain used when running /system/bin/simpleperf to profile a specific app.
5 typeattribute simpleperf coredomain;
8 domain_auto_trans({ untrusted_app_all -runas_app }, simpleperf_exec, simpleperf)
10 # When running in this domain, simpleperf is scoped to profiling an individual
14 app_domain(simpleperf)
15 untrusted_app_domain(simpleperf)
19 allow simpleperf untrusted_app_all:process ptrace;
22 allow simpleperf self:perf_event { open read write kernel };
26 r_dir_file(simpleperf, untrusted_app_all)
32 dontaudit simpleperf domain:dir search;
[all …]
H A Drunas_app.te9 # when using run-as on a debuggable app. Used to run lldb/ndk-gdb/simpleperf,
13 # Allow lldb/ndk-gdb/simpleperf to read maps of debuggable app processes.
16 # Allow lldb/ndk-gdb/simpleperf to ptrace attach to debuggable app processes.
20 # Allow executing system image simpleperf without a domain transition.
23 # Suppress denial logspam when simpleperf is trying to find a matching process
/aosp12/system/sepolicy/prebuilts/api/32.0/private/
H A Dsimpleperf.te1 # Domain used when running /system/bin/simpleperf to profile a specific app.
5 typeattribute simpleperf coredomain;
8 domain_auto_trans({ untrusted_app_all -runas_app }, simpleperf_exec, simpleperf)
10 # When running in this domain, simpleperf is scoped to profiling an individual
14 app_domain(simpleperf)
15 untrusted_app_domain(simpleperf)
19 allow simpleperf untrusted_app_all:process ptrace;
22 allow simpleperf self:perf_event { open read write kernel };
26 r_dir_file(simpleperf, untrusted_app_all)
32 dontaudit simpleperf domain:dir search;
[all …]
H A Drunas_app.te9 # when using run-as on a debuggable app. Used to run lldb/ndk-gdb/simpleperf,
13 # Allow lldb/ndk-gdb/simpleperf to read maps of debuggable app processes.
16 # Allow lldb/ndk-gdb/simpleperf to ptrace attach to debuggable app processes.
20 # Allow executing system image simpleperf without a domain transition.
23 # Suppress denial logspam when simpleperf is trying to find a matching process
/aosp12/system/sepolicy/private/
H A Dsimpleperf.te1 # Domain used when running /system/bin/simpleperf to profile a specific app.
5 typeattribute simpleperf coredomain;
8 domain_auto_trans({ untrusted_app_all -runas_app }, simpleperf_exec, simpleperf)
10 # When running in this domain, simpleperf is scoped to profiling an individual
14 app_domain(simpleperf)
15 untrusted_app_domain(simpleperf)
19 allow simpleperf untrusted_app_all:process ptrace;
22 allow simpleperf self:perf_event { open read write kernel };
26 r_dir_file(simpleperf, untrusted_app_all)
32 dontaudit simpleperf domain:dir search;
[all …]
H A Drunas_app.te9 # when using run-as on a debuggable app. Used to run lldb/ndk-gdb/simpleperf,
13 # Allow lldb/ndk-gdb/simpleperf to read maps of debuggable app processes.
16 # Allow lldb/ndk-gdb/simpleperf to ptrace attach to debuggable app processes.
20 # Allow executing system image simpleperf without a domain transition.
23 # Suppress denial logspam when simpleperf is trying to find a matching process
/aosp12/system/extras/simpleperf/doc/
H A Dexecutable_commands_reference.md7 - [How simpleperf works](#how-simpleperf-works)
34 ## How simpleperf works
85 $ simpleperf --help
99 $ simpleperf list
211 $ simpleperf stat ls
215 $ simpleperf stat --app com.example.simpleperf.simpleperfexamplewithnative
232 $ simpleperf stat ls
366 $ simpleperf record ls
411 $ simpleperf record ls
587 $ simpleperf report
[all …]
H A DREADME.md14 - [Simpleperf](#simpleperf)
17 - [Tools in simpleperf](#tools-in-simpleperf)
79 ## Tools in simpleperf
81 The simpleperf executables and Python scripts are located in simpleperf/ in ndk releases, and in
86 bin/android/${arch}/simpleperf: static simpleperf executables used on the device.
88 bin/${host}/${arch}/simpleperf: simpleperf executables used on the host, only supports reporting.
203 libraries on device, and ask simpleperf to use them when recording.
205 To use simpleperf directly:
211 # run simpleperf record with --symfs option.
250 2. Build simpleperf.
[all …]
H A Dandroid_platform_profiling.md7 - [Start simpleperf from system_server process](#start-simpleperf-from-system_server-process)
14 1. After running `adb root`, simpleperf can be used to profile any process or system wide.
15 2. It is recommended to use the latest simpleperf available in AOSP main, if you are not working
16 on the current main branch. Scripts are in `system/extras/simpleperf/scripts`, binaries are in
17 `system/extras/simpleperf/scripts/bin/android`.
35 # Doing recording with app_profiler.py or simpleperf on device, and generates perf.data on host.
47 ## Start simpleperf from system_server process
50 we can add code starting simpleperf at the point where the situation is detected.
52 1. Disable selinux by `adb shell setenforce 0`. Because selinux only allows simpleperf running
63 Runtime.getRuntime().exec("/system/bin/simpleperf record -g -p " + String.valueOf(Process.myPid())
[all …]
H A Dandroid_application_profiling.md49 adb will invoke simpleperf preinstalled in system image to profile the app.
119 On Android <= M, simpleperf doesn't support profiling Java code.
127 $ cd extras/simpleperf/demo
142 # Cd to the directory of simpleperf scripts. Record perf.data.
161 Cmdline: /data/data/com.example.simpleperf.simpleperfexamplewithnative/simpleperf record ...
194 $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative \
198 $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative \
254 $ simpleperf report-sample --protobuf --show-callchain -i perf.data -o perf.trace
285 # Start simpleperf recording, then start the Activity to profile.
290 # 2. Start simpleperf recording.
[all …]
H A Dscripts_reference.md28 $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative
31 $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative --compile_java_code
34 $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative -a .SleepActivity
47 $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative \
51 $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative \
55 $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative -o perf_custom.data
68 --app com.example.simpleperf.simpleperfexamplewithnative \
77 $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative -a .MainActivity
95 -p com.example.simpleperf.simpleperfexamplewithnative
129 This script pushes the simpleperf executable on the device, and run a simpleperf command on the
[all …]
H A Dinferno.md42 Inferno relies on simpleperf to record the callstack of a native application
45 `simpleperf` also symbolize all IPs automatically. The record are aggregated and
52 Open a terminal and from `simpleperf/scripts` directory type:
78 `simpleperf` to unwind the stack via the kernel and frame pointers. Try to
85 ` -fomit-frame-pointer` in your build config. Alternatively, ask simpleperf to
92 If simpleperf reports a lot of lost sample it is probably because you are
102 If you cannot run as root, make sure the app is debuggable otherwise simpleperf
/aosp12/system/sepolicy/prebuilts/api/28.0/public/
H A Dperfprofd.te19 # perfprofd checks for the existence of and then invokes simpleperf;
20 # simpleperf retains perfprofd domain after exec
45 # simpleperf reads kernel notes.
53 # simpleperf writes to perf_event_paranoid under /proc.
59 # simpleperf uses ioctl() to turn on kernel perf events measurements
62 # simpleperf needs to examine /proc to collect task/thread info
65 # simpleperf needs to access /proc/<pid>/exec
69 # simpleperf needs open/read any file that turns up in a profile
87 # simpleperf is going to execute "sleep"
89 # simpleperf is going to execute "mv" on a temp file
[all …]
/aosp12/system/sepolicy/prebuilts/api/29.0/public/
H A Dperfprofd.te19 # perfprofd checks for the existence of and then invokes simpleperf;
20 # simpleperf retains perfprofd domain after exec
45 # simpleperf reads kernel notes.
53 # simpleperf writes to perf_event_paranoid under /proc.
59 # simpleperf uses ioctl() to turn on kernel perf events measurements
62 # simpleperf needs to examine /proc to collect task/thread info
65 # simpleperf needs to access /proc/<pid>/exec
69 # simpleperf needs open/read any file that turns up in a profile
89 # simpleperf is going to execute "sleep"
91 # simpleperf is going to execute "mv" on a temp file
[all …]
/aosp12/system/extras/simpleperf/
H A DAndroid.bp294 // simpleperf shipped in system image
296 name: "simpleperf",
339 // simpleperf released in ndk
346 targets: ["simpleperf"],
368 dir: "simpleperf/android/arm",
378 dir: "simpleperf/android/x86",
388 dir: "simpleperf/darwin/x86",
405 dir: "simpleperf/linux/x86",
461 targets: ["simpleperf"],
479 dir: "simpleperf/darwin/x86",
[all …]
H A Dtest_util.cpp54 const simpleperf::EventType* type = simpleperf::FindEventTypeByName("instructions", false); in HasNonZeroInstructionEventCount()
86 const simpleperf::EventType* type = simpleperf::FindEventTypeByName("cpu-cycles", false); in HasHardwareCounter()
110 auto callback = [&](const simpleperf::EventType& event_type) { in HasPmuCounter()
117 simpleperf::EventTypeManager::Instance().ForEachType(callback); in HasPmuCounter()
H A DREADME.md3 This file is documentation for simpleperf maintainers.
8 To snap the aosp-simpleperf-release branch to ToT AOSP main and kick off a
11 and choose "aosp-simpleperf-release" from the "Branch" dropdown. Then click
18 update script from within the `system/extras/simpleperf` directory:
H A DAndroid.mk34 $(hide) $(SOONG_ZIP) -d -o $@ -C system/extras/simpleperf $(SIMPLEPERF_SCRIPT_LIST)
36 $(call dist-for-goals,simpleperf,$(SIMPLEPERF_SCRIPT_PATH):simpleperf/simpleperf_script.zip)
/aosp12/system/sepolicy/prebuilts/api/26.0/public/
H A Dperfprofd.te16 # perfprofd checks for the existence of and then invokes simpleperf;
17 # simpleperf retains perfprofd domain after exec
36 # simpleperf uses ioctl() to turn on kernel perf events measurements
39 # simpleperf needs to examine /proc to collect task/thread info
42 # simpleperf needs to access /proc/<pid>/exec
46 # simpleperf needs open/read any file that turns up in a profile
50 # simpleperf examines debugfs on startup to collect tracepoint event types
53 # simpleperf is going to execute "sleep"
56 # needed for simpleperf on some kernels
/aosp12/system/sepolicy/prebuilts/api/27.0/public/
H A Dperfprofd.te16 # perfprofd checks for the existence of and then invokes simpleperf;
17 # simpleperf retains perfprofd domain after exec
36 # simpleperf uses ioctl() to turn on kernel perf events measurements
39 # simpleperf needs to examine /proc to collect task/thread info
42 # simpleperf needs to access /proc/<pid>/exec
46 # simpleperf needs open/read any file that turns up in a profile
50 # simpleperf examines debugfs on startup to collect tracepoint event types
53 # simpleperf is going to execute "sleep"
56 # needed for simpleperf on some kernels
/aosp12/system/extras/simpleperf/demo/
H A DREADME.md1 # Examples of using simpleperf to profile Android applications
5 - [Examples of using simpleperf to profile Android applications](#examples-of-using-simpleperf-to-p…
16 … [here](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/doc/README.md).
18 This directory is to show examples of using simpleperf to profile Android applications. The
21 ../scripts/ -- contain simpleperf binaries and scripts.
32 $ cd extras/simpleperf/demo
66 $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplepurejava
98 $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative
130 $ python app_profiler.py -p com.example.simpleperf.simpleperfexampleofkotlin
169 $ adb shell am start simpleperf.demo.cpp_api/.MainActivity
[all …]
/aosp12/system/sepolicy/prebuilts/api/29.0/private/
H A Drunas_app.te9 # when using run-as on a debuggable app. Used to run lldb/ndk-gdb/simpleperf,
13 # Allow lldb/ndk-gdb/simpleperf to read maps of debuggable app processes.
16 # Allow lldb/ndk-gdb/simpleperf to ptrace attach to debuggable app processes.
/aosp12/system/extras/simpleperf/demo/JavaApi/app/src/main/java/simpleperf/demo/java_api/
H A DMainActivity.java17 package simpleperf.demo.java_api;
24 import com.android.simpleperf.ProfileSession;
25 import com.android.simpleperf.RecordOptions;

12345678910