From 4f5c0326a476ddfd5a1ea76f2f3097ca5acf1c25 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Wed, 19 Aug 2015 18:59:53 +0200 Subject: [PATCH] Canonicalize all types that got scheduled for late canonicalization Until now, when late type canonicalization time come (after having read all of the ABI corpus), the types scheduled for late canonicalization were considered and only those that don't have non-canonicalized sub-types were canonicalized. This patch just canonicalizes all the scheduled type. As a result, all types should now be canonicalized, so type comparison should be as fast as a pointer comparison now. But then, loading DWARF is now even longer, type canonicalization needs to happen. * src/abg-dwarf-reader.cc (read_context::canonicalize_types_scheduled): Canonicalize all types scheduled for late canonicalization. * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust. * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust. Signed-off-by: Dodji Seketeli --- src/abg-dwarf-reader.cc | 3 +- ...-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt | 2 +- .../test9-pr18818-clang.so.abi | 176 +++++++++--------- 3 files changed, 90 insertions(+), 91 deletions(-) diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index f6183c30..cab4490a 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -2484,8 +2484,7 @@ public: { type_base_sptr t = lookup_type_from_die_offset(*i, in_alt_di); assert(t); - if (!type_has_non_canonicalized_subtype(t)) - canonicalize(t); + canonicalize(t); } } } diff --git a/tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt b/tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt index 34a0953c..b373b224 100644 --- a/tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt +++ b/tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt @@ -1,5 +1,5 @@ ================ changes of 'libsigc-2.0.so.0.0.0'=============== - Functions changes summary: 1 Removed, 2 Changed (15 filtered out), 1 Added functions + Functions changes summary: 1 Removed, 2 Changed (17 filtered out), 1 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 Removed function: diff --git a/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi b/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi index e2d456c0..a3968998 100644 --- a/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi +++ b/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi @@ -10002,7 +10002,7 @@ - + @@ -11410,7 +11410,7 @@ - + @@ -11418,24 +11418,24 @@ - + - + - + - + - + @@ -11466,7 +11466,7 @@ - + @@ -11631,42 +11631,42 @@ - + - + - + - + - + - + - + - + @@ -11726,12 +11726,12 @@ - + - + @@ -11756,12 +11756,12 @@ - + - + @@ -11781,32 +11781,32 @@ - + - + - + - + - + - + @@ -11896,7 +11896,7 @@ - + @@ -11914,7 +11914,7 @@ - + @@ -11951,7 +11951,7 @@ - + @@ -12157,12 +12157,12 @@ - + - + - + @@ -12406,9 +12406,9 @@ - + - + @@ -12420,15 +12420,15 @@ - + - - + + - + @@ -12440,7 +12440,7 @@ - + @@ -12451,9 +12451,9 @@ - + - + @@ -12483,7 +12483,7 @@ - + @@ -12494,37 +12494,37 @@ - + - + - + - - + + - + - - + + @@ -14031,18 +14031,18 @@ - + - + - - + + @@ -14051,25 +14051,25 @@ - + - + - + - + @@ -14124,7 +14124,7 @@ - + @@ -14137,18 +14137,18 @@ - + - + - + - + @@ -14160,19 +14160,19 @@ - + - + - + - + - + @@ -14184,7 +14184,7 @@ - + @@ -14205,7 +14205,7 @@ - + @@ -14253,14 +14253,14 @@ - - + + - - + + @@ -14271,7 +14271,7 @@ - + @@ -14285,7 +14285,7 @@ - + @@ -15067,11 +15067,11 @@ - - - - - + + + + + @@ -15303,8 +15303,8 @@ - - + + @@ -15313,7 +15313,7 @@ - + @@ -15342,8 +15342,8 @@ - - + + @@ -15382,8 +15382,8 @@ - - + +