From Stretch component/php72 we have php-xdebug 2.7.0-1+wmf1 and it has some performance issue doing way too many getpid calls.
Upstream issue: https://bugs.xdebug.org/bug_view_page.php?bug_id=00001641
I thus could use an upgrade to xdebug 2.7.1, or at least the inclusion of upstream commit https://github.com/xdebug/xdebug/commit/df17570fd52846baa7134f350547970644a8d1d5 Potentially even just upgrade to 2.7.2
target
The php-xdebug package is for the CI Docker containers
There are a couple production hosts using it releases* but the package should be removed from them: T236774
Xdebug Changelog
[2019-05-06] — Xdebug 2.7.2
Fixed Bugs Fixed bug #1488: Rewrite DBGp 'property_set' to always use eval Fixed bug #1586: error_reporting()'s return value is incorrect during debugger's 'eval' command Fixed bug #1615: Turn off Zend OPcache when remote debugger is turned on Fixed bug #1656: remote_connect_back alters header if multiple values are present Fixed bug #1662: __debugInfo should not be used for user-defined classes[2019-04-05] — Xdebug 2.7.1
Fixed Bugs Fixed bug #1646: Missing newline in error message Fixed bug #1647: Memory corruption when a conditional breakpoint is used Fixed bug #1641: Perfomance degradation with getpid syscall (Kees Hoekzema)
Xdebug is used for generating PHPUnit code coverage report. I noticed the issue while doing a system wide perf showing:
Samples: 34K of event 'cpu-clock', Event count (approx.): 346343430880 Overhead Command Shared Object Symbol 85.31% swapper [kernel.kallsyms] [k] native_safe_halt 3.77% php [kernel.kallsyms] [k] __bpf_prog_run 2.04% php libc-2.24.so [.] __getpid # <<------ OOPS 0.84% php xdebug.so [.] 0x00000000000165d5 0.84% php xdebug.so [.] 0x000000000001665b
And found the upstream bug report by pure luck :]