]> granicus.if.org Git - strace/commit
mmap_cache: add function to enable mmap_cache
authorMasatake YAMATO <yamato@redhat.com>
Fri, 16 Feb 2018 19:37:13 +0000 (04:37 +0900)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 26 Feb 2018 23:22:24 +0000 (23:22 +0000)
commitc4e4ca97bcc7741ebe4762988e16e5d4797779c1
tree2390881ca1d9812170e08ec93ec1715897d9f1c7
parent7f041ed0d95b69c0fa489efa13af074e373c4ed7
mmap_cache: add function to enable mmap_cache

mmap_cache was enabled indirectly via unwind feature.  As now mmap_cache
can be used by other part of strace, a way to enable mmap_cache directly
is needed.

* defs.h (mmap_cache_enable, mmap_cache_is_enabled): New function
prototypes.
* mmap_cache.c (use_mmap_cache): New file local variable.
(mmap_cache_enable, mmap_cache_is_enabled): New functions.
* syscall.c (syscall_exiting_decode): Use mmap_cache_is_enabled()
instead of stack_trace_enabled.
* unwind.c (unwind_init): Invoke mmap_cache_enable.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
defs.h
mmap_cache.c
syscall.c
unwind.c