Commit 85598cd2 authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:4234] Add malloc_mmap_threshold to engine status. Must still display in...

[t:4234] Add malloc_mmap_threshold to engine status.  Must still display in handlerton.  Refs #4234.

git-svn-id: file:///svn/toku/tokudb@38472 c7de825b-a66e-492c-adef-691d508d4ae1
parent 77d72e0c
......@@ -299,6 +299,7 @@ typedef struct __toku_engine_status {
uint64_t mem_used; /* number of bytes used (obtained from malloc_usable_size()) */
uint64_t mem_freed; /* number of bytes freed */
uint64_t max_mem_in_use; /* estimated max value of (used - freed) */
uint64_t malloc_mmap_threshold; /* threshold for malloc to use mmap */
const char * mallocator_version; /* version string from malloc lib */
} ENGINE_STATUS;
typedef enum {
......
......@@ -299,6 +299,7 @@ typedef struct __toku_engine_status {
uint64_t mem_used; /* number of bytes used (obtained from malloc_usable_size()) */
uint64_t mem_freed; /* number of bytes freed */
uint64_t max_mem_in_use; /* estimated max value of (used - freed) */
uint64_t malloc_mmap_threshold; /* threshold for malloc to use mmap */
const char * mallocator_version; /* version string from malloc lib */
} ENGINE_STATUS;
typedef enum {
......
......@@ -299,6 +299,7 @@ typedef struct __toku_engine_status {
uint64_t mem_used; /* number of bytes used (obtained from malloc_usable_size()) */
uint64_t mem_freed; /* number of bytes freed */
uint64_t max_mem_in_use; /* estimated max value of (used - freed) */
uint64_t malloc_mmap_threshold; /* threshold for malloc to use mmap */
const char * mallocator_version; /* version string from malloc lib */
} ENGINE_STATUS;
typedef enum {
......
......@@ -299,6 +299,7 @@ typedef struct __toku_engine_status {
uint64_t mem_used; /* number of bytes used (obtained from malloc_usable_size()) */
uint64_t mem_freed; /* number of bytes freed */
uint64_t max_mem_in_use; /* estimated max value of (used - freed) */
uint64_t malloc_mmap_threshold; /* threshold for malloc to use mmap */
const char * mallocator_version; /* version string from malloc lib */
} ENGINE_STATUS;
typedef enum {
......
......@@ -299,6 +299,7 @@ typedef struct __toku_engine_status {
uint64_t mem_used; /* number of bytes used (obtained from malloc_usable_size()) */
uint64_t mem_freed; /* number of bytes freed */
uint64_t max_mem_in_use; /* estimated max value of (used - freed) */
uint64_t malloc_mmap_threshold; /* threshold for malloc to use mmap */
const char * mallocator_version; /* version string from malloc lib */
} ENGINE_STATUS;
typedef enum {
......
......@@ -692,6 +692,7 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__
printf(" uint64_t mem_used; /* number of bytes used (obtained from malloc_usable_size()) */ \n");
printf(" uint64_t mem_freed; /* number of bytes freed */ \n");
printf(" uint64_t max_mem_in_use; /* estimated max value of (used - freed) */ \n");
printf(" uint64_t malloc_mmap_threshold; /* threshold for malloc to use mmap */ \n");
printf(" const char * mallocator_version; /* version string from malloc lib */ \n");
printf("} ENGINE_STATUS;\n");
......
......@@ -299,6 +299,7 @@ typedef struct __toku_engine_status {
uint64_t mem_used; /* number of bytes used (obtained from malloc_usable_size()) */
uint64_t mem_freed; /* number of bytes freed */
uint64_t max_mem_in_use; /* estimated max value of (used - freed) */
uint64_t malloc_mmap_threshold; /* threshold for malloc to use mmap */
const char * mallocator_version; /* version string from malloc lib */
} ENGINE_STATUS;
typedef enum {
......
......@@ -299,6 +299,7 @@ typedef struct __toku_engine_status {
uint64_t mem_used; /* number of bytes used (obtained from malloc_usable_size()) */
uint64_t mem_freed; /* number of bytes freed */
uint64_t max_mem_in_use; /* estimated max value of (used - freed) */
uint64_t malloc_mmap_threshold; /* threshold for malloc to use mmap */
const char * mallocator_version; /* version string from malloc lib */
} ENGINE_STATUS;
typedef enum {
......
......@@ -2213,6 +2213,7 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st
engstat->mem_used = memory_status.used;
engstat->mem_freed = memory_status.freed;
engstat->max_mem_in_use = memory_status.max_in_use;
engstat->malloc_mmap_threshold = memory_status.mmap_threshold;
engstat->mallocator_version = memory_status.mallocator_version;
}
}
......@@ -2481,6 +2482,7 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
n += snprintf(buff + n, bufsiz - n, "mem_used %"PRIu64"\n", engstat.mem_used);
n += snprintf(buff + n, bufsiz - n, "mem_freed %"PRIu64"\n", engstat.mem_freed);
n += snprintf(buff + n, bufsiz - n, "max_mem_in_use %"PRIu64"\n", engstat.max_mem_in_use);
n += snprintf(buff + n, bufsiz - n, "malloc_mmap_threshold %"PRIu64"\n", engstat.malloc_mmap_threshold);
n += snprintf(buff + n, bufsiz - n, "mallocator_version %s\n", engstat.mallocator_version);
}
if (n > bufsiz) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment