mmap_cache: do not activate unless requested
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 4 May 2018 14:45:44 +0000 (14:45 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 4 May 2018 14:45:44 +0000 (14:45 +0000)
commit1d98b287a4cb6901d369d78126d481508f9e35ef
treeb543022ff88af502c8d1dfe8abfe6f848a451cf6
parenta1ecb2a51c07b644f79c0958b0286b70680b6e3b
mmap_cache: do not activate unless requested

Do not call mmap_cache functions until mmap_cache_enable is invoked.
Change struct mmap_cache_t into a proxy structure, move all mmap_cache
data from struct tcb inside this new structure.

* Makefile.am (strace_SOURCES): Move mmap_cache.c and mmap_cache.h
to libstrace_a_SOURCES.
* defs.h (struct tcb): Remove mmap_cache_size and mmap_cache_generation
* fields.
* mmap_cache.h (struct mmap_cache_t): Rename
to struct mmap_cache_entry_t, create a new struct mmap_cache_t,
all users updated.
(mmap_cache_delete): Remove.
* mmap_cache.c (mmap_cache_delete): Rename to delete_mmap_cache,
add static qualifier.
(build_mmap_cache): Merge into mmap_cache_rebuild_if_invalid.
* strace.c (droptcb): Replace mmap_cache_delete invocation
with tcp->mmap_cache->free_fn.
Makefile.am
defs.h
mmap_cache.c
mmap_cache.h
strace.c
unwind-libunwind.c