WL#7894: Improve dtrace support on Oracle Linux 6

Affects: Server-5.7   —   Status: Complete

Background

 dtrace was initially developed by Sun for Solaris 10, however
 original work has been ported to both FreeBSD[1] and Mac OS X
 10.5[2].
 
 MySQL has included support for userland dtrace tracing since MySQL
 5.5[1].

Current status
 
dtrace support is enabled and built if the build system (cmake) detects the
"dtrace" command on the system.
 
Currently, shipped server builds on Solaris and Mac OS X have dtrace support
included.

We now start supporting dtrace in the Server 5.6 and newer packages we ship for
Oracle Linux 6 and newer. Our cmake setup does  not correctly detect dtrace on
Linux even on machines that have the  dtrace enabled kernel and tools. A patch
exists for this.
 
Scope

 The scope of dtrace support for this WL is limited to Oracle Linux 6
 and newer with UEK kernel. No significant adverse effects (primarily
 compatibility, performance) must be observable on related platforms
 that do not support dtrace but use the same MySQL Server binaries
 (See the Status and Requirements sections)

 At least support for the original dtrace on Oracle Linux 6 and newer
 is required. More testing of the dtrace features in MySQL is also
 needed.

 When packages with original dtrace support on Linux are available,
 testing must be performed to check for any compatibility or
 performance issues.

Details

 Improvements to cmake/dtrace.cmake is needed to improve detection of
 available dtrace technology and enable on the "OL 6 with UEK kernel
 platform".

Testing
 
 Add tests to MTR checking availability and at least minimal
 functioning of dtrace features.
 
 Note: testing might need privileged user account.

 Check for any performance regressions, with special care of Linux on
 platforms with and without original dtrace support.

 Add SysQA tests to check release packages for included dtrace
 support.

 
References

[1]: Enabled by default since FreeBSD 9.2. https://wiki.freebsd.org/DTrace
[2]: https://en.wikipedia.org/wiki/DTrace#Supported_platforms
[3]: https://dev.mysql.com/doc/refman/5.5/en/dba-dtrace-server.html

User Documentation
==================

http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-20.html
http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-5.html
(these announce the new support)
http://dev.mysql.com/doc/refman/5.6/en/dba-dtrace-server.html
http://dev.mysql.com/doc/refman/5.7/en/dba-dtrace-server.html
(these just add OL6/UEK to the list of supported platforms)
Requirements

 Enable server builds with dtrace on Oracle Linux 6 using default
 cmake values and/or cmake build options.