优胜美地系统红宝石上缺少dtrace探针 [英] dtrace probes missing on yosemite system ruby

查看:130
本文介绍了优胜美地系统红宝石上缺少dtrace探针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在全新的优胜美地安装程序(您可以从Mac商店下载的版本)上,似乎缺少ruby dtrace提供程序:

On a fresh yosemite install (the one you can download from the mac store) it seems that the ruby dtrace provider is missing:

$ sudo dtrace -l -P ruby
   ID   PROVIDER            MODULE                          FUNCTION NAME
dtrace: failed to match ruby:::: No probe matches description

下载/安装Xcode 6.2 6C131e + CLT并没有帮助,使用(rbenv | ruby​​-build | rvm | ruby​​-install)和--enable-dtrace安装ruby一样.

Downloading/ installing Xcode 6.2 6C131e + CLT does not help, as does installing ruby with (rbenv|ruby-build|rvm|ruby-install) and --enable-dtrace.

我被困住了.如何安装缺少的ruby.usdt?我真的很想将dtrace与ruby一起使用.

I'm stuck. How can I install the missing ruby.usdt ? I'd really like to use dtrace with ruby.

无论如何,来自dtrace的appart可以正常工作.

Anyway, appart from that dtrace works fine.

$ dtrace -V
dtrace: Sun D 1.12.1

想法?

推荐答案

我认为这里有几件事在起作用.我认为现在没有红宝石供应商了.仅当您运行或正在运行红宝石进程时,Ruby探针才可用.例如:

I think there are several things at play here. I don't think there is a ruby provider (anymore). Ruby probes will only be available if you run or have a running ruby process. For example:

sudo dtrace  -c 'ruby -v' -l -m ruby

在我的系统上创建以下输出:

creates the following output on my system:

   ID   PROVIDER            MODULE                          FUNCTION NAME
315346  ruby85332              ruby                   empty_ary_alloc array-create
315347  ruby85332              ruby                           ary_new array-create
315348  ruby85332              ruby                     vm_call_cfunc cmethod-entry
315349  ruby85332              ruby                     vm_call0_body cmethod-entry
315350  ruby85332              ruby                      vm_exec_core cmethod-entry

请注意,提供者是'ruby85332',其中'85332'是进程ID.因此,您为每个红宝石流程提供了不同的提供商.

Note, the provider is 'ruby85332' where '85332' is the process id. So you have a different provider for each ruby process.

关于rvm,默认启用dtrace.所以--enable-dtrace in

Regarding rvm, enabling dtrace is the default. So --enable-dtrace in

`rvm install ruby-2.0.0 --enable-dtrace`

确实不需要

.另一方面,如果您在dtrace需要root/sudo特权的计算机上工作,由于编译过程无法调用dtrace,因此dtrace探针仍不会编译.

is really not needed. On the other hand, if you are working on a machine where dtrace requires root/sudo privileges, the dtrace probes will still not compiled, since the compilation process cannot call dtrace.

我个人在dtrace可执行文件上设置了SUID标志.在我的世界中,这应该可行,并且确实可以在编译日志中看到安装过程试图编译dtrace探针.但是,构建仍然会失败,并出现一些有关"dev/fd"的错误.对我有用的是通过rvm mount使用预编译的ruby vm版本.例如:

Personally I have the SUID flag set on the dtrace executable. In my world this should work and I can indeed see in the compilation log that the install process tries to compile the dtrace probes. However, the build still fails with some error regarding 'dev/fd'. What worked for me was to use a pre-compiled version of the ruby vm via rvm mount. For example:

rvm mount -r https://rvm.io/binaries/osx/10.10/x86_64/ruby-2.0.0-p451.tar.bz2

通过上面的命令安装的红宝石也是我用来创建示例探针列表的红宝石.

The ruby installed via the command above is also the one I used to create the sample probe listing.

这篇关于优胜美地系统红宝石上缺少dtrace探针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆