• Home
Name Date Size #Lines LOC

..--

CtsSimpleperfTestCases_testdata/03-May-2024-

app_api/03-May-2024-1,274871

demo/03-May-2024-4,5973,703

doc/03-May-2024-32,99831,980

include/03-May-2024-12244

nonlinux_support/03-May-2024-13453

runtest/03-May-2024-1,180987

rust/03-May-2024-7941

scripts/03-May-2024-86,37383,335

simpleperf_app_runner/03-May-2024-312248

testdata/03-May-2024-50,74949,243

.clang-formatD03-May-2024239

.gitignoreD03-May-20245 11

Android.bpD03-May-202417.7 KiB755724

Android.mkD03-May-20241.3 KiB3915

CallChainJoiner.cppD03-May-202413.8 KiB428358

CallChainJoiner.hD03-May-20245.9 KiB182117

CallChainJoiner_test.cppD03-May-20249.9 KiB263213

ETMConstants.hD03-May-20241.1 KiB3110

ETMDecoder.cppD03-May-202434.6 KiB970779

ETMDecoder.hD03-May-20243 KiB8944

ETMRecorder.cppD03-May-20247.9 KiB267217

ETMRecorder.hD03-May-20242.4 KiB8445

IOEventLoop.cppD03-May-20246.9 KiB238188

IOEventLoop.hD03-May-20243.5 KiB10950

IOEventLoop_test.cppD03-May-20247.1 KiB295253

JITDebugReader.cppD03-May-202427.3 KiB755625

JITDebugReader.hD03-May-20249 KiB239157

JITDebugReader_impl.hD03-May-20242.4 KiB9363

JITDebugReader_test.cppD03-May-20241.5 KiB4418

MapRecordReader.cppD03-May-20245.4 KiB188149

MapRecordReader.hD03-May-20242.3 KiB7844

MapRecordReader_test.cppD03-May-20242.4 KiB8558

NOTICED03-May-202410.4 KiB191158

OWNERSD03-May-202489 43

OfflineUnwinder.cppD03-May-202413 KiB329262

OfflineUnwinder.hD03-May-20243.1 KiB8953

OfflineUnwinder_impl.hD03-May-20241.6 KiB5528

OfflineUnwinder_test.cppD03-May-20243.7 KiB11881

ProbeEvents.cppD03-May-20245 KiB164123

ProbeEvents.hD03-May-20241.6 KiB5525

ProbeEvents_test.cppD03-May-20241.8 KiB5226

README.mdD03-May-20242.7 KiB9165

RecordFilter.cppD03-May-202412.2 KiB404339

RecordFilter.hD03-May-20247 KiB146108

RecordFilter_test.cppD03-May-20249.6 KiB302236

RecordReadThread.cppD03-May-202423.4 KiB665572

RecordReadThread.hD03-May-20247.6 KiB220137

RecordReadThread_test.cppD03-May-202421.7 KiB571497

SampleComparator.hD03-May-20244.2 KiB12986

SampleDisplayer.hD03-May-202410 KiB303245

TEST_MAPPINGD03-May-202475 77

build_id.hD03-May-20243 KiB10866

callchain.hD03-May-20245.1 KiB158123

cmd_api.cppD03-May-20249.6 KiB303250

cmd_api_impl.hD03-May-20241.3 KiB3514

cmd_api_test.cppD03-May-20243 KiB10770

cmd_boot_record.cppD03-May-20246 KiB193152

cmd_boot_record_test.cppD03-May-20241.5 KiB4218

cmd_debug_unwind.cppD03-May-202427 KiB731634

cmd_debug_unwind_test.cppD03-May-20247.4 KiB181137

cmd_dumprecord.cppD03-May-202417.3 KiB521452

cmd_dumprecord_test.cppD03-May-20242.9 KiB8453

cmd_help.cppD03-May-20242.9 KiB9764

cmd_inject.cppD03-May-202432.7 KiB944787

cmd_inject_impl.hD03-May-2024868 287

cmd_inject_test.cppD03-May-20248.9 KiB235175

cmd_kmem.cppD03-May-202425.7 KiB688604

cmd_kmem_test.cppD03-May-20244.5 KiB145110

cmd_list.cppD03-May-20247.4 KiB221177

cmd_list_test.cppD03-May-20241.3 KiB5327

cmd_merge.cppD03-May-202414.5 KiB426360

cmd_merge_test.cppD03-May-20243.1 KiB9358

cmd_monitor.cppD03-May-202422.4 KiB626511

cmd_monitor_test.cppD03-May-20243.8 KiB139102

cmd_record.cppD03-May-202481.1 KiB2,1761,860

cmd_record_impl.hD03-May-20245.8 KiB10177

cmd_record_test.cppD03-May-202444.5 KiB1,2341,027

cmd_report.cppD03-May-202440.8 KiB1,058925

cmd_report_sample.cppD03-May-202435.1 KiB905808

cmd_report_sample.protoD03-May-20245.5 KiB149126

cmd_report_sample_test.cppD03-May-202412.1 KiB278214

cmd_report_test.cppD03-May-202424.6 KiB700601

cmd_stat.cppD03-May-202434.5 KiB965842

cmd_stat_impl.hD03-May-202412.9 KiB359289

cmd_stat_test.cppD03-May-202421.3 KiB614515

cmd_trace_sched.cppD03-May-202414.7 KiB422369

cmd_trace_sched_test.cppD03-May-20242 KiB6439

command.cppD03-May-20249.9 KiB306257

command.hD03-May-20247.2 KiB218165

command_test.cppD03-May-20247.6 KiB181136

cpu_hotplug_test.cppD03-May-202415.7 KiB504422

dso.cppD03-May-202432.5 KiB1,005836

dso.hD03-May-20247.9 KiB235156

dso_test.cppD03-May-202412.9 KiB325255

environment.cppD03-May-202431.3 KiB1,005836

environment.hD03-May-20244.7 KiB161108

environment_test.cppD03-May-20244.7 KiB139105

etm_branch_list.protoD03-May-20241.8 KiB6753

event_attr.cppD03-May-202410 KiB258196

event_attr.hD03-May-20241.7 KiB5223

event_fd.cppD03-May-202411.3 KiB334268

event_fd.hD03-May-20245.5 KiB16186

event_selection_set.cppD03-May-202429.3 KiB904767

event_selection_set.hD03-May-20247.9 KiB234154

event_type.cppD03-May-202417.5 KiB594497

event_type.hD03-May-20244.1 KiB13789

event_type_table.hD03-May-202433.1 KiB497491

generate_event_type_table.pyD03-May-202419.3 KiB306256

get_test_data.hD03-May-20247 KiB15056

gtest_main.cppD03-May-20243.4 KiB12885

kallsyms.cppD03-May-20248.4 KiB284218

kallsyms.hD03-May-20241.8 KiB6021

kallsyms_test.cppD03-May-20243.8 KiB12287

libsimpleperf_report_fuzzer.cppD03-May-2024555 2117

main.cppD03-May-20243.2 KiB8144

perf_event.hD03-May-2024950 3111

perf_regs.cppD03-May-20246.5 KiB229189

perf_regs.hD03-May-20242.5 KiB10067

perf_regs_test.cppD03-May-20241.1 KiB3818

profcollect.cppD03-May-20242.4 KiB7449

read_apk.cppD03-May-20246 KiB172129

read_apk.hD03-May-20243.4 KiB9550

read_apk_test.cppD03-May-20243.4 KiB8357

read_dex_file.cppD03-May-20243.4 KiB9367

read_dex_file.hD03-May-20241.5 KiB4722

read_dex_file_test.cppD03-May-20241.4 KiB4422

read_elf.cppD03-May-202419.4 KiB572488

read_elf.hD03-May-20243.6 KiB11875

read_elf_test.cppD03-May-20248.8 KiB260206

read_symbol_map.cppD03-May-20242.5 KiB10971

read_symbol_map.hD03-May-20241.1 KiB3915

read_symbol_map_test.cppD03-May-20241.6 KiB5730

record.cppD03-May-202456.7 KiB1,6831,547

record.hD03-May-202419.8 KiB696506

record_equal_test.hD03-May-20244.5 KiB11693

record_file.hD03-May-20248.9 KiB259171

record_file.protoD03-May-20241.4 KiB6150

record_file_format.hD03-May-20243.5 KiB15159

record_file_reader.cppD03-May-202424.2 KiB790721

record_file_test.cppD03-May-20249.3 KiB257189

record_file_writer.cppD03-May-202415.6 KiB518438

record_lib_interface.cppD03-May-20247.7 KiB298242

record_lib_test.cppD03-May-20245.3 KiB144118

record_test.cppD03-May-20247.3 KiB181145

report_lib_interface.cppD03-May-202422.5 KiB693581

report_utils.cppD03-May-20249.7 KiB252201

report_utils.hD03-May-20243 KiB9154

report_utils_test.cppD03-May-202418.6 KiB416341

sample_tree.hD03-May-202412 KiB351267

sample_tree_test.cppD03-May-20248.3 KiB234190

simpleperf.rcD03-May-2024212 42

test_util.cppD03-May-20244.2 KiB13096

test_util.hD03-May-20247.4 KiB198156

thread_tree.cppD03-May-202413.6 KiB421346

thread_tree.hD03-May-20246.1 KiB175116

thread_tree_test.cppD03-May-20244.4 KiB146102

tracing.cppD03-May-202418.9 KiB641543

tracing.hD03-May-20243.5 KiB12887

tracing_test.cppD03-May-20244.3 KiB10373

utils.cppD03-May-202411.6 KiB436373

utils.hD03-May-20245.9 KiB206144

utils_test.cppD03-May-20243.1 KiB9265

workload.cppD03-May-20246.8 KiB230188

workload.hD03-May-20242.4 KiB8046

workload_test.cppD03-May-20242.4 KiB7951

README.md

1# Simpleperf
2
3This file is documentation for simpleperf maintainers.
4There is also [user documentation](doc/README.md).
5
6## Building new prebuilts
7
8To snap the aosp-simpleperf-release branch to ToT AOSP main and kick off a
9build, use [this coastguard
10page](https://android-build.googleplex.com/coastguard/dashboard/5938649007521792/#/request/create)
11and choose "aosp-simpleperf-release" from the "Branch" dropdown. Then click
12"Submit build requests". You'll get emails keeping you up to date with the
13progress of the snap and the build.
14
15## Updating the prebuilts
16
17Once you have the build id (a 7-digit number) and the build is complete, run the
18update script from within the `system/extras/simpleperf` directory:
19```
20$ ./scripts/update.py --build 1234567
21```
22
23This will create a new change that you can `repo upload`, then approve and
24submit as normal.
25
26For testing, I usually only run python host tests as below:
27```
28$ ./scripts/test/test.py --only-host-test
29```
30
31To test all scripts, please use python 3.8+ and install below packages:
32```
33$ pip install bokeh jinja2 pandas protobuf textable
34```
35
36## Updating the prebuilts in prebuilts/simpleperf
37
38Download ndk branch.
39```
40$ repo init -u persistent-https://android.git.corp.google.com/platform/manifest -b master-ndk
41$ repo sync
42```
43
44In prebuilts/simpleperf, run `update.py`:
45```
46$ ./update.py --build <bid>
47```
48
49Then manually edit `ChangeLog`.
50This will create a new change that you can `repo upload`, then approve and submit as normal.
51
52For testing, we need to test if the scripts run on darwin/linux/windows for different android
53versions. I usually split it to four parts:
54
551. Test on android emulators running on linux x86_64 host, for android version N/O/P/Q/R/S/current.
56
57```
58$ ./test/test.py -d <devices> -r 3
59```
60
61The scripts support android >= N. But it's easier to test old versions on emulators. So I only test
62android N on emulators.
63
64Currently, the tests have problems in clean up. So tests on emulator may fail and take too long to
65run. And there are a few known failed cases. Hopefully they will be fixed soon.
66
671. Test on android devices connected to linux x86_64 host, for android version O/P/Q/R/S/current.
68
69```
70$ ./test/test.py -d <devices> -r 3
71```
72
733. Test on an android device connected to darwin x86_64 host, for one of android version O/P/Q/R/S/current.
74
75```
76$ ./test/test.py -d <devices> -r 1
77```
78
794. Test on an android device connected to darwin x86_64 host, for one of android version O/P/Q/R/S/current.
80
81```
82$ ./test/test.py -d <devices> -r 1
83```
84
85To check simpleperf contents released in ndk, we can build ndk package.
86```
87$ <top_dir>/ndk/checkbuild.py --package --system linux --module simpleperf
88```
89
90The ndk package is generated in `out/` directory.
91