-
Notifications
You must be signed in to change notification settings - Fork 10
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 FreeBSD support #63
Open
michael-yuji
wants to merge
14
commits into
oxidecomputer:master
Choose a base branch
from
michael-yuji:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on Jun 4, 2022
-
Check if dli_sname and dli_fname are null pointers.
On some implementation of `dladdr`, the `dli_sname` and `dli_fname` can be null even if the `dladdr` itself succeed.
Configuration menu - View commit details
-
Copy full SHA for fee7900 - Browse repository at this point
Copy the full SHA fee7900View commit details -
Add preliminary FreeBSD support
FreeBSD implemented DTrace fairly standardly in compare to Illumos. 1. build.rs This patch enable FreeBSD to be treated as a "standard" implementation with no linker supported in the usdt build.rs. 2. The values to issue ioctl to dtrace helper are different. 2.1. The cmd value on FreeBSD is derived the C macro `_IOWR('z', 3, dot_helper_t)`; which is unfolded and the value is inlined in this patch. 2.2 The struct dof_helper is also different, in FreeBSD there are two extra fields: `dofhp_pid` and `dofhp_gen`. 3. Linker Issue Like Illumos, without `FORCE_LOAD` line the linker will omit the symbols (even with "-C link-dead-code"); therefore the line also needed to activate on FreeBSD. There are however still issues in linker that make the FreeBSD support preliminary, on FreeBSD the crate consumer need to build with "-C link-dead-code", or otherwise the probes will thrown away by the linker.
Configuration menu - View commit details
-
Copy full SHA for 678324e - Browse repository at this point
Copy the full SHA 678324eView commit details
Commits on Jun 6, 2022
-
FreeBSD: support nightly and stable(link-dead-code)
Provide a macro version of register_probes!() enables a explicit reference to the set_dtrace_probes section from the crate consumer, and prevent lld from gc the section. This trick along with the unstable "used(linker)" feature enable use on FreeBSD target with nightly toolchain without explicit "link-dead-code" Since the "used_with_arg" is available only on nightly, a patch is applied on usdt-impl/build.rs such that standard backend is enabled only for FreeBSD targets that are either on nightly or have link-dead-code explicitly passed to the linker.
Configuration menu - View commit details
-
Copy full SHA for 700ca3d - Browse repository at this point
Copy the full SHA 700ca3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for d5c1701 - Browse repository at this point
Copy the full SHA d5c1701View commit details
Commits on Jun 7, 2022
-
Remove register_probes! macro, and use R flag for sections instead
Turns out we do not need all the hacks to get FreeBSD linker working. GNU and llvm both support the "R" flag for sections, which prevent them from gc. This make the ugly register_probes! hack obsolete so it can be removed. No one deserve to have it in their codebase. https://lists.freebsd.org/archives/freebsd-hackers/2022-June/001191.html
Configuration menu - View commit details
-
Copy full SHA for b9910f1 - Browse repository at this point
Copy the full SHA b9910f1View commit details
Commits on Jun 8, 2022
-
Configuration menu - View commit details
-
Copy full SHA for d9cd365 - Browse repository at this point
Copy the full SHA d9cd365View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65f1bfd - Browse repository at this point
Copy the full SHA 65f1bfdView commit details
Commits on Jun 10, 2022
-
Use libexecinfo to determine dli_sname and dli_fname on FreeBSD
FreeBSD dladdr(3M) examine dynamic symbol table only hence never give use the mangled symbol. Instead, we use `backtrace_symbols_fmt` to give us the symbol. Handle backtrace_symbols_fmt and ffi a bit more carefully
Configuration menu - View commit details
-
Copy full SHA for f66766b - Browse repository at this point
Copy the full SHA f66766bView commit details
Commits on Jun 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0cadb0f - Browse repository at this point
Copy the full SHA 0cadb0fView commit details
Commits on Nov 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2f0774d - Browse repository at this point
Copy the full SHA 2f0774dView commit details
Commits on Nov 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8b02b21 - Browse repository at this point
Copy the full SHA 8b02b21View commit details
Commits on Mar 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for af5152d - Browse repository at this point
Copy the full SHA af5152dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a3f63b - Browse repository at this point
Copy the full SHA 3a3f63bView commit details
Commits on Jul 2, 2023
-
Merge remote-tracking branch 'upstream/master'
yuuji committedJul 2, 2023 Configuration menu - View commit details
-
Copy full SHA for bf1ce14 - Browse repository at this point
Copy the full SHA bf1ce14View commit details
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.