-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
move enabling fast TLS from jl_load_repl
to jl_load_libjulia_internal
#43655
Conversation
why is this a bugfix? |
It is a performance regression on 1.7 |
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.
Makes sense on the level that I understand this code! Thanks Kristoffer and Jameson! :)
if (fptr == NULL || key == NULL) { | ||
jl_loader_print_stderr("ERROR: Cannot find jl_get_pgcstack_static(), must define this symbol within calling executable!\n"); | ||
exit(1); | ||
} | ||
jl_pgcstack_setkey(fptr, key); |
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.
This assert seems false?
if (fptr == NULL || key == NULL) { | |
jl_loader_print_stderr("ERROR: Cannot find jl_get_pgcstack_static(), must define this symbol within calling executable!\n"); | |
exit(1); | |
} | |
jl_pgcstack_setkey(fptr, key); | |
if (fptr != NULL && key != NULL) | |
jl_pgcstack_setkey(fptr, key); |
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.
Added this to #43689
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.
Thanks Valentin!
This broke |
From my understanding, enabling fast TLS right now only happens when the REPL is loaded. There are many cases where this might not be the case, for example if one creates "apps" using PackageCompiler where a custom executable is created. This moves the code to the
jl_load_libjulia_internal
which is annotated__attribute__((constructor))
and should therefore run as soon as the library is loaded.