Bug 55793

Summary: DTrace/SystemTap support
Product: Apache httpd-2 Reporter: Sergey Klyaus <Sergey.Klyaus>
Component: CoreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: enhancement CC: petr.sumbera
Priority: P2    
Version: 2.4.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Patch to support DTrace/SystemTap for Apache 2.4.6
Modified version for 2.4.9

Description Sergey Klyaus 2013-11-18 14:41:44 UTC
Created attachment 31051 [details]
Patch to support DTrace/SystemTap for Apache 2.4.6

Hi!

DTrace support were implemented in Apache 2.3.0, but it never been buildable.
There is a patch to fix that: http://people.apache.org/~trawick/httpd-trunk-dtrace.html but it is a bit out-of-date

I've upgraded patch to stable apache version (2.4.6) + added SystemTap (Linux) support and tested build with and without --enable-dtrace on Solaris 11 and CentOS Linux 6.4. 

However, I have some concerns about original patch:
1. It's a bit tricky: needs to create a lot of intermediate files if building with DTrace/SystemTap support
2. Hook probes are actually useless because they do not provide hook function arguments to DTrace/SystemTap

BR, Sergey.
Comment 1 Petr Sumbera 2014-05-27 13:14:36 UTC
Created attachment 31665 [details]
Modified version for 2.4.9

Modified for version 2.4.9 and for building outside of source directory.
Comment 2 Sergey Klyaus 2015-06-17 21:30:06 UTC
It seems that original patch is a bit incorrect, it didn't exclude apache_noprobes.h from export files. And in some cases (observed at CentOS 7, which is probably has newer GCC), apache_noprobes.h redefined probes and ruined SystemTap USDT probes. 

This small command fixes this:

   $ sed -i 's/apache_probes.h/"apache_.*probes.h"/' server/Makefile.in

Sorry that I'm too lazy to create a new patch.