Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Fix overhead of trace_init being part of the first trace_pro call
Browse files Browse the repository at this point in the history
  • Loading branch information
jcd committed Nov 28, 2014
1 parent 2350ee4 commit 9aae3d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rt/trace.d
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,12 @@ static void trace_pro(char[] id)
timer_t starttime;
timer_t t;

if (!trace_inited)
trace_init(); // initialize package

QueryPerformanceCounter(&starttime);
if (id.length == 0)
return;
if (!trace_inited)
trace_init(); // initialize package
n = stack_malloc();
n.prev = trace_tos;
trace_tos = n;
Expand Down

0 comments on commit 9aae3d1

Please sign in to comment.