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.
This commit is contained in:
Дмитрий Левин 2018-05-03 23:43:38 +00:00
parent 840bb0acb5
commit a1ecb2a51c
2 changed files with 2 additions and 9 deletions

View 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
*

View 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);