diff options
| author | Mahmoud <[email protected]> | 2019-05-15 20:16:54 -0400 |
|---|---|---|
| committer | Mahmoud <[email protected]> | 2019-05-15 20:16:54 -0400 |
| commit | 0c16df3c8b108d8720846bb44b9abcc60ddf42f9 (patch) | |
| tree | 9f85dd6f6928ba0d1b1697b541c11b4acffe5f40 /src/trace.h | |
| parent | 7815b7ee86d4716e7133d91dd0c53d41580861b0 (diff) | |
make gpu_tot_cycle local variable not global variable
Diffstat (limited to 'src/trace.h')
| -rw-r--r-- | src/trace.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/trace.h b/src/trace.h index a79b4a0..0b96dcf 100644 --- a/src/trace.h +++ b/src/trace.h @@ -31,9 +31,6 @@ #ifndef __TRACE_H__ #define __TRACE_H__ -extern unsigned long long gpu_sim_cycle; -extern unsigned long long gpu_tot_sim_cycle; - namespace Trace { #define TS_TUP_BEGIN(X) enum X { @@ -63,17 +60,26 @@ namespace Trace { #define DPRINTF(x, ...) do {\ if (DTRACE(x)) {\ printf( SIM_PRINT_STR,\ - gpu_sim_cycle + gpu_tot_sim_cycle,\ + m_gpu->gpu_sim_cycle + m_gpu->gpu_tot_sim_cycle,\ Trace::trace_streams_str[Trace::x] );\ printf(__VA_ARGS__);\ }\ } while (0) +#define DPRINTFG(x, ...) do {\ + if (DTRACE(x)) {\ + printf( SIM_PRINT_STR,\ + gpu_sim_cycle + gpu_tot_sim_cycle,\ + Trace::trace_streams_str[Trace::x] );\ + printf(__VA_ARGS__);\ + }\ +} while (0) #else #define DTRACE(x) (false) #define DPRINTF(x, ...) do {} while (0) +#define DPRINTFG(x, ...) do {} while (0) #endif |
