| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: I9a6f61928e391bedddcef3f6b05b84be3bd6c552
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts the check for "libdwfl.h" and debuginfod added in commit
d432bc71926b1a855e54baabf5216b09b266b5fc and only the check. The code in
app/ that depended on this feature remains behind, pending a proper
detection of the elfutils content.
The problem is that elfutils 0.188 does have libdwfl.h and the symbol
that this check checked for, so the test passes. However, nothing
provides the CMake target elfutils::debuginfod: elfutils does not ship
with CMake files, CMake doesn't have Findelfutis.cmake, and Qt Creator's
Findelfutils.cmake doesn't provide this target.
Change-Id: Ib1d2fc7100134f7597cdfffd1749f527d965cf18
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
(cherry picked from commit 630828ad26f4c3ffbddc10daba547919ff404511)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: I08c9dd152523758aeee994da4e2316f9484bb30e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 6c475b413b3edb26897cbc1bd19296d497aaee79)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
| |
Change-Id: Ic5ca99131d64b3a582d66eeab61072ebec486727
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
| |
Allows to build against Qt 5 or Qt 6 without special target-mapping hacks
Change-Id: I562ba71712257570a865c48002e96598b621f08a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
| |
Amends 813e5fa8cad97eb1af227bf8bdcd60d7cd8bffa1
Change-Id: I4b936d5c1a41c20ef30595f80210e85ccab27e2f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
| |
Change-Id: If53db019f7855128fa705b1f9bc344b4d78dcdc8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|\ |
|
| |\
| | |
| | |
| | | |
Change-Id: I12d510a4c4166a3938c51c7e2cbcd698903c09a6
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This way we don't need to runtime allocate a QString for this
anymore.
Change-Id: Ibfed14dc563934edc7453221cd764f35a54870ee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I123bf5a868b8658a095472d1bc75dfd00933af61
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| | |
[[maybe_unused]] is a C++17 attribute, use Q_DECL_UNUSED instead.
Change-Id: I41216648f322c0ff30dda687fa1fab81a8d39ab9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I017424fb0c948a3566edc473ce65d52ac19dd8ac
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ib5047ea9e6f157c512b49111cf67956d0ca34c38
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We don't need COW here, and this also fixes a clazy warning
that we are missing a Q_DECLARE_TYPEINFO for this struct.
Change-Id: Ic4abe670f323f469a29d89ed2a9a0b0e60d5a897
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ieecddb6eb49facb0561a80983a86bfdd05c9edfe
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I0baa92d3a40ae9744d8110e730922ac5b6d3aedc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I2739795321b880e5d6abf87a563a0a026bcfc461
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Iaa91d92017e4796ab87627044830c802597a281d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The bitfields in this type make it non-trivial to use member
initialization to 0 as that would require C++20. So instead just
cast to void to silence this warning:
```
perfparser/app/perfattributes.cpp: In constructor ‘PerfEventAttributes::PerfEventAttributes()’:
perfparser/app/perfattributes.cpp:28:11: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class PerfEventAttributes’; use assignment or value-initialization instead [-Wclass-memaccess]
28 | memset(this, 0, sizeof(PerfEventAttributes));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
perfparser/app/perfattributes.h:30:7: note: ‘class PerfEventAttributes’ declared here
30 | class PerfEventAttributes {
| ^~~~~~~~~~~~~~~~~~~
```
Change-Id: I3ad7e53b02daf58def3c75d28df29212b3c20eb4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I5cdfef6a6b118dc9cd29f6b9f7926f95f2af76d9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Iba8591013ba7f193a318676370529de55e19fa4c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: If2520ec554fd194df9f92a59a98481efd4092193
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I72ac1befe4601b90c38cade89f748a270d997e1f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I581ae688cf4f96ee8d682ba4273dde7869ad0b34
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes:
```
perfparser/app/perfregisterinfo.cpp:155:16: warning:
Don't create temporary QRegularExpression objects. Use a static QRegularExpression object instead [-Wclazy-use-static-qregularexpression]
|| QRegularExpression("^i[3-7]86$").match(name).hasMatch()
^
```
Change-Id: I308d5d9d54297061c0218fdbf45651c409cb25e7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I forgot to do that in the previous patch that fixed the path
resolution, leading to errors in the test such as:
```
- 2011a4 2011a4 ../sysdeps/x86_64/start.S:115:0 0 0
+ 2011a4 2011a4 /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115:0 0 0
```
Note that the new behavior is correct and desired.
Change-Id: I0785c81f6e111a4e617e79c6e54c94996ab7fc7d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
The elfutils documentation clearly states that source files
queried directly through its API may be relative to the compilation
directory. We did not take this into account at all so far.
This patch adds extra code to detect relative paths and resolve those
then based on the compilation directory, i.e. the CU DIE's
DW_AT_comp_dir string value.
Fixes: https://github.com/KDAB/hotspot/issues/419
Change-Id: Idaedd5549ddd09220a5fabf054234f7f550d1fbf
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|