Skip to content

Commit

Permalink
Add checks for outputting FilenameIds
Browse files Browse the repository at this point in the history
This was previously not necessary, as we always checked when entering
and leaving a function, but I want to improve coverage in HPC-GAP to stop
outputting enter/leave functions (which get mixed up between threads)
  • Loading branch information
ChrisJefferson committed May 13, 2018
1 parent e4b03a6 commit 390c096
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ static inline void outputStat(Stat stat, int exec, int visited)
profileState.minimumProfileTick;
}
ticks -= ticksDone;
outputFilenameIdIfRequired(nameid);
fprintf(
profileState.Stream,
"{\"Type\":\"%c\",\"Ticks\":%d,\"Line\":%d,\"FileId\":%d}\n",
Expand All @@ -369,6 +370,7 @@ static inline void outputStat(Stat stat, int exec, int visited)
}
}
else {
outputFilenameIdIfRequired(nameid);
fprintf(profileState.Stream, "{\"Type\":\"%c\",\"Line\":%d,\"FileId\":%d}\n",
exec ? 'E' : 'R', (int)line, (int)nameid);
profileState.lastOutputted.line = line;
Expand Down

0 comments on commit 390c096

Please sign in to comment.