如何激活sh DTrace Provider? [英] How to activate sh DTrace Provider?

查看:83
本文介绍了如何激活sh DTrace Provider?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了有关更新)用于2007年的x86 sh二进制文件,以支持sh DTrace提供程序.

I've found out about patches (and updates) for an x86 sh binary in 2007 to support sh DTrace provider.

但是我在OS X上找不到任何探针.我通过以下方式进行检查:

However I can't find any probes on OS X. I'm checking by:

$ sudo dtrace -l | grep command-entry

请参见:/bin/sh DTrace Provider (在Oracle网站上(博客)

See: /bin/sh DTrace Provider at Oracle site (same article on blog)

也许是因为我的sh与GNU bash相同?

Maybe because my sh is the same as GNU bash?

$ /bin/sh --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)

实施这些探针的位置,如何找到它们或如何激活它们?

Where these probes were implemented, how I can find them or how I can activate them?

仅在Solaris上实现吗?

Were there only implemented on Solaris?

推荐答案

您所指的修补程序特定于Solaris上的bourne shell,据我所知,它从未移植到其他shell.

The patches you refer to were specific to the bourne shell on Solaris, and as far as I know nothing like it has ever been ported to other shells.

在illumos(néeOpenSolaris)提交历史记录中,我们可以看到在提交

In the illumos (née OpenSolaris) commit history, we can see that /bin/sh was changed to be a symlink to ksh93 in commit ead1f93 on March 2, 2010. Considering that Alan's blog post is dated 2007, this wasn't included in Solaris 10, at least not initially since Solaris 10 was released in 2005. It may be in one of the updates post 2007 but I sort of doubt it. From the existing code, I can't even find what provided /bin/sh before the switch to ksh, which might mean it was one of the closed bits.

无论哪种方式,它都不是任何illumos版本的一部分,而且我在illumos提交历史中看不到对command-entry的dtrace探针的任何引用.除非艾伦(Alan)或其他接近此事的人能说出来,否则可能会浪费时间.

Either way, it was never part of any illumos release and I don't see any references to dtrace probes for command-entry in the illumos commit history. Unless Alan or somebody else close to the matter can speak up, it's probably lost to time.

总而言之,据我所知,这些补丁从未包含在Sun发行的任何其他产品中.几乎可以肯定,必须在任何现有的开源Shell上从头开始重新实现它.

In summary, as near as I can tell these patches were never included in any released product from Sun or otherwise. It will almost certainly have to be reimplemented from scratch on any existing open source shell.

这篇关于如何激活sh DTrace Provider?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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