Adjust starting address of TC automatically.
commit4498e2b25bc17ace502b4c86c551dbab25f284bf
authorMaksim Panchenko <maks@fb.com>
Wed, 27 May 2015 22:35:56 +0000 (27 15:35 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Wed, 27 May 2015 23:00:39 +0000 (27 16:00 -0700)
tree1da510e48e7ff681b1040bbb63f05351cd5b61db
parent3ecb3e99619f1c5b8189748a98f9670b3f20d59d
Adjust starting address of TC automatically.

Summary: HHVM performance can get affected by a size of .text section.
Every size increase of 2MB causes TC to start at a new boundary.
It appears that if the new boundary is offset from the start
of hot text by even number of 2MB pages, we get penalized.
This diff is meant to stabilize performance by keeping
the distance at odd number of 2MB pages regardless of .text
size and location.

Reviewed By: @markw65

Differential Revision: D2103054
hphp/runtime/base/program-functions.cpp
hphp/runtime/base/runtime-option.h
hphp/util/code-cache.cpp
hphp/util/code-cache.h