Hi, i am trying to play with Oracle Dtrace for Linux. I have installed Oracle Linux with beta UEK kernel (3.8.13-13.el6uek.x86_64) and dtrace packages/modules. To enable dtrace with PHP i compiled it from the source, with
'./configure' '--prefix=/usr/local/php54' '--enable-dtrace' '--with-apxs2' '--enable-mysqlnd' '--with-pdo-mysql' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--enable-fpm'
configuration line. If i am running php from command line i can see dtrace probes. E.g. after starting /usr/local/php54/bin/php in the second window
[root@oracle ~]# dtrace -l|grep php
642 php2201 php dtrace_compile_file compile-file-entry
643 php2201 php dtrace_compile_file compile-file-return
644 php2201 php zend_error error
645 php2201 php ZEND_CATCH_SPEC_CONST_CV_HANDLER exception-caught
646 php2201 php zend_throw_exception_internal exception-thrown
647 php2201 php dtrace_execute execute-entry
648 php2201 php dtrace_execute_internal execute-entry
649 php2201 php dtrace_execute execute-return
650 php2201 php dtrace_execute_internal execute-return
651 php2201 php dtrace_execute function-entry
652 php2201 php dtrace_execute function-return
653 php2201 php php_request_shutdown request-shutdown
654 php2201 php php_request_startup request-startup
But if i am starting it as apache module (mod_php) it does not work for some reason, i don`t see any dtrace probes in the list. Also i tried to use php-fpm (fastcgi) sapi but no luck as well. What i did to solve this:
Unfortunately i am still not able to find dtrace probles in the list. Could you please help with this? This is virtual machine, and i can provide it if needed.
I mentioned one OL DTrace fork bug in my blog about using PHP with DTrace: https://blogs.oracle.com/opal/entry/using_php_dtrace_on_oracle
I expect you are hitting that.
If it helps other readers, there are now some prebuilt PHP RPMs on our "playground" channel /repo/OracleLinux/OL6/playground/latest/x86_64/ purely for testing. They are for PHP 5.5.3 with some configuration patches now available in PHP 5.5.4.
PHP 5.5.4 (and PHP 5.4.20) contain all the fixes I recently merged to stabilize configuration with DTrace on Linux & Solaris. I put PHP 5.5.4 into our build system yesterday and have requested the playground channel be updated.
Thank you for reply, i hope this bug will be fixed in a next release. I have 2 more questions:
We really appreciate you testing this all out.
Did you see the MySQL comments in Re: UEK3/Beta 1 - Using USDT stucks mysqld to 100% CPU Also see MySQL Bugs: #60743: typo in cmake/dtrace.cmake
There might be other build steps I don't know about.
Can you start a new thread abot the copyinstr issue? kvh and the team might or might not already know about it.
Thank you for reply and all your efforts to make a dtrace port, i`m really missing it on Linux.
I did a very similar patch to one from thread you mentioned (without it build was failing) but it does not help. I think main difference with this thread is that i am using to get data from the client lib, not from the MySQL server. And i am not sure that in this scenario this probes are properly registred when library loads. It would be great if someone from Oracle could take a look on this.