File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ JL_DLLEXPORT __itt_event jl_timing_ittapi_events[(int)JL_TIMING_EVENT_LAST];
5656
5757void jl_print_timings (void )
5858{
59+ #ifdef USE_TIMING_COUNTS
5960 uint64_t total_time = cycleclock () - t0 ;
6061 uint64_t root_time = total_time ;
6162 for (int i = 0 ; i < JL_TIMING_LAST ; i ++ ) {
@@ -70,11 +71,12 @@ void jl_print_timings(void)
7071 }
7172
7273 fprintf (stderr , "\nJULIA COUNTERS\n" );
73- uint64_t val = 0 ;
74- #ifdef USE_TIMING_COUNTS
75- #define X (name ) val = jl_atomic_load_relaxed(&jl_timing_counters[(int)JL_TIMING_COUNTER_##name].basic_counter); \
76- if (val != 0) \
77- fprintf(stderr, "%-25s : %" PRIu64 "\n", #name, val);
74+ #define X (name ) do { \
75+ int64_t val = (int64_t) jl_atomic_load_relaxed(&jl_timing_counters[(int)JL_TIMING_COUNTER_##name].basic_counter); \
76+ if (val != 0) \
77+ fprintf(stderr, "%-25s : %" PRIi64 "\n", #name, val); \
78+ } while (0);
79+
7880 JL_TIMING_COUNTERS
7981#undef X
8082#endif
You can’t perform that action at this time.
0 commit comments