The PHP function getrusage() invokes the system call of the same name with RUSAGE_SELF, which requests usage information for the calling process. Callers of getrusage() in MediaWiki assume the PHP process is not shared by multiple requests, and that the resource usage measured by RUSAGE_SELF is thus attributable to the current request. These assumptions are false under HHVM.
Unfortunately, the getrusage() PHP function currently does not allow callers to request RUSAGE_THREAD info. I submitted a pull-request to HHVM to add this feature: https://github.com/facebook/hhvm/pull/3632. We need to update ParserOutput::getTimes and Profiler::getTime once it is merged.
The other caller of getrusage() is a benchmarkParse.php. It doesn't need to be fixed, because it's a standalone maintenance script.
Version: unspecified
Severity: normal
URL: https://github.com/facebook/hhvm/pull/3632