diff --git a/external/header.php b/external/header.php index c048eca..6e48107 100644 --- a/external/header.php +++ b/external/header.php @@ -55,8 +55,12 @@ */ // this file should not - under no circumstances - interfere with any other application -if (!extension_loaded('xhprof') && !extension_loaded('uprofiler') && !extension_loaded('tideways')) { - error_log('xhgui - either extension xhprof, uprofiler or tideways must be loaded'); +if (!extension_loaded('xhprof') + && !extension_loaded('uprofiler') + && !extension_loaded('tideways') + && !extension_loaded('tideways_xhprof') +) { + error_log('xhgui - either extension xhprof, uprofiler, tideways or tideways_xhprof must be loaded'); return; } @@ -93,6 +97,8 @@ uprofiler_enable(UPROFILER_FLAGS_CPU | UPROFILER_FLAGS_MEMORY, $options); } else if (extension_loaded('tideways')) { tideways_enable(TIDEWAYS_FLAGS_CPU | TIDEWAYS_FLAGS_MEMORY | TIDEWAYS_FLAGS_NO_SPANS, $options); +} elseif (extension_loaded('tideways_xhprof')) { + tideways_xhprof_enable(TIDEWAYS_XHPROF_FLAGS_CPU | TIDEWAYS_XHPROF_FLAGS_MEMORY); } else { if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 4) { xhprof_enable(XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY | XHPROF_FLAGS_NO_BUILTINS, $options); @@ -107,6 +113,8 @@ function () { $data['profile'] = uprofiler_disable(); } else if (extension_loaded('tideways')) { $data['profile'] = tideways_disable(); + } elseif (extension_loaded('tideways_xhprof')) { + $data['profile'] = tideways_xhprof_disable(); } else { $data['profile'] = xhprof_disable(); }