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

Add more profiling events #49493

Merged
merged 8 commits into from
Apr 26, 2023
Merged

Add more profiling events #49493

merged 8 commits into from
Apr 26, 2023

Conversation

pchintalapudi
Copy link
Member

The new events center mostly around annotating load time contributors.

Copy link
Member

@topolarity topolarity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice additions!

Could you provide screenshots showing the new added/moved events in action?

src/gf.c Show resolved Hide resolved
src/stackwalk.c Show resolved Hide resolved
src/staticdata_utils.c Show resolved Hide resolved
@pchintalapudi
Copy link
Member Author

pchintalapudi commented Apr 25, 2023

Could you provide screenshots showing the new added/moved events in action?

From julia -E 'using OrdinaryDiffEq' we get:

image

image

@pchintalapudi
Copy link
Member Author

Also given that we're seeing millions of lock events per minute now, I've gone ahead and stripped out the case where we acquire the lock immediately separately from when we actually spin to wait.

@gbaraldi
Copy link
Member

While it was a lot spin events I do wonder what those are, because they aren't from the runtime at least.

@@ -3195,6 +3194,7 @@ static jl_value_t *jl_validate_cache_file(ios_t *f, jl_array_t *depmods, uint64_
// TODO?: refactor to make it easier to create the "package inspector"
static jl_value_t *jl_restore_package_image_from_stream(ios_t *f, jl_image_t *image, jl_array_t *depmods, int completeinfo)
{
JL_TIMING(LOAD_IMAGE, LOAD_Pkgimg);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a future PR it would be good I guess to also annotate this trace point with the name of the package getting loaded.

@gbaraldi
Copy link
Member

Turning on stack collection on tracy I can see that the main uses of it are the locks when inserting backedges. Those being in jl_method_instance_add_backedge(1.8 Million) and jl_mi_cache_insert (160k)

src/timing.h Outdated Show resolved Hide resolved
Copy link
Member

@topolarity topolarity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Might be nice to cover jl_insert_methods as well

P.S. In future PR's I'd like to explore removing the subsystem name that was added to most of the timing events (at least for the Tracy backend) - I think it makes the events significantly less "friendly" to view in the profiler

@KristofferC KristofferC merged commit 3f7ae8b into master Apr 26, 2023
@KristofferC KristofferC deleted the pc/more-events branch April 26, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants