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 trimming of new usings_backedges and scanned_methods fields #57879

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

JeffBezanson
Copy link
Member

No description provided.

@@ -809,8 +809,14 @@ static void jl_queue_module_for_serialization(jl_serializer_state *s, jl_module_
jl_queue_for_serialization(s, module_usings_getmod(m, i));
}

jl_queue_for_serialization(s, m->usings_backedges);
jl_queue_for_serialization(s, m->scanned_methods);
if (jl_options.trim || jl_options.strip_ir) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if this should be tied to strip-ir or trim, but either seems ok?

@@ -4,7 +4,7 @@ let exe_suffix = splitext(Base.julia_exename())[2]

hello_exe = joinpath(@__DIR__, "hello" * exe_suffix)
@test readchomp(`$hello_exe`) == "Hello, world!"
@test filesize(hello_exe) < filesize(unsafe_string(Base.JLOptions().image_file))/10
@test filesize(hello_exe) < 2000000
Copy link
Member Author

Choose a reason for hiding this comment

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

For me the size is now 1633392. Not sure if this holds on all platforms but we'll find out.

Copy link
Member

Choose a reason for hiding this comment

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

Pretty sure we only test trimming on Linux x86-64, but I'm very happy to have this test tightened anyway

@JeffBezanson JeffBezanson merged commit 8fd3fb1 into master Mar 26, 2025
7 checks passed
@JeffBezanson JeffBezanson deleted the jb/trimnewmodfields branch March 26, 2025 22:50
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.

3 participants