[15/27] ir: Improve type logging during type canonicalization

Message ID 87h6b3l3gs.fsf@seketeli.org
State New
Headers
Series Implement type hashing & fix self-comparing gcc-gnat in fc37 |

Commit Message

Dodji Seketeli Aug. 29, 2024, 4:05 p.m. UTC
  Hello,

This patch adds logging to show the time taken by type
canonicalization.

	* src/abg-ir-priv.h (canonicalize_types): Log the time taken by
	type canonicalization.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 src/abg-ir-priv.h | 6 ++++++
 1 file changed, 6 insertions(+)
  

Patch

diff --git a/src/abg-ir-priv.h b/src/abg-ir-priv.h
index 0a960885..2d55e68b 100644
--- a/src/abg-ir-priv.h
+++ b/src/abg-ir-priv.h
@@ -1492,6 +1492,12 @@  canonicalize_types(const input_iterator& begin,
 
   env.canonicalization_is_done(true);
 
+  if (do_log)
+    {
+      tmr.stop();
+      std::cerr << "Canonicalizing of types DONE in: " << tmr << "\n\n";
+      tmr.start();
+    }
 }
 
 /// Hash and canonicalize a sequence of types.