Skip to content

Commit d438927

Browse files
report PHP flavour (NTS vs ZTS) (#2536)
1 parent 85997a2 commit d438927

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

profiling/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,15 @@ extern "C" fn rinit(_type: c_int, _module_number: c_int) -> ZendResult {
516516
// standardized tag name.
517517
add_tag(&mut tags, "runtime_version", PHP_VERSION.as_str());
518518
add_tag(&mut tags, "php.sapi", SAPI.as_ref());
519+
// In case we ever add PHP debug build support, we should add `zend-zts-debug` and
520+
// `zend-nts-debug`. For the time being we only support `zend-zts-ndebug` and
521+
// `zend-nts-ndebug`
522+
let runtime_engine = if cfg!(php_zts) {
523+
"zend-zts-ndebug"
524+
} else {
525+
"zend-nts-ndebug"
526+
};
527+
add_tag(&mut tags, "runtime_engine", runtime_engine);
519528
cell.replace(Arc::new(tags));
520529
});
521530

0 commit comments

Comments
 (0)