Developer aims for Dtrace on FreeBSD

Developer aims for Dtrace on FreeBSD

Summary: update One of the most useful tidbits from the basket of code released into the public domain this year by Sun Microsystems is likely to make it to the FreeBSD platform. Sun's Dynamic Tracing (DTrace) tool is one of the most-touted features of the company's Solaris 10 operating system, released in January, and provides advanced performance analysis and debugging features for server software.

SHARE:
TOPICS: Oracle
2
update One of the most useful tidbits from the basket of code released into the public domain this year by Sun Microsystems is likely to make it to the FreeBSD platform.

Sun's Dynamic Tracing (DTrace) tool is one of the most-touted features of the company's Solaris 10 operating system, released in January, and provides advanced performance analysis and debugging features for server software. "DTrace is like being in a nudist colony," Sun developer Alan DuBoff said at the time. "There are no secrets--not even for Solaris."

The tool is currently being ported to FreeBSD by Devon O'Dell, a FreeBSD developer working for OffMyServer, a US-based vendor which sells servers running BSD and Linux variants.

DTrace was released by Sun under the Community Development and Distribution License (CDDL). The terms of the licence generally prohibit the software from intermingling with the popular GNU Public Licence, but are broadly compatible with others such as the licence used by FreeBSD and its sister BSD projects.

O'Dell told ZDNet Australia  the aim of the project -- which commenced a month ago -- was that all scripts and applications that utilised DTrace under its native Solaris environment should be able to run in FreeBSD with no changes.

While FreeBSD's existing ktrace function was similar to DTrace, it was limited in scope, according to O'Dell. "FreeBSD implements a somewhat similar facility for dynamically instrumenting syscalls for any given application," he said.

"I've used it quite often for debugging applications (most notably mail servers when I can't figure out why their configuration files aren't working). It has a good few shortcomings and doesn't give you nearly the granular scope opf instrumentation that DTrace does."

"Other various applications exist or have been ported that do implement other features accomplished by DTrace, but none provide all of the information one can obtain from DTrace."

O'Dell said he had spoken with various Sun engineers about the project, including Bryan Cantrill, one of three engineers Sun has working internally on DTrace development.

According to O'Dell, both Cantrill and another Sun engineer, Keith Wesolowski, had urged him to start work on the project.

Despite initial misgivings, the developer was convinced to undertake the work after watching a presentation Cantrill and PHP developer Wez Furlong gave at publisher O'Reilly's open source convention in the United States in early August.

That session demonstrated the potential for DTrace to improve performance in the PHP Web scripting language. A similar integration has since been built for the Ruby programming language.

"Over lunch, we discussed what it would take to get it running in FreeBSD," said O'Dell of one conversation with Cantrill and Wesolowski.

Work in progress
The developer said progress on the project was slow, but going ahead. His first task is to get the core DTrace software libraries working on FreeBSD, after which he'll work on more detail.

A stumbling block has been differences between the executable file format used in Solaris and that used in FreeBSD. While both - and indeed most Unix-based operating systems -- use a format named ELF, some internals of the format differ between the two.

O'Dell is currently working solo on the project, but is being supported by his employer with some unused hardware.

"It's a lot of work, but it's certainly doable," he wrote on his blog mid-way through last month. "I'm certainly hoping to have at least some functionality by the end of this year."

On his own blog, Cantrill pledged his support to the project. "We on Team DTrace are available to help out in any way we can," he wrote around the same time.

Topic: Oracle

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

2 comments
Log in or register to join the discussion
  • Dtrace is not public domain

    "One of the most useful tidbits from the basket of code released into the public domain this year by Sun Microsystems is likely to make it to the FreeBSD platform."<br><br>

    Dtrace is not released as public domain software! It is released under a Sun license that is compatible to BSD licenses but is NOT GPL compatible (so Dtrace can not be used in the majority of open source software).

    This should not be a flame war in favor of/against the GPL but just to correct the statement in the article.<br><br>

    While I wished that every vendor would release its open source software under a GPL compatible license (new BSD, LGPL, GPL), Sun has certainly the right to decide under which license they release their software.<br><br>

    fs
    anonymous
  • CDDL != public domain

    As another poster has pointed out, DTrace is not public domain. Neither is OpenSolaris in its entirety. Sun holds the copyright on both, and has elected to license the code under a highly flexible license called the CDDL.

    If they'd released it into the public domain, they'd be relinquishing their copyright on the code instead. It's an entirely different thing.

    It's important not to equate open source license with the public domain. Open source licenses in fact rely on copyright, the opposite of the public domain.
    anonymous