From: Dmitry V. Levin Date: Thu, 3 May 2018 23:43:38 +0000 (+0000) Subject: mmap_cache: remove mmap_cache_is_enabled X-Git-Tag: v4.23~225 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1ecb2a51c07b644f79c0958b0286b70680b6e3b;p=strace mmap_cache: remove mmap_cache_is_enabled This function is no longer used and could be removed. * mmap_cache.c (mmap_cache_is_enabled): Remove. * mmap_cache.h: Likewise. --- diff --git a/mmap_cache.c b/mmap_cache.c index 2abb87d6..d0ea4ddd 100644 --- a/mmap_cache.c +++ b/mmap_cache.c @@ -34,7 +34,6 @@ #include "xstring.h" static unsigned int mmap_cache_generation; -static bool use_mmap_cache; static void mmap_cache_invalidate(struct tcb *tcp, void *unused) @@ -55,17 +54,14 @@ mmap_cache_invalidate(struct tcb *tcp, void *unused) void mmap_cache_enable(void) { + static bool use_mmap_cache; + if (!use_mmap_cache) { mmap_notify_register_client(mmap_cache_invalidate, NULL); use_mmap_cache = true; } } -extern bool mmap_cache_is_enabled(void) -{ - return use_mmap_cache; -} - /* * caching of /proc/ID/maps for each process to speed up stack tracing * diff --git a/mmap_cache.h b/mmap_cache.h index 644ade33..7a1cbecf 100644 --- a/mmap_cache.h +++ b/mmap_cache.h @@ -68,9 +68,6 @@ enum mmap_cache_rebuild_result { extern void mmap_cache_enable(void); -extern bool -mmap_cache_is_enabled(void); - extern void mmap_cache_delete(struct tcb *, const char *caller);