Repository navigation
feat!: ship one binary — bundle exec-harness and memtrack, drop the LD_PRELOAD hack #531
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
Merged
+785
−1,241
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
64e9887
build(memtrack): support building against musl
GuillaumeLagrange 977c3ed
refactor(memtrack, exec-harness): move the CLI into the library
GuillaumeLagrange 297e9b5
feat(exec-harness): track subprocesses instead of preloading a library
GuillaumeLagrange 7f76a54
feat: bundle exec-harness into the runner binary
GuillaumeLagrange 407baca
feat(memory): bundle memtrack into the runner binary
GuillaumeLagrange 141aa5f
test: run the executor tests in release
GuillaumeLagrange 5c86dc3
feat(instrument-hooks): declare benchmarks run in another process
lvaroqui File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Nothing here is `force = true`, so a shell exporting `CFLAGS` or `CPATH` wins | ||
| # and breaks the musl build. | ||
| # | ||
| # `libbpf-sys` vendors elfutils, whose `configure` looks for `argp`, `obstack` | ||
| # and `fts`; musl has none of them, so it stops before libelf even though a | ||
| # libelf-only build never calls them. Pre-seeding the cache skips the checks. | ||
| # Only autoconf reads these names, so a gnu build is unaffected. | ||
| # Upstream tracks this at https://github.com/libbpf/libbpf-sys/issues/153. | ||
| [env] | ||
| ac_cv_search_argp_parse = "none required" | ||
| ac_cv_search__obstack_free = "none required" | ||
| ac_cv_search_fts_close = "none required" | ||
|
|
||
| # The `argp.h` stub. `CPATH` and not a `-I` in the flags below, because | ||
| # `relative = true` only works on a bare path. It is therefore global to the | ||
| # build, so the stub defers to the real header wherever one exists. | ||
| CPATH = { value = "crates/memtrack/musl", relative = true } | ||
|
|
||
| # Debian's musl-gcc runs with -nostdinc, so the kernel UAPI headers libbpf needs | ||
| # have to be added back, last so they never shadow the toolchain's own. Scoped | ||
| # per target: cc-rs looks up `CFLAGS_<target>` before `CFLAGS`, and libbpf-sys | ||
| # builds zlib, elfutils and libbpf from `cc::Tool::cflags_env()`. | ||
| CFLAGS_x86_64_unknown_linux_musl = "-idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include" | ||
| CFLAGS_aarch64_unknown_linux_musl = "-idirafter /usr/include/aarch64-linux-gnu -idirafter /usr/include" | ||
|
|
||
| # rustc links with `-nodefaultlibs`; libbpf's C code needs the outline-atomic | ||
| # helpers from libgcc on aarch64. | ||
| [target.aarch64-unknown-linux-musl] | ||
| rustflags = ["-C", "link-arg=-lgcc"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.