-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Makefile: avoid SSE42/AVX2 in non-release builds #14466
Conversation
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.
LGTM
pkg/cli/jemalloc_unix.go
Outdated
|
||
// #cgo darwin LDFLAGS: -Wl,-undefined -Wl,dynamic_lookup | ||
// #cgo !darwin LDFLAGS: -Wl,-unresolved-symbols=ignore-all | ||
import "C" |
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.
Why did you move this from start_jemalloc.go
? That file is already protected by !stdmalloc
which is being specified for windows
builds.
pkg/storage/engine/db.cc
Outdated
@@ -39,6 +39,7 @@ | |||
|
|||
extern "C" { | |||
#include "_cgo_export.h" | |||
} |
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.
Please keep the // extern "C"
comment.
Perhaps we can also add some code which errors very early in the lifetime of the process if sse4.2 isn't available when we've compiled for it. RocksDB has the following code:
|
I don't really understand this suggestion - if RocksDB has this code (and has since 2014: facebook/rocksdb@318eace), (1) why is USE_SSE a thing? and (2) why do we see crashes on machines that don't support SSE? |
Review status: 0 of 14 files reviewed at latest revision, 2 unresolved discussions. pkg/cli/jemalloc_unix.go, line 26 at r5 (raw file): Previously, petermattis (Peter Mattis) wrote…
Because I'd rather reduce the amount of tribal knowledge required to compile on windows. pkg/storage/engine/db.cc, line 42 at r5 (raw file): Previously, petermattis (Peter Mattis) wrote…
Done, and added this comment to the equivalent place in CCL. Comments from Reviewable |
Probably because the Review status: 0 of 14 files reviewed at latest revision, 2 unresolved discussions, some commit checks pending. pkg/cli/jemalloc_unix.go, line 26 at r5 (raw file): Previously, tamird (Tamir Duberstein) wrote…
I'm not sure how it does that. Seems like random code movement to me. Comments from Reviewable |
Thanks. I'm going to investigate upstream a little bit. Review status: 0 of 14 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. pkg/cli/jemalloc_unix.go, line 26 at r5 (raw file): Previously, petermattis (Peter Mattis) wrote…
It means that windows builds do not require Comments from Reviewable |
USE_SSE is a thing because Reviewed 5 of 5 files at r1, 2 of 2 files at r7, 1 of 4 files at r8, 6 of 6 files at r9. Makefile, line 95 at r9 (raw file):
This will only work on amd64 architectures so it should probably have some sort of guard. (not a big deal yet, though, since we only test/support amd64) What if a user wants to specify their own pkg/ccl/storageccl/engineccl/rocksdb_unix.go, line 9 at r9 (raw file):
Needs a Comments from Reviewable |
Review status: 2 of 17 files reviewed at latest revision, 4 unresolved discussions. Makefile, line 95 at r9 (raw file): Previously, bdarnell (Ben Darnell) wrote…
Done. pkg/ccl/storageccl/engineccl/rocksdb_unix.go, line 9 at r9 (raw file): Previously, bdarnell (Ben Darnell) wrote…
Thanks for spotting it. Done. Comments from Reviewable |
Review status: 2 of 17 files reviewed at latest revision, 4 unresolved discussions, some commit checks pending. Comments from Reviewable |
Review status: 2 of 17 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. Comments from Reviewable |
This allows binaries built from source to run on older machines. Closes #14443.
Updated after #14840, PTAL. |
We should offer some way for users building from source to opt-in to optimizations, but this is better than the current broken state of the world. Reviewed 14 of 14 files at r10. Comments from Reviewable |
Yeah, I think I'll repurpose Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful. Comments from Reviewable |
This allows binaries built from source to run on older machines.
Closes #14443.
This change is