Tonight during our OpenSolaris BOF at OSCON, PHP core developer Wez Furlong was busy adding a DTrace provider to PHP. After a little bit of work (and a little bit of debugging), we got it working -- and damn is it cool. Wez implemented it as a shared object, which may then be loaded via an explicit extension directive in php.ini. Once loaded, two probes show up: function-entry and function-return. These probes have as their arguments a pointer to the function name, a pointer to the file name, and a line number. This allows one to, for example, get a count of all PHP functions being called:
Page Comments
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.