Optimize GC trigger check
commitd46c8ffc566db527b01cea97afb2f0af5b62c910
authorBrett Simmers <bsimmers@fb.com>
Wed, 31 Jan 2018 01:19:38 +0000 (30 17:19 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Wed, 31 Jan 2018 01:44:02 +0000 (30 17:44 -0800)
tree63d44feec6091764d7fa5ae6e4b55ec293db5e67
parent4bd14080fae739487533ef988e47bcbf7bc15ba2
Optimize GC trigger check

Summary:
Trim the meat of the check down to one comparison by setting m_nextGC
to INT64_MAX when the GC is disabled and moving the rds::header() check to
resetGC(), which happens just a handful of times per request. A call to
checkGC() now only adds two instructions to the hot path.

Reviewed By: edwinsmith

Differential Revision: D6797196

fbshipit-source-id: bdc3a274d1485505a73439c39e94e556f59f9dad
hphp/runtime/base/heap-collect.cpp
hphp/runtime/base/memory-manager-inl.h
hphp/runtime/base/memory-manager.cpp
hphp/runtime/base/memory-manager.h
hphp/runtime/base/program-functions.cpp