2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
16 #ifndef incl_HPHP_TC_RELOCATE_H_
17 #define incl_HPHP_TC_RELOCATE_H_
23 #include "hphp/runtime/vm/jit/code-cache.h"
24 #include "hphp/runtime/vm/jit/srcdb.h"
25 #include "hphp/runtime/vm/srckey.h"
36 //////////////////////////////////////////////////////////////////////
40 std::string
perfRelocMapInfo(
42 TCA coldStart
, TCA coldEnd
,
43 SrcKey sk
, int argNum
,
44 const GrowableVector
<IncomingBranch
> &incomingBranches
,
47 bool relocateNewTranslation(TransLoc
& loc
, CodeCache::View cache
,
49 TCA
* adjust
= nullptr);
52 * Relocate a new translation into a free region in the TC and update the
55 * Attempt to relocate the main, cold, and frozen portions of the translation
56 * loc into memory freed memory in the TC their respective code blocks. In
57 * addition, reusable stubs associated with this translation will be relocated
58 * to be outside of loc so that they can be managed separately.
60 void tryRelocateNewTranslation(SrcKey sk
, TransLoc
& loc
,
61 CodeCache::View code
, CGMeta
& fixups
);
63 //////////////////////////////////////////////////////////////////////