]> granicus.if.org Git - strace/commitdiff
mmap_cache: remove mmap_cache_is_enabled
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 3 May 2018 23:43:38 +0000 (23:43 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 3 May 2018 23:43:38 +0000 (23:43 +0000)
This function is no longer used and could be removed.

* mmap_cache.c (mmap_cache_is_enabled): Remove.
* mmap_cache.h: Likewise.

mmap_cache.c
mmap_cache.h

index 2abb87d65f6ef2a2d8e3577b09219231774a78c5..d0ea4dddd853a225eb42517a9567b981705fabe5 100644 (file)
@@ -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
  *
index 644ade33ddce27c3301996abb1fa74decb72333f..7a1cbecfd6913ffbb32844f040c36bf83156bd33 100644 (file)
@@ -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);