Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Jones:
DTrace with PHP Update
Sep 05, 2013 @ 14:06:16

Chris Jones has posted an update to his previous article about DTrace and PHP (found here) and some of the updates Oracle has made to introduce things like "user-level statistically defined tracing" (USDT).

At the end of last year, I blogged about Adding DTrace Probes to PHP Extensions and how Linux's SystemTap could be used to trace the DTrace probe points. Since then, Oracle's Linux's DTrace project has been making great strides. The latest Oracle Linux UEK3 Beta kernel was just released. It comes with DTrace 0.4 and also supports "User-Level Statically Defined Tracing" (USDT) for the first time. This motivated me to make sure PHP DTrace worked well with "real" DTrace, not just with SystemTap's wrappers.

He also includes a list of the other updates in this version like:

  • DTrace build script changes from PHP 5.5 were merged back to PHP 5.4
  • A 'make install' recursive dependency issue that caused Zend/zend_dtrace.d to be deleted was fixed.
  • PHP DTrace configuration now uses the correct PIC or non-PIC objects. This also fixed building PHP when any extensions were built 'shared'.
  • PHP's OCI8 2.0 extension now builds correctly with "real" DTrace.

He finishes off the post with the list of steps you'll need to follow to get this latest version up and running.

tagged: dtrace oracle update systemtap linux

Link: https://blogs.oracle.com/opal/entry/dtrace_with_php_update

David Parra:
Probing PHP with Systemtap on Linux
Dec 05, 2012 @ 16:41:30

David Parra has a new post to his site today about a method of using Systemtap to profile PHP as the code executes (as an alternative when DTrace may not be available.

PHP introduced DTrace support with PHP 5.3, enabling probing points in the PHP executable that can be used to simplify probing of PHP applications without having to the PHP implementation details. We enabled probes on function calls, file compilation, exceptions and errors. But this has always been limited to the operating systems that support DTrace. With the popularity of DTrace, Systemap programmers decided to add a DTrace compatibility layer that allows to use DTrace probes as Systemtap probing points as well.

Thanks to a recent commit to the PHP 5.5 branch, your PHP installation (compiled with DTrace support) can be executed with the "stap" command and searched for probe points. He includes a simple Systemtap script that counts the calls of a specific function to get you started.

tagged: probe profile systemtap dtrace compile tutorial

Link:


Trending Topics: