Skip to content

[Profiler] Introduce ProfileCounterRef #61566

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

Merged
merged 4 commits into from
Oct 14, 2022

Conversation

hamishknight
Copy link
Contributor

For now this just wraps an ASTNode, but in the future it will allow us to model counters that cannot simply hang off ASTNodes, e.g error branch counters.

Additionally, fix up some cases where we could pass null to emitProfilerIncrement & loadProfilerCount, as that's now an assertion failure.

Remove a case where we know we don't have a
profiler, and avoid incrementing for a distributed
factory method. Otherwise such cases could pass
a null ASTNode, which will become an assertion
failure in a future commit.

While we're here, let's standardize on emitting
the profiler increment for function entry after
the prolog, as if there's e.g an unreachable
parameter, the increment can be safely elided
anyway.
This will become an assertion failure in a future
commit.
For now this just wraps an ASTNode, but in the
future it will allow us to model counters
that cannot simply hang off ASTNodes, e.g
error branch counters.
Also bump the copyright year.
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 1c9b77e into swiftlang:main Oct 14, 2022
@hamishknight hamishknight deleted the countdown branch October 14, 2022 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant