Move tsd link and in_hook after tcache.

This can lead to better cache utilization down the common paths where we don't
touch the link.
This commit is contained in:
David Goldblatt
2018-06-21 13:02:49 -07:00
committed by David Goldblatt
parent 50820010fe
commit d1e11d48d4
4 changed files with 17 additions and 15 deletions

View File

@@ -130,9 +130,9 @@ hook_reentrantp() {
*/
static bool in_hook_global = true;
tsdn_t *tsdn = tsdn_fetch();
bool *in_hook = tsdn_in_hookp_get(tsdn);
if (in_hook != NULL) {
return in_hook;
tcache_t *tcache = tsdn_tcachep_get(tsdn);
if (tcache != NULL) {
return &tcache->in_hook;
}
return &in_hook_global;
}