Skip to content

Commit

Permalink
Remove profiledPreviously, as no need to track this any more
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed Dec 12, 2022
1 parent b29076e commit 3fe5bbf
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ static struct ProfileState
int profiledThread;
#endif

/* Have we previously profiled this execution of GAP? We need this because
** code coverage doesn't work more than once, as we use a bit in each Stat
** to mark if we previously executed this statement, which we can't
** clear */
UInt profiledPreviously;

Int LongJmpOccurred;

// We store the value of RecursionDepth each time we enter a function.
Expand Down Expand Up @@ -679,7 +673,6 @@ enableAtStartup(char * filename, Int repeats, TickMethod tickMethod)

profileState.status = Profile_Active;
RegisterThrowObserver(ProfileRegisterLongJmpOccurred);
profileState.profiledPreviously = 1;
#ifdef HPCGAP
profileState.profiledThread = TLS(threadID);
#endif
Expand Down Expand Up @@ -733,12 +726,6 @@ static Obj FuncACTIVATE_PROFILING(Obj self,
return Fail;
}

if(profileState.profiledPreviously &&
coverage == True) {
ErrorMayQuit("Code coverage can only be started once per"
" GAP session. Please exit GAP and restart. Sorry.",0,0);
}

memset(&profileState, 0, sizeof(profileState));

OutputtedFilenameList = NEW_PLIST(T_PLIST, 0);
Expand Down Expand Up @@ -807,7 +794,6 @@ static Obj FuncACTIVATE_PROFILING(Obj self,

profileState.status = Profile_Active;
RegisterThrowObserver(ProfileRegisterLongJmpOccurred);
profileState.profiledPreviously = 1;
#ifdef HPCGAP
profileState.profiledThread = TLS(threadID);
#endif
Expand Down

0 comments on commit 3fe5bbf

Please sign in to comment.