[Beignet] [PATCH 04/19] Backend: Add profiling registers to curbe.

junyan.he at inbox.com junyan.he at inbox.com
Tue Sep 8 17:00:55 PDT 2015


From: Junyan He <junyan.he at linux.intel.com>

1. Add five timestamp reigsters and one pointer register
   into curbe. The five timestamp reigsters will hold
   all the infomation of profiling timestamps, includes
   20 uint timestamps for each point, 1 ulong prolog holding
   the start time and and 1 ulong epilog holding the
   end time of that kernel. The pointer reigster will hold
   the log buffer address.
2. Delete the unused laneid string in the specialRegMean.

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
 backend/src/ir/profile.cpp |   15 +++++++++++++--
 backend/src/ir/profile.hpp |    8 +++++++-
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/backend/src/ir/profile.cpp b/backend/src/ir/profile.cpp
index 37f2d3d..ad343d5 100644
--- a/backend/src/ir/profile.cpp
+++ b/backend/src/ir/profile.cpp
@@ -44,9 +44,14 @@ namespace ir {
         "retVal", "slm_offset",
         "printf_buffer_pointer", "printf_index_buffer_pointer",
         "dwblockip",
-        "lane_id",
         "invalid",
-        "bti_utility"
+        "bti_utility",
+        "profiling_buffer_pointer",
+        "profiling_timestamps0",
+        "profiling_timestamps1",
+        "profiling_timestamps2",
+        "profiling_timestamps3",
+        "profiling_timestamps4"
     };
 
 #if GBE_DEBUG
@@ -92,6 +97,12 @@ namespace ir {
       DECL_NEW_REG(FAMILY_DWORD, dwblockip, 0);
       DECL_NEW_REG(FAMILY_DWORD, invalid, 1);
       DECL_NEW_REG(FAMILY_DWORD, btiUtil, 1);
+      DECL_NEW_REG(FAMILY_DWORD, profilingbptr, 1);
+      DECL_NEW_REG(FAMILY_DWORD, profilingts0, 0);
+      DECL_NEW_REG(FAMILY_DWORD, profilingts1, 0);
+      DECL_NEW_REG(FAMILY_DWORD, profilingts2, 0);
+      DECL_NEW_REG(FAMILY_DWORD, profilingts3, 0);
+      DECL_NEW_REG(FAMILY_DWORD, profilingts4, 0);
     }
 #undef DECL_NEW_REG
 
diff --git a/backend/src/ir/profile.hpp b/backend/src/ir/profile.hpp
index bf909be..e15a457 100644
--- a/backend/src/ir/profile.hpp
+++ b/backend/src/ir/profile.hpp
@@ -74,7 +74,13 @@ namespace ir {
     static const Register dwblockip = Register(30);  // blockip
     static const Register invalid = Register(31);  // used for valid comparation.
     static const Register btiUtil = Register(32);  // used for mixed pointer as bti utility.
-    static const uint32_t regNum = 33;             // number of special registers
+    static const Register profilingbptr = Register(33); // buffer addr for profiling.
+    static const Register profilingts0 = Register(34); // timestamp for profiling.
+    static const Register profilingts1 = Register(35); // timestamp for profiling.
+    static const Register profilingts2 = Register(36); // timestamp for profiling.
+    static const Register profilingts3 = Register(37); // timestamp for profiling.
+    static const Register profilingts4 = Register(38); // timestamp for profiling.
+    static const uint32_t regNum = 39;             // number of special registers
     extern const char *specialRegMean[];           // special register name.
   } /* namespace ocl */
 
-- 
1.7.9.5





More information about the Beignet mailing list