-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[Coverage] Consolidate visitation logic for functions and nominal types #16012
Conversation
This should address an ASAN failure which arose due to the PGOMapping ASTWalker not being updated in sync with the other profiling-related walkers. rdar://39534066
@swift-ci please smoke test and merge |
} else if (auto *TLCD = dyn_cast<TopLevelCodeDecl>(D)) { | ||
assignCounter(TLCD->getBody()); | ||
ImplicitTopLevelBody = TLCD->getBody(); | ||
} else if (auto *NTD = dyn_cast<NominalTypeDecl>(D)) { | ||
bool continueWalk = Parent.isNull(); | ||
if (continueWalk) { | ||
return visitNominalTypeDecl(*this, NTD, [&] { | ||
ParentNominalType = NTD; |
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.
What happens when you have nested types?
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.
When a constructor for a type is emitted in SILGen, we lazily create a SILProfiler instance for the nominal type associated with the constructor. The same holds for nested types.
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.
Er, that could've been clearer, sorry. We'd create a new ASTWalker for the nested type, where the nested nominal-type-decl would be the root of the walk.
@shahmishal I'm seeing a strange failure on Linux:
Any idea what this is about? |
@swift-ci Please clean smoke test Linux platform |
real failure:
|
@shahmishal Thanks, I'm tracking a fix in rdar://39537655. I think I've gotten to the bottom of it.. |
@shahmishal Heh, today's just not my day. The Linux job failed with a Jenkins exception this time around:
I've got a fix for the lldb cmake issue, though: apple/swift-lldb#541 |
@swift-ci Please clean smoke test Linux platform |
This should address an ASAN failure which arose due to the PGOMapping
ASTWalker not being updated in sync with the other profiling-related
walkers.
rdar://39534066