Age | Commit message (Collapse) | Author |
|
Add extra info in etm_branch_list.proto to decode kernel etm data.
Bug: 183135316
Test: run simpleperf_unit_test
Change-Id: I165d28c4e0f3a26c09741238336949bcff3902ca
|
|
1. Refactor KernelDso class to handle kernel address randomization.
2. Add Dso::IpToFileOffset() to convert ip addresses to file offsets,
and use special operation for KernelDso.
3. Search for vmlinux in symbol dirs.
4. Delay creating KernelDso to use the kernel build id in recording
files.
Bug: 172933381
Test: run simpleperf_unit_test
Test: run `simpleperf inject` manually to inject kernel etm data.
Change-Id: Ice7f465a6f1e870740cc8ceaf8da76220026adef
|
|
Add --addr-filter to use all filter functions provided by
the kernel and etm hardware. It supports:
1) starting/stopping tracing at selected instruction addresses.
2) only tracing instructions in selected addr ranges.
3) Both vaddrs in ELF files and kernel addrs can be used.
Bug: 161181704
Test: run simpleperf_unit_test.
Change-Id: Ie503fd0c35634a1bc006b67cc7a8faa64d58a421
|
|
Bug: 160187327
Test: run simpleperf_unit_test.
Change-Id: I913baff454ba01be9689712a61a970ffe04416fe
|
|
Bug: 160187327
Test: run simpleperf_unit_test.
Change-Id: I01947eb03847cb3c5a93c7a06abb6d203f750a23
|
|
Bug: 160187327
Test: run simpleperf_unit_test.
Change-Id: Idd50cf755f10000e3629ec99a291ee35cf6f4cfd
|
|
This is to keep file mapping memory buffer. And support reading
more than one content in one open instance in the future.
It also supports embedded elf files in apks as normal elf files.
Bug: 151665001
Test: run simpleperf_unit_test.
Change-Id: Ia424926d112cbcd9970f11ffa56d047ff6df7872
|
|
Bug: none
Test: run simpleperf_unit_test.
Change-Id: I13c1e926d21897090103741744a7613b3f844c6a
|
|
Apps may run with libraries with multiple executable segments.
Symbolization ip addresses in these libraries need to use map.pgoff.
The old formula converting ip to vaddr_in_file:
vaddr_in_file = ip - map.start + min_executable_vaddr
The new formula converting ip to vaddr_in_file:
offset_in_file = ip - map.start + map.pgoff
vaddr_in_file = offset_in_file - file_offset_of_min_executable_vaddr
+ min_executable_vaddr
Bug: 124056476
Test: run simpleperf_unit_test.
Test: use simpleperf to profile facebook app, ip addresses hitting libc.so
Test: and libart.so are symbolized correctly.
Change-Id: I5fd3ed822a916c4d04a9868d6d209c43ee190c5b
|
|
Test: compile
Bug: 119313545
Change-Id: I664fb32522d01909c603d7b903475c4e9aea9223
|
|
1. Remove GetBuildIdFromApkFile and ParseSymbolsFromApkFile, because
their function can be supported using ApkInspector::FindElfInApkByName
and read_elf.h.
2. Remove ApkInspector::FindOffsetInApkByName, instead the caller can
use ApkInspector::FindElfInApkByName directly.
3. In ApkInspector::embedded_elf_cache_, add map for entry_name. So
the EmbeddedElfs added by cmd_record.cpp can be used by OfflineUnwinder.
Also support reading min executable virtual address from embedded elfs
in ElfDso.
Also avoid segfault reading build id of elf files with broken section
table, and add test.
Bug: none.
Test: run simpleperf_unit_test.
Change-Id: I2e4f51a5e348138cbf7445ec6dd42dbd6ae1b03d
|
|
Some applications ship elf files with broken section tables.
This crashes simpleperf when it tries to read symbols from the
broken elf files while doing system wide profiling.
So fix it by checking existence of symbol sections before reading
symbols.
Bug: None.
Test: simpleperf_unit_test.
Change-Id: If581cd2d83df55f1cadc253222d5d8242ebddafd
|
|
1. It is reported that when elf section headers are malformed,
GetBuildIdFromNoteSection() aborts with SIGBUS. So fix it to
accept not 4 bytes aligned section data.
2. Fix potential unaligned memory access in ConvertBytesToValue().
Test: run simpleperf_unit_test.
Change-Id: I2e1612a6567978e0b526b2274377765ba2837ec2
|
|
file.
Change return type of read elf functions to ElfStatus, and print warning message
based on situation.
Add corresponding test.
Bug: 29193936
Change-Id: Ie449f8be34cb579962cb73f4be3df9e4997270ca
Test: run simpleperf_unit_test.
|
|
This avoid reporting unknown symbols when there are samples in .plt section.
Bug: 28911532
Test: run simpleperf_unit_test.
Change-Id: I62cb08776c99951ff845e98f0f601859d25ece5c
|
|
As in https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html,
elf files can store mini debug information in .gnu_debugdata.
Bug: 27744639
Change-Id: If4a53a4a1332824388ee309ac63a008dc5cf8d5c
|
|
And fix one build_id bug introduced by previous patch.
Bug: 26962895
Change-Id: Ibb8bd6ec77ee862bb01c26342d3b3024468e75b2
|
|
Changes included:
1. provide interface in read_apk.h to read build id and symbols.
2. report symbols of native libraries in apk file.
3. refactor code in read_elf.cpp and read_apk.cpp.
4. add verbose log.
5. add -o report_file_name option for report command.
6. add corresponding unit tests.
Bug: 26962895
Change-Id: I0d5398996e0c29dba4a6f5226692b758ca096bbd
|
|
Also make following small changes:
1. Manage testdata files like libziparchive.
2. Replace StringToPid() with android::base::ParseInt().
3. Add tests in read_elf_test.
Bug: 26962895
Change-Id: I6603e9f3cea3a013e2618ea003790d102739f843
|
|
Reading invalid file paths can cause troubles. For example,
reading /dev/zero can eat all memory.
Bug: 25194400
Change-Id: I4de17f4f9200a43b50a4efe4c42a6fd9eaec1ba6
|
|
1. refactor BuildId type.
2. check build id before parsing symbols in report command.
Bug: 22179177
Change-Id: Iefc797a88d4a168e109db786105120c8d6914369
|
|
Also remove the use of <elf.h> because of its conflicts with llvm.
Bug: 19483574
Change-Id: I2cc6fcb3429aa986101e214dc39fabd920f254dd
|
|
Also fix the storage of ProcessEntry.
Bug: 19483574
Change-Id: I2182a804f6ecbd28e7aa3c1a38a6f19b86f583c9
|