From: Junyan He <junyan...@linux.intel.com> 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.
Signed-off-by: Junyan He <junyan...@linux.intel.com> --- backend/src/backend/program.h | 6 ++++++ backend/src/ir/profile.cpp | 12 +++++++++++- backend/src/ir/profile.hpp | 8 +++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/backend/src/backend/program.h b/backend/src/backend/program.h index 86b3177..14752ad 100644 --- a/backend/src/backend/program.h +++ b/backend/src/backend/program.h @@ -99,6 +99,12 @@ enum gbe_curbe_type { GBE_CURBE_BLOCK_IP, GBE_CURBE_DW_BLOCK_IP, GBE_CURBE_THREAD_NUM, + GBE_CURBE_PROFILING_BUF_POINTER, + GBE_CURBE_PROFILING_TIMESTAMP0, + GBE_CURBE_PROFILING_TIMESTAMP1, + GBE_CURBE_PROFILING_TIMESTAMP2, + GBE_CURBE_PROFILING_TIMESTAMP3, + GBE_CURBE_PROFILING_TIMESTAMP4, GBE_GEN_REG, }; diff --git a/backend/src/ir/profile.cpp b/backend/src/ir/profile.cpp index 4486863..90b039b 100644 --- a/backend/src/ir/profile.cpp +++ b/backend/src/ir/profile.cpp @@ -43,7 +43,11 @@ namespace ir { "zero", "one", "retVal", "printf_buffer_pointer", "printf_index_buffer_pointer", - "dwblockip" + "dwblockip", + "profiling_buffer_pointer", + "profiling_timestamps0", "profiling_timestamps1", + "profiling_timestamps2", "profiling_timestamps3", + "profiling_timestamps4" }; #if GBE_DEBUG @@ -86,6 +90,12 @@ namespace ir { DECL_NEW_REG(FAMILY_DWORD, printfbptr, 1, GBE_CURBE_PRINTF_BUF_POINTER); DECL_NEW_REG(FAMILY_DWORD, printfiptr, 1, GBE_CURBE_PRINTF_INDEX_POINTER); DECL_NEW_REG(FAMILY_DWORD, dwblockip, 0, GBE_CURBE_DW_BLOCK_IP); + DECL_NEW_REG(FAMILY_DWORD, profilingbptr, 1, GBE_CURBE_PROFILING_BUF_POINTER); + DECL_NEW_REG(FAMILY_DWORD, profilingts0, 0, GBE_CURBE_PROFILING_TIMESTAMP0); + DECL_NEW_REG(FAMILY_DWORD, profilingts1, 0, GBE_CURBE_PROFILING_TIMESTAMP1); + DECL_NEW_REG(FAMILY_DWORD, profilingts2, 0, GBE_CURBE_PROFILING_TIMESTAMP2); + DECL_NEW_REG(FAMILY_DWORD, profilingts3, 0, GBE_CURBE_PROFILING_TIMESTAMP3); + DECL_NEW_REG(FAMILY_DWORD, profilingts4, 0, GBE_CURBE_PROFILING_TIMESTAMP4); } #undef DECL_NEW_REG diff --git a/backend/src/ir/profile.hpp b/backend/src/ir/profile.hpp index a8445c4..e586f44 100644 --- a/backend/src/ir/profile.hpp +++ b/backend/src/ir/profile.hpp @@ -71,7 +71,13 @@ namespace ir { static const Register printfbptr = Register(27); // printf buffer address . static const Register printfiptr = Register(28); // printf index buffer address. static const Register dwblockip = Register(29); // blockip - static const uint32_t regNum = 30; // number of special registers + static const Register profilingbptr = Register(30); // buffer addr for profiling. + static const Register profilingts0 = Register(31); // timestamp for profiling. + static const Register profilingts1 = Register(32); // timestamp for profiling. + static const Register profilingts2 = Register(33); // timestamp for profiling. + static const Register profilingts3 = Register(34); // timestamp for profiling. + static const Register profilingts4 = Register(35); // timestamp for profiling. + static const uint32_t regNum = 36; // number of special registers extern const char *specialRegMean[]; // special register name. } /* namespace ocl */ -- 1.7.9.5 _______________________________________________ Beignet mailing list Beignet@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/beignet