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

Backport: add --trace-compile-timing arg to add compile timing comments (#54662) #187

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

kpamnany
Copy link
Collaborator

@kpamnany kpamnany commented Sep 25, 2024

PR Description

% ./julia --trace-compile=stderr --trace-compile-timing --start=no -e "using ProfileView"
#=   0.0 ms =# precompile(Tuple{typeof(Requires.__init__)})
#=  19.4 ms =# precompile(Tuple{typeof(Requires.isprecompiling)})
#=   0.0 ms =# precompile(Tuple{typeof(Requires.listenpkg), Any, Base.PkgId})
#=   0.0 ms =# precompile(Tuple{typeof(Requires.loaded), Base.PkgId})
#=  13.4 ms =# precompile(Tuple{typeof(Base.haskey), Base.Dict{Base.PkgId, Module}, Base.PkgId})
#=   0.0 ms =# precompile(Tuple{typeof(Requires.callbacks), Base.PkgId})
#=   0.0 ms =# precompile(Tuple{typeof(Libiconv_jll.__init__)})
#=   0.0 ms =# precompile(Tuple{typeof(Libiconv_jll.find_artifact_dir)})
#=  32.0 ms =# precompile(Tuple{typeof(Artifacts._artifact_str), Module, String, Base.SubString{String}, String, Base.Dict{String, Any}, Base.SHA1, Base.BinaryPlatforms.Platform, Any})
#=   1.5 ms =# precompile(Tuple{typeof(Base.invokelatest), Any})

Checklist

Requirements for merging:

@github-actions github-actions bot added port-to-v1.10 This change should apply to Julia v1.10 builds port-to-master This change should apply to all future Julia builds labels Sep 25, 2024
@kpamnany kpamnany removed the port-to-master This change should apply to all future Julia builds label Oct 22, 2024
int did_compile = 0;
codeinst = jl_generate_fptr(mi, world, &did_compile);
compile_time = jl_hrtime() - compile_time;
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised the original PR had to add a measurement here... We already have a metric for compilation time -- why isn't this incremented there?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@NHDaly NHDaly left a comment

Choose a reason for hiding this comment

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

Anyway LGTM for now! 👍

I'll raise this question upstream

@kpamnany kpamnany merged commit f481fc9 into v1.10.2+RAI Oct 23, 2024
2 checks passed
@kpamnany kpamnany deleted the kp-backport-54662 branch October 23, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
port-to-v1.10 This change should apply to Julia v1.10 builds
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants