Home
last modified time | relevance | path

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

123456

/system/sepolicy/private/
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
12 # consistent if simpleperf is marked as an app domain as well (as, for example,
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)
[all …]
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
/system/sepolicy/prebuilts/api/30.0/private/
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
12 # consistent if simpleperf is marked as an app domain as well (as, for example,
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)
[all …]
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
/system/sepolicy/prebuilts/api/26.0/public/
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
/system/sepolicy/prebuilts/api/27.0/public/
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
/system/extras/simpleperf/doc/
Dexecutable_commands_reference.md7 - [How simpleperf works](#how-simpleperf-works)
34 ## How simpleperf works
42 exposes all events to userspace via the perf_event_open system call, which is used by simpleperf.
48 1. Given user options, simpleperf enables profiling by making a system call to the kernel.
50 3. After profiling, simpleperf reads counters from the kernel, and reports a counter summary.
53 1. Given user options, simpleperf enables profiling by making a system call to the kernel.
54 2. Simpleperf creates mapped buffers between simpleperf and the kernel.
68 The debug-unwind command: debug/test dwarf based offline unwinding, used for debugging simpleperf.
69 The dump command: dumps content in perf.data, used for debugging simpleperf.
76 simpleperf in Android Studio.
[all …]
DREADME.md5 profile both Java and C++ code on Android. The simpleperf executable can run on Android >=L,
9 …ource code is [here](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/).
10 … [here](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/doc/README.md).
14 - [Simpleperf](#simpleperf)
17 - [Tools in simpleperf](#tools-in-simpleperf)
33 Simpleperf contains two parts: the simpleperf executable and Python scripts.
35 The simpleperf executable works similar to linux-tools-perf, but has some specific features for
39 report on the host", simpleperf not only collects samples in profiling data, but also collects
43 a. When recording dwarf based call graph, simpleperf unwinds the stack before writing a sample
59 simpleperf executables can be pushed on any Android device and used to record profiling data.
[all …]
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 …]
Dandroid_application_profiling.md4 …[Here](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/demo/README.md).
36 enables JNI checks and may not optimize C/C++ code. It can be profiled by simpleperf without any
43 with android::debuggable set to true can be profiled. So simpleperf can only profile a release
48 a released app profileable by preinstalled profiling tools. In this case, simpleperf downloaded by
49 adb will invoke simpleperf preinstalled in system image to profile the app.
109 On Android >= P, simpleperf supports profiling Java code, no matter whether it is executed by
112 On Android O, simpleperf supports profiling Java code which is compiled into native instructions,
116 On Android N, simpleperf supports profiling Java code that is compiled into native instructions.
119 On Android <= M, simpleperf doesn't support profiling Java code.
122 …tive](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/demo/SimpleperfE…
[all …]
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
/system/sepolicy/prebuilts/api/29.0/public/
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
82 # simpleperf will set security.perf_harden to enable access to perf_event_open()
85 # simpleperf examines debugfs on startup to collect tracepoint event types
[all …]
/system/sepolicy/prebuilts/api/28.0/public/
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
80 # simpleperf will set security.perf_harden to enable access to perf_event_open()
83 # simpleperf examines debugfs on startup to collect tracepoint event types
[all …]
/system/extras/simpleperf/
DAndroid.bp319 // simpleperf shipped in system image
321 name: "simpleperf",
352 // simpleperf released in ndk
359 targets: ["simpleperf"],
381 dir: "simpleperf/android/arm",
386 dir: "simpleperf/android/arm64",
391 dir: "simpleperf/android/x86",
396 dir: "simpleperf/android/x86_64",
401 dir: "simpleperf/darwin/x86",
406 dir: "simpleperf/darwin/x86_64",
[all …]
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:
DAndroid.mk46 $(hide) $(SOONG_ZIP) -d -o $@ -C system/extras/simpleperf $(SIMPLEPERF_SCRIPT_LIST)
48 $(call dist-for-goals,simpleperf,$(SIMPLEPERF_SCRIPT_PATH):simpleperf/simpleperf_script.zip)
Dcmd_help.cpp25 using namespace simpleperf;
89 namespace simpleperf { namespace
Dthread_tree.h36 namespace simpleperf {
171 using MapEntry = simpleperf::MapEntry;
172 using ThreadEntry = simpleperf::ThreadEntry;
173 using ThreadTree = simpleperf::ThreadTree;
/system/extras/simpleperf/demo/
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).
17 …here](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/doc/README.md#An…
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
[all …]
/system/sepolicy/prebuilts/api/29.0/private/
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.
/system/extras/simpleperf/demo/JavaApi/app/src/main/java/simpleperf/demo/java_api/
DMainActivity.java17 package simpleperf.demo.java_api;
24 import com.android.simpleperf.ProfileSession;
25 import com.android.simpleperf.RecordOptions;
/system/extras/profcollectd/libprofcollectd/
Dsimpleperf_etm_provider.cpp60 return simpleperf::etm::HasSupport(); in IsSupported()
72 return simpleperf::etm::Record(outputFile, samplingPeriod); in Trace()
86 bool success = simpleperf::etm::Inject(traceFile, binaryOutput, binaryFilter); in Process()
/system/extras/simpleperf/demo/JavaApi/app/
Dbuild.gradle6 applicationId "simpleperf.demo.java_api"
8 …// https://android.googlesource.com/platform/system/extras/+/master/simpleperf/doc/README.md#prepa…
/system/extras/simpleperf/demo/CppApi/app/
Dbuild.gradle6 applicationId "simpleperf.demo.cpp_api"
8 …// (https://android.googlesource.com/platform/system/extras/+/master/simpleperf/doc/README.md#why-…
/system/extras/simpleperf/demo/CppApi/app/src/main/cpp/
Dnative-lib.cpp34 simpleperf::RecordOptions options; in ProfileThreadFunc()
36 simpleperf::ProfileSession session; in ProfileThreadFunc()

123456