Fix EnableReusableTC and add tests
commit7d1978a063e6c8a46d334dc8e164e7be47642d6f
authorPaul Bissonnette <paulbiss@fb.com>
Thu, 14 Jul 2016 22:14:10 +0000 (14 15:14 -0700)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Thu, 14 Jul 2016 22:30:27 +0000 (14 15:30 -0700)
treee51bfa9d7c90fb87bebf41a95fb9202328e235a0
parent6172fbe844b3193a85fffb59245b7c74796e4a22
Fix EnableReusableTC and add tests

Summary:
- Fix lock rank violation in reclaimTranslation
- Ensure profData is available when running the treadmill
- Cleanup some invalid assertions
- Don't smashCall to nullptr, it's a relative call and that may not fit
- Don't read frozenEnd() if it's been overridden.
- Record all function calls to profile code so that the associated metadata can be cleaned up
- Cleanup some comments
- Add `hhvm.stress_unit_cache_freq` option to stress unit invalidation
- Add `--recycle-tc #n` option to test/run which sets `hhvm.stress_unit_cache_freq` to 1 (invalidate every unit), `hhvm.enable_reusable_tc` to 1 to test TC recycling, and runs with `--count #n`

Fixes https://github.com/facebook/hhvm/issues/6911

Reviewed By: alexmalyshev

Differential Revision: D3548281

fbshipit-source-id: 1774d9449e71d7caa04c47cc9065d8bf3b2eeb10
hphp/runtime/base/execution-context.cpp
hphp/runtime/base/program-functions.cpp
hphp/runtime/base/runtime-option.h
hphp/runtime/base/unit-cache.cpp
hphp/runtime/vm/jit/mc-generator.cpp
hphp/runtime/vm/jit/recycle-tc.cpp
hphp/runtime/vm/jit/recycle-tc.h
hphp/runtime/vm/jit/relocation.cpp
hphp/runtime/vm/jit/srcdb.cpp
hphp/test/run