Skip to content

Commit

Permalink
Ensure we reset OutputtedFilenameList in profiling when a workspace i…
Browse files Browse the repository at this point in the history
…s restored
  • Loading branch information
ChrisJefferson committed Feb 22, 2017
1 parent e37d037 commit 3bb7910
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,15 @@ static Int InitKernel (
return 0;
}

static Int PostRestore ( StructInitInfo * module )
{
/* When we restore a workspace, we start a new profile. This is the
* only part of the profile which is stored in the GAP memory space,
* so we want to clear it
*/
OutputtedFilenameList = NEW_PLIST(T_PLIST, 0);
return 0;
}

/****************************************************************************
**
Expand All @@ -1022,7 +1031,7 @@ static StructInitInfo module = {
0, /* checkInit */
0, /* preSave */
0, /* postSave */
0 /* postRestore */
PostRestore /* postRestore */
};

StructInitInfo * InitInfoProfile ( void )
Expand Down

0 comments on commit 3bb7910

Please sign in to comment.