| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
If it's static in perfsymboltable.cpp's file scope, we cannot use it
from anywhere else.
Change-Id: I60ac203120b7c88feff2acb26b224a8761469bf8
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
| |
Change-Id: I66c034497e23d9a92d779c9ade85e51d49b71fa9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When available, report progress for ongoing debuginfod downloads.
This is useful as otherwise users might think the application has
stopped working and is frozen.
This only works with elfutils that contains the new
dwfl_get_debuginfod_client API, which is not yet released.
Change-Id: Iffce1b31f4245977c8aa624b6c852fdfa1840d4e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
When we parse perf data files with many processes, we would
continuously query whether the perf map file exists. QFile::exists
does not cache the result internally. In our scenario, it's enough
to just check the existence once and then be done with it. This
removes many stat syscalls for complex perf data files.
Change-Id: I452ea476cdcd7ac8ba3307c44f5fb70d17e73f10
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes C++ symbol names in some situations as shown by the changes
to the expected test data. Because the code to build the scope
names is complex, I added a longer comment in the hope that this
better explains the behavior and logic of this code.
The test e.g. now has this changed behavior:
```
- 201650 201700 /usr/include/c++/12.1.0/bits/shared_ptr_base.h:611:7 201650 dc std_Sp_counted_ptr_inplace<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<main(int, char**)::<lambda()> > >, double>, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>_M_dispose parallel_static_gcc /home/milian/projects/kdab/rnd/hotspot/3rdparty/perfparser/tests/manual/clients/parallel_static_gcc
+ 201650 201700 /usr/include/c++/12.1.0/bits/shared_ptr_base.h:611:7 201650 dc std::_Sp_counted_ptr_inplace<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<main(int, char**)::<lambda()> > >, double>, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose parallel_static_gcc /home/milian/projects/kdab/rnd/hotspot/3rdparty/perfparser/tests/manual/clients/parallel_static_gcc
```
Change-Id: Iaa82add2c878796890decb4365b3ca783b46f355
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a somewhat more elaborate example which uses multiple
threads, lambdas and std::async which has the tendency to stress
our dwarf debug symbol resolution code. More on that in a follow-up
patch. For now, this test only uncovered an issue in
PerfParserTestClient::convertToText, where we iterated over a QHash
to generate text output, which is not going to produce stable results.
Instead, we now convert to a stable QMap first and output that.
Furthermore, the test harness is updated to also allow us to test
never version than 0.5 that we got in the past, i.e. 0.6 is now
expected for the new data files I'm adding here.
Change-Id: I2de65503b2c853528b301166a5b58a406d34a059
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All files are now run through qCompress (manually) and then those
are tracked in git. When we run the test, the files are uncompressed
on the fly to let the rest of the code remain working as before.
The resulting folder is now only ~1.3MiB instead of ~5.2MiB before.
But obviously developers won't notice as the old data is still
included in our git history. But at least for new tests we can prevent
such pollutions and keep the gerrit bots happy.
Sadly we cannot resort to external tooling for the compression step,
so adding new files is a bit tedious but doable. And relying on
qCompress means we dont need any other new dependencies.
Change-Id: I902a6906f140eed2565df9637cb80cf464143b80
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes warning spam for perf features we simply don't support
yet. All of these are not really needed for us right now, so it's
pretty useless to spam the end user with these warnings, when we
devs know that they are harmless.
Examples on my machine:
```
feature not properly read PerfHeader::BPF_PROG_INFO 4 0
feature not properly read PerfHeader::BPF_BTF 4 0
feature not properly read PerfHeader::SAMPLE_TIME 16 0
feature not properly read PerfHeader::CACHE 8808 0
feature not properly read PerfHeader::MEM_TOPOLOGY 88 0
feature not properly read PerfHeader::CPU_TOPOLOGY 1252 892
feature not properly read PerfHeader::CPU_PMU_CAPS 140 0
unhandled event type 79 PERF_RECORD_TIME_CONV
unhandled event type 73 PERF_RECORD_THREAD_MAP
unhandled event type 74 PERF_RECORD_CPU_MAP
```
We keep the warning for those features that we do support. If we
don't read the full size of them, then something changed which
we want to be made aware of.
Change-Id: I0c6f564518788e6129be671551e84910c3cbf1d0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the old demangling errors apparently got fixed. Replace
the raw mangled names with the expected demangled names and
replace them in the actual text to let the tests pass on both,
modern and old systems.
Change-Id: Ibe4ce4237da859d915319c0e5ca1cdf0b0fc7b93
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
This makes the code more easily reusable and moves code that
belongs together logically into the same file.
Change-Id: Icce3a1ce4dc05f3a7cd9333fa7c88bd3a1b118ec
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Replace `void* arg` by explicit `PerfUnwind::UnwindInfo *unwindInfo`
instead of casting the void to that type internally.
Change-Id: I64a716f7f89ae75e1b21470a927441f07beb70c6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Instead, pass the thread callbacks to PerfSymbolTable::attachDwfl.
This way all the code relevant for unwinding is centralized in the
perfunwind file and not split across the symbol table and unwind
files.
Change-Id: I6f2dcecef0949aa6370b1e6a279132cfd5012830
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Move the code from perfsymboltable into perfdwarfdiecache. This
simplifies the perfsymboltable code and allows reuse of this generic
code.
Change-Id: Ibeebe2312d49095adad60f2924e1be8d74d82dfe
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
| |
Change-Id: I285127ea9abd41f0aa50333e49ad4174d973f437
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If elfutils fails to find the debug symbols, the perfparser tries to
find it by checking first in /usr/lib/ then in .debug and then in
/usr/lib/debug. This causes some problems if the debug file has the same
name as the library itself. In this case the algorithm stops at
/usr/lib/ and returns the wrong file.
To prevent this I reorder the algorithm to first check in .debug then in
/usr/lib/debug and then in /usr/lib/
I also changed how the algorithm searches inside /usr/lib/debug. Some
distros (e.g. Ubuntu) uses shorted path names so the debug file for
/usr/lib/x86_64-linux-gnu/libc-2.31.so is located in
/usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so. To find the file the
/usr/lib/debug/usr/lib and /usr/lib/debug/lib are searched.
fixes KDAB/hotspot#265
fixes KDAB/hotspot#128
Change-Id: Iab2283819f947e89e9a933e66dfb7f45ff9156e1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
I added a system that simplifies adding new demanglers and provides a
fast path when demangling symbols
Change-Id: Ie5ca43632b53e41c0a4214772193af09ca4593cc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
| |
fixes https://github.com/KDAB/hotspot/issues/177
Change-Id: Ifd31af2344214a02550bab9cf8513f88608c60e8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
| |
Change-Id: Id291a3753c5b890a34a83e89d3df3dda5847268e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|\
| |
| |
| | |
Change-Id: I8ea621b1f308692591c256e22eeebe070740a3c9
|
| |
| |
| |
| |
| | |
Change-Id: I1d6ba0705275abb851c1dbf0f25d1f94f018e105
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |\
| | |
| | |
| | | |
Change-Id: I104132dfc29cc7fa74fd2dca7554e65ef770f95c
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I00ae8d6ac2094a2b5655693d678445296856fb00
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |\ \
| | | |
| | | |
| | | | |
Change-Id: I4855a81ce48a117c6a34e0a4770b0bf5ee49473a
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`perfdata.h` is included from downstream code, but HAVE_ZSTD is not
propagated downstream. this leads to gcc complaining about ODR
violations
Change-Id: Ib6995d9be4102f4e3262d84b25d0c8129e165ec1
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Explicitly cast some qsizetype to int.
Explicitly include time.h for time_t, which possibly was included by
Qt headers before, and is needed for libelf.h (ar_date)
Change-Id: I03807cbd2bb7e25e736a7842fd45b919db274488
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: I65a47203cbf935c71feda007f09e49c8ea8a87b6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |\ \ \
| | | | |
| | | | |
| | | | | |
Change-Id: I2eb05cdb49e2798b477d1122a135461d91d1e67e
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I3ecb3b2354968f75b416f2561132432dd66726ee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit f0ad7794a4d03827262ca0a3a952e7e0ccd47cf0.
We actually use those members in a change we forgot to merge from 4.11.
Change-Id: Ibee5fd43f1d5685f5c510338db878a9fbcbea50f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |_|/
|/| |
| | |
| | |
| | | |
Change-Id: I7578e582ac7fd3dd2012f783f273080ec2c2b18b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are some required frames not looked up for LBR unwinding method.
Added traversal the deepest frames for LBR by callchain
to compute then Disassembly events costs within function/method properly.
Added test into perfdata/vector_static_gcc for perf.lbr.data recorded with LBR.
Change-Id: Ie6413415c573e659505a4715978c65fce135d979
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't link to librustc_demangle at compile time, just try to find it
at runtime via QLibrary and then use it. This makes it much easier
to enable/disable support for rust demangling for packagers.
Fixes: https://github.com/KDAB/hotspot/issues/269
Change-Id: Ib33e2699780ed6d827bddeea75f82137daeacc9d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Use the namespaced Qt:: equivalent instead.
Change-Id: I3b82febee77a8cce55a1a17ac65018999e51fd43
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously we only did that when the relAddr fell somewhere into
the symbol. If it matched the symbol start directly, we didn't
do this yet.
Change-Id: I853e6735c83c9deeeec3be47fbdea0a032598ed8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: If34e761dc6a3b38ca60433adc674332fb5c7721b
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Actual file path can differ from perf recorded.
Compute and pass it to hotspot through Symbol struct field actualPath.
Change-Id: I556035234cbcffa42497bf02e225d63565e4a0bf
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
It is required to compute proper addresses on ARM.
Change-Id: Ifc93375707507fff0fcc62e164133771e43bd4b5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is equal to symbol start added by offset inside function.
Disassembler can then use them to compute and show events costs locations within function by instructions.
Added stream output.
Change-Id: Iba32e1764633d7ffc3f0f36088525ed7a3d1c9d0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added start address and size into Symbol and their stream output.
A disassembler can then use the relative address and size of a symbol
to find the instructions that belong to a function.
Change-Id: I96709ca380d0e58cd5cf5a8cc87116147b2754d6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Apparently there are situations where the compiler generates entries
in the symbol table with zero size which are still referenced by some
callstacks. After commit d8d56b7e we ended up losing the symbol names
in such cases. This patch fixes it again and restores the symbol names
for such zero-size symbols.
Change-Id: If98f68626ab4251ccfed89d791ebd333f6a6a60a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows a more detailed report on the GUI side then. Because the
count has a quint64 type, we now use a QVariant to store the task
event payload. To reduce the padding overhead, the struct is slightly
reordered.
Change-Id: I01d16da2ba4d3df9f32d6ae53bcff120355eb2c9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Iddaf07e55eb777d53b9ed992b496939ef93af07a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For now this just allows off-CPU cost analysis for
data recorded with `perf record -a --switch-events`.
In the future, we could even send the nextPrev{P,T}id
too, which would allow us to draw arrows beetween the
context switch targets.
Change-Id: Ie9b88bb9c54a3238ba8d6addd013b8419c03c42f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
While we're at it, also consider the ELFUTILS_INSTALL_DIR environment
variable.
Change-Id: Ifeb5cc7df6e29426633d27a840185ba67ed838b6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ic70d22575b9dd38f0df9f04e61c82a0dbc83a01a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|\ \ |
|
| |\ \
| | | |
| | | |
| | | | |
Change-Id: I60ee993a753729853b91353a7083347e90cb721c
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: If91e36a370d8fed183680ea156f39fde5175b899
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|/ / /
| | |
| | |
| | |
| | | |
Change-Id: I9dc6ab44596244fb342495c5d4a5e719e9b6c26b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For samples with frame pointer or LBR call chains, we may not have
the CPU registers or stack information available. Under such
circumstances we would spam the command line with repeated warnings
of the form:
```
<pid> failed to attach state Couldn't find architecture of any ELF
```
Prevent that by checking whether the sample has register and stack
information available and only attach dwfl state then.
Note that symbol resolution and inline-frame resolution is independent
of the dwfl_attach_state call - that really is only required for stack
unwinding.
Based on a patch by vtoropov, thanks!
Fixes: https://github.com/kdab/hotspot/issues/178
Change-Id: I8b88ee5b97d3e9d3ded82a17c4487d01add6d5ca
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|