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

Allow reentrant Inference profiling. #47260

Conversation

NHDaly
Copy link
Member

@NHDaly NHDaly commented Oct 20, 2022

A follow-up to #47258.

Change start/stop measuring type inference timings to an atomic counter.

This allows multiple tasks to start timing and then all stop timing, without the timing being disabled by the first tasks to finish.

I'm not entirely sure if this Atomic Int is overkill.. 🤔 maybe we should just grab the inference lock when we update the integer? I'm also not sure if this will pass bootstrap or not. We'll see when it builds, i guess.

I also left the old __set_measure_typeinf(onoff::Bool) function, rather than deleting it, so that this wouldn't be a backwards-incompatible breaking change, breaking older versions of SnoopCompile.jl. I wanted to mark the function with @deprecate, but it seems to not be available from `Core.Compiler.

@NHDaly NHDaly requested a review from Sacha0 October 20, 2022 21:36
@NHDaly
Copy link
Member Author

NHDaly commented Oct 20, 2022

CC: @vilterp

Change start/stop measuring type inference timings to an atomic counter.

This allows multiple tasks to start timing and then all stop timing,
without the timing being disabled by the first tasks to finish.
@NHDaly NHDaly force-pushed the nhd-snoopi_deep-logical-race-disable-timing branch from 0063ad6 to a97af06 Compare October 20, 2022 23:46
@brenhinkeller brenhinkeller added the compiler:inference Type inference label Nov 17, 2022
@giordano giordano deleted the branch nhd-snoopi_deep-data-race-reset_timings February 25, 2024 21:42
@giordano giordano closed this Feb 25, 2024
@giordano giordano deleted the nhd-snoopi_deep-logical-race-disable-timing branch February 25, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:inference Type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants