summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/l2cache_trace.h
diff options
context:
space:
mode:
authorMahmoud Khairy A. Abdallah <[email protected]>2017-11-18 23:43:56 -0500
committerGitHub Enterprise <[email protected]>2017-11-18 23:43:56 -0500
commit77abdbf7a3c69631bceb5c96f4d3628447487612 (patch)
tree3c8de6a8d14739da6bc035c33a8c47292fe135c9 /src/gpgpu-sim/l2cache_trace.h
parentdccac457bb2263602a6a244297168cae8fda8e47 (diff)
parentf125fecc85fdbb29ed846a2acfdb5e8c6cf20e41 (diff)
Merge pull request #1 from tgrogers/copy-kernel
Copy kernel
Diffstat (limited to 'src/gpgpu-sim/l2cache_trace.h')
-rw-r--r--src/gpgpu-sim/l2cache_trace.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gpgpu-sim/l2cache_trace.h b/src/gpgpu-sim/l2cache_trace.h
index 3dac87d..2235cdc 100644
--- a/src/gpgpu-sim/l2cache_trace.h
+++ b/src/gpgpu-sim/l2cache_trace.h
@@ -34,6 +34,9 @@
#define MEMPART_PRINT_STR SIM_PRINT_STR " %d - "
#define MEMPART_DTRACE(x) ( DTRACE(x) && (Trace::sampling_memory_partition == -1 || Trace::sampling_memory_partition == (int)get_mpid()) )
+#define MEM_SUBPART_PRINT_STR SIM_PRINT_STR " %d - "
+#define MEM_SUBPART_DTRACE(x) ( DTRACE(x) && (Trace::sampling_memory_partition == -1 || Trace::sampling_memory_partition == (int)m_id) )
+
// Intended to be called from inside components of a memory partition
// Depends on a get_mpid() function
#define MEMPART_DPRINTF(...) do {\
@@ -46,10 +49,23 @@
}\
} while (0)
+#define MEM_SUBPART_DPRINTF(...) do {\
+ if (MEM_SUBPART_DTRACE(MEMORY_PARTITION_UNIT)) {\
+ printf( MEM_SUBPART_PRINT_STR,\
+ gpu_sim_cycle + gpu_tot_sim_cycle,\
+ Trace::trace_streams_str[Trace::MEMORY_SUBPARTITION_UNIT],\
+ m_id );\
+ printf(__VA_ARGS__);\
+ }\
+} while (0)
+
#else
#define MEMPART_DTRACE(x) (false)
#define MEMPART_DPRINTF(x, ...) do {} while (0)
+#define MEM_SUBPART_DTRACE(x) (false)
+#define MEM_SUBPART_DPRINTF(x, ...) do {} while (0)
+
#endif