-
Notifications
You must be signed in to change notification settings - Fork 160
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change makes absolute sense, and I don't think there is need to add a test for it. I'd perhaps tweak the comment a bit, but that's minor.
src/profile.c
Outdated
{ | ||
/* 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We "want" to clear it? Not "need" to clear it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to change to 'need'
src/profile.c
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was mildly confused when reading "This" here, until I realized that it referred to the text after the comment. Perhaps rephrase this as "The OutputtedFilenameList is ..." or "The list of outputted filenames is" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tweaked
3bb7910
to
e60761a
Compare
Codecov Report
@@ Coverage Diff @@
## master #1164 +/- ##
==========================================
+ Coverage 66.8% 68.35% +1.55%
==========================================
Files 433 435 +2
Lines 228624 230662 +2038
==========================================
+ Hits 152725 157680 +4955
+ Misses 75899 72982 -2917
Continue to review full report at Codecov.
|
I have no idea why it looks like this is trashing coverage so badly. |
e60761a
to
ddd4921
Compare
ddd4921
to
0c9d1ff
Compare
This patch ensures that if we load a saved workspace, we correctly output filenames. This is only required when restoring a workspace where coverage/profile was active, with
--prof
or--cover
.The workspace restores the variable
OutputtedFilenameList
, which represents files we have already outputted. We want to clear that file, so our new profile includes the filenames.This is a pain to add a test for, but easy to eyeball -- looking at profiles generated they were previously missing filenames, now they aren't.