Age | Commit message (Collapse) | Author |
|
After change in aosp/3086621, addrs are changed when base_addr != 0.
But they are still used to search in binary.range_count_map. This
causes segfault error.
Fix it by putting count values in the vector.
Bug: 322399357
Test: run simpleperf_unit_test
Test: run simpleperf manually
Change-Id: I6f02f32288b870a4f758e1c8e28fec4b6e567467
|
|
When converting ETM data for the kernel, the check
"CHECK_GE(vaddr, first_load_segment_addr)" may fail.
It happens when the ETM data asks the decoder to decode
.word data at the end of functions as instructions.
Not sure why this can happen (maybe because of garbage
ETM data caused by overflow), but we don't need to
abort in this situation. Instead, ignore the invalid
data.
Bug: 322399357
Test: run simpleperf_unit_test
Change-Id: Id42a9d84b610bba9003d899efc8fd6ceb39542f9
|
|
options.PullUintValue() returns true even when --etm-flush-interval
isn't used. In this case, interval is still set to etm_flush_interval_,
which makes it 0.
Bug: 336375740
Test: run simpleperf manually
Change-Id: I95fafcf24b9ae821d8b19782813c7b2f312bf317
|
|
Add --etm-flush-interval to adjust the interval between ETM data
flushes. So we can use smaller interval when needed.
Bug: 336375740
Test: run simpleperf_unit_test
Change-Id: I1e6805446fa08ee85e9b4033ff827709c34ae530
|
|
* changes:
simpleperf: Delay processing ETM data until the buffer is half full
simpleperf: Rotate the last cpu disabling ETM events
simpleperf: Flush ETM data at the end of recording
simpleperf: Enable ETM events after create aux buffer
|
|
When using --decode-etm, the main thread is busy processing ETM data
and can miss flushing ETM data. To fix this, we can delay processing
ETM data after recording.
This patch triggers ETM data processing when the buffer is at least
half full. In the default configuration, the buffer is large enough
to hold ETM data for several seconds. So effectively, this delays
processing ETM data after recording.
Bug: 336375740
Test: run simpleperf_unit_test
Change-Id: Ib892aeea402773b1cab785f2c14886bb9f96d851
|
|
When using ETR, ETM data is flushed to the aux buffer of the last
cpu disabling ETM events. To avoid overflowing the aux buffer for
one cpu, rotate the last cpu disabling ETM events.
Bug: 336375740
Test: run simpleperf manually
Change-Id: I1b5f2b85935513a3485d84fe0b850b8223ad03b4
|
|
So we can get the last ETM data generated during recording.
Bug: 336375740
Test: run simpleperf manually
Change-Id: I449517fb959e4f8310cd1fc582e2182552d0353d
|
|
Otherwise, ETM events can't be enabled successfully.
Bug: 336375740
Test: run simpleperf manually
Change-Id: I6583aebced57d739f98769cc39dab862569ec8ad
|
|
Update the document to align with recent changes in
AutoFDO on GitHub and the method for adding profiles
to toolchain/pgo-profiles.
Bug: 337338041
Test: none
Change-Id: Ic03b512eadf9b31a77ee564c0167451d44ce814f
|
|
|
|
* changes:
simpleperf: Check sched:sched_switch event in HasTracepointEvents
simpleperf: Handle empty string in TracepointStringFinder
simpleperf: skip checking tracepoint events in the list cmd
|
|
When recording ETM traces with cycle counting, mark the bit that
indicates this in the config register. Without this other software
might discard cycle count information.
Change-Id: I74182a1f48cd25c4b05ac67913c46f88fc0f3b26
|
|
Because all tracepoint events related tests need sched:sched_switch
to be available.
Bug: 328598190
Test: run simpleperf_unit_test
Change-Id: I6905e8b5a500aedf63e92d80976092868a40e618
|
|
Avoid crash when the kernel doesn't expose any tracepoint
events.
Bug: 328598190
Test: run simpleperf_unit_test
Change-Id: I194a387c3ff94e4b669b41432530c5452a10d3a5
|
|
When running in emulator, accessing some tracepoint events
may cause warnings in the kernel.
Bug: 328598190
Test: run simpleperf_unit_test
Change-Id: Ia80fac978530fd9ecca2175c515d40c25257ee87
|
|
into main
|
|
Bug: 328598190
Test: run CtsSimpleperfTestCases
Change-Id: Ic011c16aca7359aa9ecc6140a76d722959aeec83
|
|
right-align" into main
|
|
Bug: 332807560
Test: run report_html.py manually
Change-Id: Ie59e3ce2fcc86ac0c867bf5e1f514dab13f317f4
|
|
|
|
|
|
We are running to disassemble code.
This will help me repro it by running the command myself.
BUG=332769929
Change-Id: If5c833500d5da852623686bd5fdd35dd0f864001
|
|
Kernel modules may come from vendor_kernel_ramdisk.img, which isn't
accessed from userspace. Kernel module symbols are also available in
/proc/kallsyms, making read-failure warnings unnecessary.
So suppress warnings when kernel modules can't be read.
Also update kernel module search locations in environment.cpp for
consistency.
Bug: none
Test: run simpleperf_unit_test
Test: run simpleperf manually
Change-Id: I1345cc02582617a24e31908d8b67da884932b24e
|
|
Bug: 332623383
Test: report_html.py -h
Change-Id: Id2ee389c46db5c019004e20eb0b55d8bedebc324
|
|
Bug: 293651722
Test: none
Change-Id: I058e4f20df1da66d050d398cd4557821e374cc37
|
|
Allow user to specify a directory containing symbols instead of needing
a directory structure matching the dso path. This is useful for
specifying symbols for dynamic libraries included in APKs such as
libmonochrome_x64.so for chromium.
Bug: none
Test: `simpleperf report --lib DIR_WITH_SYMBOLS ...`
`simpleperf_unit_test`
Change-Id: Ifb1bef62899cfbe25594d1de4cf2f17574706926
|
|
Bug: 321061072
Test: run profcollectd
Change-Id: I41abdc2f7c8a83ebecaa4624bf4c8d0a8d3de988
|
|
|
|
Add --remove-method to remove methods with name containing
the given regular expressions. The removed methods will
not be shown in callchains.
Also fix TestProtoFileReportLib.test_set_trace_offcpu_mode.
Bug: 325429554
Test: run test/test.py --only-host-test
Change-Id: Idd1c8c0e98e058eadc1030b04be7e8f4409257f6
|
|
Taken from branch aosp-simpleperf-release.
Bug: 325429554
Test: run test.py --only-host-test
Change-Id: Id1dc2dc50e9285af4dd44ff0d93d4737f8cb7915
|
|
* changes:
simpleperf: support removing methods based on method name regex
simpleperf: refactor CallChainReportBuilder
|
|
In CallChainReportBuilder, support removing methods with name
containing the given regular expression. Export this function
in report_lib_interface.cpp.
Bug: 325429554
Test: run simpleperf_unit_test
Change-Id: I2b3cf4b536d44f865628de3ff2ab5db94b382949
|
|
Decouple CallChainReportBuilder functions into
modifier classes for improved extensibility.
Bug: 325429554
Test: run simpleperf_unit_test
Change-Id: I6a8a5b40f7459597adfeb106e77145983ac2bde1
|
|
On old Android versions (<= S), a profile may be generated
by simpleperf before aosp/1897156. It can't pass the check,
but actually is still reportable.
Bug: 325484390
Test: run test.py -p TestProtoFileReportLib*
Test: run report_html.py manually
Change-Id: Ide0e844fb835c98b06e773fc362be39e3b6cb142
|
|
Also report recording file when a trace-offcpu mode isn't supported.
Bug: 325484390
Test: run test/test.py -p TestProtoFileReportLib*
Test: run scripts manually
Change-Id: Ie4e0cda2621e5e9bf7c05137fe15b8625359c2dc
|
|
`simpleperf report-sample` converts perf.data into a profile in
cmd_report_sample.proto format. This CL supports reading the proto
file with different trace offcpu modes in scripts. It uses the same
logic as report_lib_interface.cpp in aosp/1896057.
Bug: 325484390
Test: run test.py -p TestProtoFileReportLib*
Change-Id: I6374fd62890c882cd3b09e6446b1b9f01bff2e4f
|
|
Taken from branch aosp-simpleperf-release.
Bug: 323599819
Test: run scripts/test/test.py --only-host-test
Change-Id: I5546117fd2be9f7c8ec3ce83ee5246eadbbb6f57
|
|
* changes:
simpleperf: report_html.py: disable sorting in ascending order for Total, Self, Samples
simpleperf: report_html.py: show 100 rows in sampleTable by default
|
|
Self, Samples
It's unlikely that users want to sort these columns in ascending order.
After disabling ascending order, when a user clicks one of these
columns, the column is always sorted in descending order.
Also sort these columns in descending order by default.
Bug: 322228090
Test: run report_html.py
Change-Id: I7b8a7a36f107ef6d935e71cbbd713426d4b1bec8
|
|
|
|
Bug: 322228003
Test: run report_html.py manually
Change-Id: I38829ec82c647c4d524a0c996cc31eabef39ff54
|
|
Currently, report_html.py decides how to disassemble functions by
checking how many functions need to be disassembled in a binary:
1) If not many, disassemble the functions one by one.
2) Otherwise, disassemble the whole binary.
However, the samples may hit many functions in a large binary (like
libmonochrome_64.so), while they only take a small percentage of
the binary. And the time used to disassemble the whole binary can
be longer than disassembling all other files.
To speed it up, we can split the large binary into multiple parts,
each taking 1M code size, and disassemble needed parts on different CPUs.
In an experiment disassembling chrome profile, the disassembling
time is reduced from 3 minutes to 2 minutes. The time is printed
by adding `--log debug`.
Also add `--disassemble-job-size` to adjust code split size.
Bug: 323271419
Test: run report_html.py manually
Test: run test.py --only-host-test
Change-Id: I6af546616cbca7e294956b610182757b679fcb04
|
|
|
|
It is to show sample distribution for each cpu:
1) Use cpu ids as thread names.
2) In each sample, add thread name + process name as the root
of the call stack.
Bug: 323605908
Test: run test.py --only-host-test
Change-Id: Ie6e363727069876d8093bedd93c37daeb0a76cf0
|
|
This CL is created as a best effort to migrate test targets to the new Android ownership model.
It is based on historical data from repository history and insights from git blame.
Given the nature of this effort, there may be instances of incorrect attribution. If you find incorrect or unnecessary
attribution in this CL, please create a new CL to fix that.
For detailed guidelines and further information on the migration please refer to the link below,
go/new-android-ownership-model
Bug: 304529413
Test: N/A
Change-Id: I4d1f107d18f767c06f88da57c1bd7dad2b1230a1
|
|
|
|
|
|
In case we found memory, but it was unsuitable for caching, set the
cached buffer's map to null, forcing us to take the slow path again.
Without this change, the buffer itself is set to null. However, the
fast path cannot tell if there was no memory found or we just did not
want to cache it. This can cause an address range to succeeded at
first, but fail on a second try.
As a test and a practical example, a binary that is smaller than a
page is added. In this case the memory found by ReadTargetMemory will
never be large enough to contain the whole mapping, preventing it from
being cached. Without this change, simpleperf inject generates almost
no output, with this change it generates the expected full output.
Test: simpleperf_unit_test
Change-Id: Ibc8d6bf6476b473b99fc787a1789344bda334ce3
|
|
The offset of the AuxTraceRecord comes from the kernel unmodified, but
its size is aligned and padded by simpleperf. This padding can cause
the offset of a record to be smaller than the previous
record's (offset + size), despite everything being correct.
Relax the check so that it does not add the size to the offset, and
only checks that the records are sorted by offset.
Test: simpleperf_unit_test
Change-Id: I5813010cf7f1843e469b4a477d7a5e937a1828ca
|