From 47183fbb46dc3c4bac962930c8c00eee4d35f8da Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Wed, 24 Mar 2021 11:31:03 -0700 Subject: [PATCH] Revise compiler tracing to enable statistics aggregation. (#5218) Sample trace: ![image](https://user-images.githubusercontent.com/4010439/112351861-7c5ee700-8c87-11eb-8197-a3319caf2ff8.png) --- iree/compiler/Utils/TracingUtils.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iree/compiler/Utils/TracingUtils.h b/iree/compiler/Utils/TracingUtils.h index 2d7b9e66bf56..c81cbb2dca1a 100644 --- a/iree/compiler/Utils/TracingUtils.h +++ b/iree/compiler/Utils/TracingUtils.h @@ -34,8 +34,9 @@ struct PassTracing : public PassInstrumentation { // Note: we could also trace pipelines and analyses. void runBeforePass(Pass *pass, Operation *op) override { - std::string passName = pass->getName().str(); - IREE_TRACE_ZONE_BEGIN_NAMED_DYNAMIC(z0, passName.data(), passName.size()); + IREE_TRACE_ZONE_BEGIN_EXTERNAL(z0, __FILE__, strlen(__FILE__), __LINE__, + pass->getName().data(), + pass->getName().size(), NULL, 0); passTraceZonesStack.push_back(z0); } void runAfterPass(Pass *pass, Operation *op) override {