From 390c09648962261cc1985113a2a059324487edda Mon Sep 17 00:00:00 2001 From: Chris Jefferson Date: Sun, 13 May 2018 20:04:11 +0100 Subject: [PATCH] Add checks for outputting FilenameIds 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) --- src/profile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/profile.c b/src/profile.c index 7606a86fe86..fe362bf5958 100644 --- a/src/profile.c +++ b/src/profile.c @@ -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", @@ -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;