-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Export num_stack_mappings to track the number of in-flight stack mappings and tasks in application #51301
Export num_stack_mappings to track the number of in-flight stack mappings and tasks in application #51301
Conversation
src/gc-stacks.c
Outdated
JL_DLLEXPORT uint32_t jl_get_num_stack_mappings() { | ||
return jl_atomic_load_relaxed(&num_stack_mappings); | ||
} |
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.
Should this also be exposed through a julia function in Base? Or is it okay to just expose the ccall like this?
@c42f: Are you the expert now on what "public" / "exported" means?
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 think keeping it a ccall is fine
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.
LGTM pending adding a test
I think the PR is fine (aside from the test that Nathan mentioned), but not that you could also export the global and then access it from Julia directly, |
@vchuravy I don't think we can |
…ny param (not the old style)
8f1f4ad
to
ab68148
Compare
Thanks all. Sorry for the delay here. I've added a test, so this should be ready to go. Please merge as soon as tests are green! Thank you |
Export num_stack_mappings to track the number of in-flight stack mappings and tasks in application JuliaLang#51301
ab68148
to
982e38c
Compare
We can, but I don't think we have specified if Julia and C agree on the data layout |
Export num_stack_mappings to track the number of in-flight stack mappings and tasks in application JuliaLang#51301
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
…pings and tasks in application (JuliaLang#51301)
Julia already tracks the number of mapped stacks for Julia tasks in a local atomic.
Exporting this atomic will allow applications to estimate the memory consumption by the stacks and also the number of in-flight tasks.