Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure we reset OutputtedFilenameList in profiling when a workspace is restored #1164

Merged
merged 1 commit into from
Feb 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,16 @@ static Int InitKernel (
return 0;
}

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

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

StructInitInfo * InitInfoProfile ( void )
Expand Down