Skip to content

Commit

Permalink
strip Module filename from metadata (#57499)
Browse files Browse the repository at this point in the history
Fix #57358
  • Loading branch information
vtjnash authored Feb 22, 2025
1 parent d794780 commit 88aa27f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/staticdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,8 @@ static void jl_queue_module_for_serialization(jl_serializer_state *s, jl_module_
{
jl_queue_for_serialization(s, m->name);
jl_queue_for_serialization(s, m->parent);
if (jl_options.strip_metadata)
jl_queue_for_serialization(s, m->file);
if (jl_options.trim) {
jl_queue_for_serialization_(s, (jl_value_t*)jl_atomic_load_relaxed(&m->bindings), 0, 1);
} else {
Expand Down Expand Up @@ -1339,7 +1341,9 @@ static void jl_write_module(jl_serializer_state *s, uintptr_t item, jl_module_t
arraylist_push(&s->relocs_list, (void*)backref_id(s, jl_atomic_load_relaxed(&m->bindingkeyset), s->link_ids_relocs));
newm->file = NULL;
arraylist_push(&s->relocs_list, (void*)(reloc_offset + offsetof(jl_module_t, file)));
arraylist_push(&s->relocs_list, (void*)backref_id(s, m->file, s->link_ids_relocs));
arraylist_push(&s->relocs_list, (void*)backref_id(s, jl_options.strip_metadata ? jl_empty_sym : m->file , s->link_ids_relocs));
if (jl_options.strip_metadata)
newm->line = 0;
newm->usings_backedges = NULL;
arraylist_push(&s->relocs_list, (void*)(reloc_offset + offsetof(jl_module_t, usings_backedges)));
arraylist_push(&s->relocs_list, (void*)backref_id(s, m->usings_backedges, s->link_ids_relocs));
Expand Down Expand Up @@ -2593,7 +2597,7 @@ uint_t bindingkey_hash(size_t idx, jl_value_t *data);

static void jl_prune_module_bindings(jl_module_t * m) JL_GC_DISABLED
{
jl_svec_t * bindings = jl_atomic_load_relaxed(&m->bindings);
jl_svec_t *bindings = jl_atomic_load_relaxed(&m->bindings);
size_t l = jl_svec_len(bindings), i;
arraylist_t bindings_list;
arraylist_new(&bindings_list, 0);
Expand Down

4 comments on commit 88aa27f

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(isdaily = true)

@vtjnash
Copy link
Member Author

Choose a reason for hiding this comment

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

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@vtjnash
Copy link
Member Author

Choose a reason for hiding this comment

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

Many improvements to array indexing tests and some union tests. A few regressions in simd and union also. Likely all because of #52850

Please sign in to comment.