Skip to content
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

ruby_3_1,ruby_3_0,ruby_2_7: allow enabling dtrace support on linux #220103

Merged
merged 1 commit into from
Mar 11, 2023

Conversation

viraptor
Copy link
Contributor

@viraptor viraptor commented Mar 8, 2023

Description of changes

Allow enabling dtrace on linux.

Verified to work with bpftrace -p (pid-of-ruby) -l:

sudo bpftrace -p 320064 -l
uprobe:/proc/320064/root/nix/store/fryagbkvxwrmqg4lrdhk0h4sd8q3kkxk-ruby-3.1.2/bin/ruby:__do_global_dtors_aux
uprobe:/proc/320064/root/nix/store/fryagbkvxwrmqg4lrdhk0h4sd8q3kkxk-ruby-3.1.2/bin/ruby:_dl_relocate_static_pie
(...)
usdt:/proc/320064/root/nix/store/fryagbkvxwrmqg4lrdhk0h4sd8q3kkxk-ruby-3.1.2/lib/libruby-3.1.2.so.3.1.2:ruby:array__create
usdt:/proc/320064/root/nix/store/fryagbkvxwrmqg4lrdhk0h4sd8q3kkxk-ruby-3.1.2/lib/libruby-3.1.2.so.3.1.2:ruby:cmethod__entry
(...)
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@@ -34,6 +35,7 @@ let
, libyaml, yamlSupport ? true
, libffi, fiddleSupport ? true
, jemalloc, jemallocSupport ? false
, linuxPackages, systemtap ? linuxPackages.systemtap, libsystemtap, dtraceSupport ? false
Copy link
Contributor Author

@viraptor viraptor Mar 8, 2023

Choose a reason for hiding this comment

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

systemtap in theory depends on the kernel version. In practice it (currently) doesn't for the dtrace utility.
This may get less messy in the future.

I thought systemtap overrideable attribute will be easier to understand / provide a substitute for.

@github-actions github-actions bot removed 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python 6.topic: rust 6.topic: qt/kde 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: xfce The Xfce Desktop Environment 6.topic: GNOME GNOME desktop environment and its underlying platform labels Mar 10, 2023
@viraptor
Copy link
Contributor Author

Sorry for notification spam. GH got a bit carried away when changing base to staging :(

@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 10, 2023
@viraptor viraptor merged commit 4f6f5f4 into NixOS:staging Mar 11, 2023
@viraptor viraptor deleted the ruby-dtrace-linux branch March 11, 2023 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant