From 2dd62f45faaf6e749f21212c662c1308faf31554 Mon Sep 17 00:00:00 2001 From: Mengchi Zhang Date: Thu, 11 Jul 2019 11:47:19 -0400 Subject: Move g_watchpoint_hits Signed-off-by: Mengchi Zhang --- src/gpgpu-sim/gpu-sim.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/gpgpu-sim/gpu-sim.h') diff --git a/src/gpgpu-sim/gpu-sim.h b/src/gpgpu-sim/gpu-sim.h index 119b934..78f0505 100644 --- a/src/gpgpu-sim/gpu-sim.h +++ b/src/gpgpu-sim/gpu-sim.h @@ -424,6 +424,26 @@ struct occupancy_stats { }; class gpgpu_context; +class ptx_instruction; + +class watchpoint_event { +public: + watchpoint_event() + { + m_thread=NULL; + m_inst=NULL; + } + watchpoint_event(const ptx_thread_info *thd, const ptx_instruction *pI) + { + m_thread=thd; + m_inst = pI; + } + const ptx_thread_info *thread() const { return m_thread; } + const ptx_instruction *inst() const { return m_inst; } +private: + const ptx_thread_info *m_thread; + const ptx_instruction *m_inst; +}; class gpgpu_sim : public gpgpu_t { public: @@ -496,6 +516,8 @@ public: */ simt_core_cluster * getSIMTCluster(); + void hit_watchpoint( unsigned watchpoint_num, ptx_thread_info *thd, const ptx_instruction *pI ); + // backward pointer class gpgpu_context* gpgpu_ctx; @@ -560,6 +582,8 @@ private: std::vector m_executed_kernel_names; //< names of kernel for stat printout std::vector m_executed_kernel_uids; //< uids of kernel launches for stat printout + std::map g_watchpoint_hits; + std::string executed_kernel_info_string(); //< format the kernel information into a string for stat printout void clear_executed_kernel_info(); //< clear the kernel information after stat printout -- cgit v1.3