diff options
author | dknysh <d.knysh@nips.ru> | 2020-10-06 17:14:51 +0700 |
---|---|---|
committer | Darya Knysh <d.knysh@nips.ru> | 2020-10-07 07:51:03 +0000 |
commit | 254b3d3190ee3f264a083f32704748c24c6f3a94 (patch) | |
tree | 1c26d96fb792b8cd07fa8b23087bc056055efe11 /tests | |
parent | 0d969e8e5354514011aa2fccc08d9f820e892c80 (diff) |
Allow zero sized symbols in the address cache
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>
Diffstat (limited to 'tests')
3 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/addresscache/tst_addresscache.cpp b/tests/auto/addresscache/tst_addresscache.cpp index 8136682..6387a4e 100644 --- a/tests/auto/addresscache/tst_addresscache.cpp +++ b/tests/auto/addresscache/tst_addresscache.cpp @@ -72,7 +72,7 @@ private slots: QVERIFY(!cache.findSymbol(libfoo_a, 0).isValid()); QVERIFY(!cache.findSymbol(libfoo_b, 0).isValid()); - cache.setSymbolCache(libfoo_a, {{0x100, 10, "Foo"}}); + cache.setSymbolCache(libfoo_a, {{0x100, 10, "Foo"}, {0x11a, 0, "FooZ"}, {0x12a, 10, "FooN"}}); for (auto addr : {0x100, 0x100 + 9}) { const auto cached = cache.findSymbol(libfoo_a, addr); QVERIFY(cached.isValid()); @@ -83,6 +83,7 @@ private slots: QVERIFY(!cache.findSymbol(libfoo_a, 0x100 + 10).isValid()); QVERIFY(!cache.findSymbol(libfoo_b, 0x100).isValid()); QVERIFY(!cache.findSymbol(libfoo_b, 0x100 + 9).isValid()); + QVERIFY(cache.findSymbol(libfoo_a, 0x11a + 1).isValid()); } }; diff --git a/tests/auto/perfdata/vector_static_gcc/perf.data.expected.txt b/tests/auto/perfdata/vector_static_gcc/perf.data.expected.txt index d494b31..9ef4378 100644 --- a/tests/auto/perfdata/vector_static_gcc/perf.data.expected.txt +++ b/tests/auto/perfdata/vector_static_gcc/perf.data.expected.txt @@ -711,7 +711,8 @@ vector_static_g 349054 349054 65149.476874692 vector_static_g 349054 349054 65149.477126147 cycles: 315591 - 400480 <.plt+400480> vector_static_gcc_v9.1.0 /home/milian/projects/kdab/rnd/hotspot/3rdparty/perfparser/tests/auto/perfdata/vector_static_gcc/vector_static_gcc_v9.1.0 + 400480 + 400430 _init vector_static_gcc_v9.1.0 /home/milian/projects/kdab/rnd/hotspot/3rdparty/perfparser/tests/auto/perfdata/vector_static_gcc/vector_static_gcc_v9.1.0 40155c /usr/include/c++/9.1.0/bits/stl_algo.h:4449:13 40152b /usr/include/c++/9.1.0/bits/stl_algo.h:4441:5 std::generate_n<std::back_insert_iterator<std::vector<double> >, int, main()::<lambda()> > vector_static_gcc_v9.1.0 /home/milian/projects/kdab/rnd/hotspot/3rdparty/perfparser/tests/auto/perfdata/vector_static_gcc/vector_static_gcc_v9.1.0 40152b ../../../manual/clients/vector.cpp:16:6 diff --git a/tests/auto/perfdata/vector_static_gcc/perf.data.zstd.expected.txt b/tests/auto/perfdata/vector_static_gcc/perf.data.zstd.expected.txt index e62f41a..f7af600 100644 --- a/tests/auto/perfdata/vector_static_gcc/perf.data.zstd.expected.txt +++ b/tests/auto/perfdata/vector_static_gcc/perf.data.zstd.expected.txt @@ -247,7 +247,8 @@ vector_static_g 267677 267677 9952.368475245 vector_static_g 267677 267677 9952.368668898 cycles: 415081 - 400490 <.plt+400490> vector_static_gcc_v9.1.0 /home/milian/projects/kdab/rnd/hotspot/3rdparty/perfparser/tests/auto/perfdata/vector_static_gcc/vector_static_gcc_v9.1.0 + 400490 + 400430 _init vector_static_gcc_v9.1.0 /home/milian/projects/kdab/rnd/hotspot/3rdparty/perfparser/tests/auto/perfdata/vector_static_gcc/vector_static_gcc_v9.1.0 401572 /usr/include/c++/9.1.0/bits/stl_algo.h:4449:13 40152b /usr/include/c++/9.1.0/bits/stl_algo.h:4441:5 std::generate_n<std::back_insert_iterator<std::vector<double> >, int, main()::<lambda()> > vector_static_gcc_v9.1.0 /home/milian/projects/kdab/rnd/hotspot/3rdparty/perfparser/tests/auto/perfdata/vector_static_gcc/vector_static_gcc_v9.1.0 40152b ../../../manual/clients/vector.cpp:16:6 |