From 109ce04bac832fa51217750ec9b48aaa7641bc4e Mon Sep 17 00:00:00 2001 From: Wilson Fung Date: Fri, 13 Jan 2012 04:40:12 -0800 Subject: Revived all of the source code view stats except exposed pipeline latency. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 11329] --- src/abstract_hardware_model.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/abstract_hardware_model.cc') diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc index ed62177..841be93 100644 --- a/src/abstract_hardware_model.cc +++ b/src/abstract_hardware_model.cc @@ -248,6 +248,7 @@ void warp_inst_t::generate_mem_accesses() } assert( total_accesses > 0 && total_accesses <= m_config->warp_size ); cycles = total_accesses; // shared memory conflicts modeled as larger initiation interval + ptx_file_line_stats_add_smem_bank_conflict( pc, total_accesses ); break; } @@ -291,7 +292,9 @@ void warp_inst_t::generate_mem_accesses() m_accessq.push_back( mem_access_t(access_type,a->first,cache_block_size,is_write,a->second,byte_mask) ); } - ptx_file_line_stats_add_uncoalesced_gmem( pc, m_accessq.size() - starting_queue_size ); + if ( space.get_type() == global_space ) { + ptx_file_line_stats_add_uncoalesced_gmem( pc, m_accessq.size() - starting_queue_size ); + } m_mem_accesses_created=true; } @@ -486,6 +489,13 @@ void warp_inst_t::memory_coalescing_arch_13_reduce_and_send( bool is_write, mem_ m_accessq.push_back( mem_access_t(access_type,addr,size,is_write,info.active,info.bytes) ); } +void warp_inst_t::completed( unsigned long long cycle ) +{ + unsigned long long latency = cycle - issue_cycle; + assert(latency <= cycle); // underflow detection + ptx_file_line_stats_add_latency(pc, latency * active_count()); +} + unsigned kernel_info_t::m_next_uid = 1; @@ -597,6 +607,7 @@ void simt_stack::update( simt_mask_t &thread_done, addr_vector_t &next_pc, addre simt_mask_t top_active_mask = m_active_mask[stack_top]; address_type top_recvg_pc = m_recvg_pc[stack_top]; + address_type top_pc = m_pc[stack_top]; // the pc of the instruction just executed assert(top_active_mask.any()); @@ -659,6 +670,10 @@ void simt_stack::update( simt_mask_t &thread_done, addr_vector_t &next_pc, addre assert(m_stack_top >= 0); assert(m_stack_top < m_warp_size * 2); + + if (warp_diverged) { + ptx_file_line_stats_add_warp_divergence(top_pc, 1); + } } void core_t::execute_warp_inst_t(warp_inst_t &inst, unsigned warpSize, unsigned warpId){ -- cgit v1.3