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

Commit

Permalink
Merge pull request #1048 from jcd/tracefix
Browse files Browse the repository at this point in the history
Fix overhead of trace_init being part of the first trace_pro call
  • Loading branch information
MartinNowak committed Nov 29, 2014
2 parents 2350ee4 + 9aae3d1 commit 704592d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rt/trace.d
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 704592d

Please sign in to comment.