From 9dfd9c02d97700e52a56082ff05013509a08ed80 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Mon, 23 Oct 2023 18:15:10 +0200 Subject: [PATCH] common: limit the size of stack memory by replacing with Malloc Signed-off-by: Tomasz Gromadzki --- ChangeLog | 2 + src/core/out.c | 2 +- src/libpmem2/auto_flush_linux.c | 14 +++++- src/libpmem2/deep_flush_linux.c | 30 +++++++++---- src/libpmem2/pmem2_utils_linux.c | 41 +++++++++++++---- src/libpmem2/region_namespace_ndctl.c | 65 ++++++++++++++++++++------- src/stats/stack-usage-debug.txt | 60 ++++++++++++------------- src/stats/stack-usage-nondebug.txt | 55 +++++++++-------------- 8 files changed, 168 insertions(+), 101 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2df03d8f63..468149a4d5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ This release: - Significantly reduces the libpmem's stack usage. + - Decrease stack usage by allocating paths' buffers on heap + Tue Aug 8 2023 Oksana Sałyk diff --git a/src/core/out.c b/src/core/out.c index a7f5f6eb340..66bf44b6864 100644 --- a/src/core/out.c +++ b/src/core/out.c @@ -161,7 +161,7 @@ out_init(const char *log_prefix, const char *log_level_var, log_file[0] != '\0') { /* reserve more than enough space for a PID + '\0' */ - char log_file_pid[PATH_MAX]; + static char log_file_pid[PATH_MAX]; size_t len = strlen(log_file); if (len > 0 && log_file[len - 1] == '-') { if (util_snprintf(log_file_pid, PATH_MAX, "%s%d", diff --git a/src/libpmem2/auto_flush_linux.c b/src/libpmem2/auto_flush_linux.c index ca12e348b4e..c32505dad1b 100644 --- a/src/libpmem2/auto_flush_linux.c +++ b/src/libpmem2/auto_flush_linux.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -/* Copyright 2018-2020, Intel Corporation */ +/* Copyright 2018-2023, Intel Corporation */ /* * auto_flush_linux.c -- Linux auto flush detection @@ -16,6 +16,7 @@ #include "os.h" #include "fs.h" #include "auto_flush.h" +#include "alloc.h" #define BUS_DEVICE_PATH "/sys/bus/nd/devices" #define PERSISTENCE_DOMAIN "persistence_domain" @@ -87,9 +88,16 @@ check_domain_in_region(const char *region_path) struct fs *reg = NULL; struct fs_entry *reg_entry; - char domain_path[PATH_MAX]; + char *domain_path = NULL; int cpu_cache = 0; + domain_path = Malloc(PATH_MAX * sizeof(char)); + if (domain_path == NULL) { + ERR("!Malloc"); + cpu_cache = -1; + goto end; + } + reg = fs_new(region_path); if (reg == NULL) { ERR("!fs_new: \"%s\"", region_path); @@ -122,6 +130,8 @@ check_domain_in_region(const char *region_path) end: if (reg) fs_delete(reg); + if (domain_path) + Free(domain_path); return cpu_cache; } diff --git a/src/libpmem2/deep_flush_linux.c b/src/libpmem2/deep_flush_linux.c index 567174b4253..cb5a1ec785a 100644 --- a/src/libpmem2/deep_flush_linux.c +++ b/src/libpmem2/deep_flush_linux.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -/* Copyright 2020, Intel Corporation */ +/* Copyright 2020-2023, Intel Corporation */ /* * deep_flush_linux.c -- deep_flush functionality @@ -18,6 +18,7 @@ #include "persist.h" #include "pmem2_utils.h" #include "region_namespace.h" +#include "alloc.h" /* * pmem2_deep_flush_write -- perform write to deep_flush file @@ -28,19 +29,28 @@ pmem2_deep_flush_write(unsigned region_id) { LOG(3, "region_id %d", region_id); - char deep_flush_path[PATH_MAX]; - int deep_flush_fd; + int ret = 0; + char *deep_flush_path = NULL; + int deep_flush_fd = -1; char rbuf[2]; + deep_flush_path = Malloc(PATH_MAX * sizeof(char)); + if (deep_flush_path == NULL) { + ERR("!Malloc"); + ret = PMEM2_E_ERRNO; + goto end; + } + if (util_snprintf(deep_flush_path, PATH_MAX, "/sys/bus/nd/devices/region%u/deep_flush", region_id) < 0) { ERR("!snprintf"); - return PMEM2_E_ERRNO; + ret = PMEM2_E_ERRNO; + goto end; } if ((deep_flush_fd = os_open(deep_flush_path, O_RDONLY)) < 0) { LOG(1, "!os_open(\"%s\", O_RDONLY)", deep_flush_path); - return 0; + goto end; } if (read(deep_flush_fd, rbuf, sizeof(rbuf)) != 2) { @@ -54,11 +64,12 @@ pmem2_deep_flush_write(unsigned region_id) } os_close(deep_flush_fd); + deep_flush_fd = -1; if ((deep_flush_fd = os_open(deep_flush_path, O_WRONLY)) < 0) { LOG(1, "Cannot open deep_flush file %s to write", deep_flush_path); - return 0; + goto end; } if (write(deep_flush_fd, "1", 1) != 1) { @@ -67,8 +78,11 @@ pmem2_deep_flush_write(unsigned region_id) } end: - os_close(deep_flush_fd); - return 0; + if (deep_flush_fd > -1) + os_close(deep_flush_fd); + if (deep_flush_path) + Free(deep_flush_path); + return ret; } /* diff --git a/src/libpmem2/pmem2_utils_linux.c b/src/libpmem2/pmem2_utils_linux.c index 57cc432ff9d..d26cf987dae 100644 --- a/src/libpmem2/pmem2_utils_linux.c +++ b/src/libpmem2/pmem2_utils_linux.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -/* Copyright 2014-2020, Intel Corporation */ +/* Copyright 2014-2023, Intel Corporation */ #include #include @@ -14,6 +14,7 @@ #include "pmem2_utils.h" #include "region_namespace.h" #include "source.h" +#include "alloc.h" /* * pmem2_get_type_from_stat -- determine type of file based on output of stat @@ -37,8 +38,17 @@ pmem2_get_type_from_stat(const os_stat_t *st, enum pmem2_file_type *type) return PMEM2_E_INVALID_FILE_TYPE; } - char spath[PATH_MAX]; - int ret = util_snprintf(spath, PATH_MAX, + int ret = 0; + char *spath = NULL; + char *npath = NULL; + + spath = Malloc(PATH_MAX * sizeof(char)); + if (spath == NULL) { + ERR("!Malloc"); + return PMEM2_E_ERRNO; + } + + ret = util_snprintf(spath, PATH_MAX, "/sys/dev/char/%u:%u/subsystem", os_major(st->st_rdev), os_minor(st->st_rdev)); @@ -46,25 +56,40 @@ pmem2_get_type_from_stat(const os_stat_t *st, enum pmem2_file_type *type) /* impossible */ ERR("!snprintf"); ASSERTinfo(0, "snprintf failed"); - return PMEM2_E_ERRNO; + ret = PMEM2_E_ERRNO; + goto end; } LOG(4, "device subsystem path \"%s\"", spath); - char npath[PATH_MAX]; + npath = Malloc(PATH_MAX * sizeof(char)); + if (npath == NULL) { + ERR("!Malloc"); + ret = PMEM2_E_ERRNO; + goto end; + } + char *rpath = realpath(spath, npath); if (rpath == NULL) { ERR("!realpath \"%s\"", spath); - return PMEM2_E_ERRNO; + ret = PMEM2_E_ERRNO; + goto end; } char *basename = strrchr(rpath, '/'); if (!basename || strcmp("dax", basename + 1) != 0) { LOG(3, "%s path does not match device dax prefix path", rpath); - return PMEM2_E_INVALID_FILE_TYPE; + ret = PMEM2_E_INVALID_FILE_TYPE; + goto end; } *type = PMEM2_FTYPE_DEVDAX; - return 0; +end: + if (npath) + Free(npath); + if (spath) + Free(spath); + + return ret; } diff --git a/src/libpmem2/region_namespace_ndctl.c b/src/libpmem2/region_namespace_ndctl.c index dfdec34de54..8f93c3e5408 100644 --- a/src/libpmem2/region_namespace_ndctl.c +++ b/src/libpmem2/region_namespace_ndctl.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -/* Copyright 2020-2022, Intel Corporation */ +/* Copyright 2020-2023, Intel Corporation */ /* * region_namespace_ndctl.c -- common ndctl functions @@ -16,6 +16,7 @@ #include "region_namespace_ndctl.h" #include "region_namespace.h" #include "out.h" +#include "alloc.h" /* * ndctl_match_devdax -- (internal) returns 0 if the devdax matches @@ -27,30 +28,43 @@ ndctl_match_devdax(dev_t st_rdev, const char *devname) { LOG(3, "st_rdev %lu devname %s", st_rdev, devname); + int ret = 0; + char *path; + os_stat_t stat; + if (*devname == '\0') return 1; - char path[PATH_MAX]; - os_stat_t stat; + path = Malloc(PATH_MAX * sizeof(char)); + if (path == NULL) { + ERR("!Malloc"); + return PMEM2_E_ERRNO; + } if (util_snprintf(path, PATH_MAX, "/dev/%s", devname) < 0) { ERR("!snprintf"); - return PMEM2_E_ERRNO; + ret = PMEM2_E_ERRNO; + goto end; } if (os_stat(path, &stat)) { ERR("!stat %s", path); - return PMEM2_E_ERRNO; + ret = PMEM2_E_ERRNO; + goto end; } if (st_rdev != stat.st_rdev) { LOG(10, "skipping not matching device: %s", path); - return 1; + ret = 1; + goto end; } LOG(4, "found matching device: %s", path); - return 0; +end: + Free(path); + + return ret; } #define BUFF_LENGTH 64 @@ -65,27 +79,37 @@ ndctl_match_fsdax(dev_t st_dev, const char *devname) { LOG(3, "st_dev %lu devname %s", st_dev, devname); + int ret = 0; + char *path; + char dev_id[BUFF_LENGTH]; + if (*devname == '\0') return 1; - char path[PATH_MAX]; - char dev_id[BUFF_LENGTH]; + path = Malloc(PATH_MAX * sizeof(char)); + if (path == NULL) { + ERR("!Malloc"); + return PMEM2_E_ERRNO; + } if (util_snprintf(path, PATH_MAX, "/sys/block/%s/dev", devname) < 0) { ERR("!snprintf"); - return PMEM2_E_ERRNO; + ret = PMEM2_E_ERRNO; + goto end; } if (util_snprintf(dev_id, BUFF_LENGTH, "%d:%d", major(st_dev), minor(st_dev)) < 0) { ERR("!snprintf"); - return PMEM2_E_ERRNO; + ret = PMEM2_E_ERRNO; + goto end; } int fd = os_open(path, O_RDONLY); if (fd < 0) { ERR("!open \"%s\"", path); - return PMEM2_E_ERRNO; + ret = PMEM2_E_ERRNO; + goto end; } char buff[BUFF_LENGTH]; @@ -95,31 +119,38 @@ ndctl_match_fsdax(dev_t st_dev, const char *devname) int oerrno = errno; /* save the errno */ os_close(fd); errno = oerrno; - return PMEM2_E_ERRNO; + ret = PMEM2_E_ERRNO; + goto end; } os_close(fd); if (nread == 0) { ERR("%s is empty", path); - return PMEM2_E_INVALID_DEV_FORMAT; + ret = PMEM2_E_INVALID_DEV_FORMAT; + goto end; } if (buff[nread - 1] != '\n') { ERR("%s doesn't end with new line", path); - return PMEM2_E_INVALID_DEV_FORMAT; + ret = PMEM2_E_INVALID_DEV_FORMAT; + goto end; } buff[nread - 1] = '\0'; if (strcmp(buff, dev_id) != 0) { LOG(10, "skipping not matching device: %s", path); - return 1; + ret = 1; + goto end; } LOG(4, "found matching device: %s", path); - return 0; +end: + Free(path); + + return ret; } /* diff --git a/src/stats/stack-usage-debug.txt b/src/stats/stack-usage-debug.txt index 5b857ae20a4..56d133d31e6 100644 --- a/src/stats/stack-usage-debug.txt +++ b/src/stats/stack-usage-debug.txt @@ -129,11 +129,6 @@ 8448 out_common : src/debug/libpmemobj/out.su:out.c dynamic,bounded 8448 out_common : src/debug/libpmem2/out.su:out.c dynamic,bounded 8448 out_common : src/debug/core/out.su:out.c dynamic,bounded -8288 pmem2_get_type_from_stat : src/debug/libpmempool/pmem2_utils_linux.su:pmem2_utils_linux.c dynamic,bounded -8288 pmem2_get_type_from_stat : src/debug/libpmem/pmem2_utils_linux.su:pmem2_utils_linux.c dynamic,bounded -8288 pmem2_get_type_from_stat : src/debug/libpmemobj/pmem2_utils_linux.su:pmem2_utils_linux.c dynamic,bounded -8288 pmem2_get_type_from_stat : src/debug/libpmem2/pmem2_utils_linux.su:pmem2_utils_linux.c dynamic,bounded -8288 pmem2_get_type_from_stat : src/debug/common/pmem2_utils_linux.su:pmem2_utils_linux.c dynamic,bounded 8272 replica_check_store_size : src/debug/libpmempool/replica.su:replica.c dynamic,bounded 6768 memset_movnt_sse2_noflush_wcbarrier : src/debug/libpmem/memset_nt_sse2.su:memset_nt_sse2.c dynamic,bounded 6768 memset_movnt_sse2_noflush_wcbarrier : src/debug/libpmem2/memset_nt_sse2.su:memset_nt_sse2.c dynamic,bounded @@ -166,39 +161,14 @@ 5936 memset_mov_avx_clflushopt : src/debug/libpmem/memset_t_avx.su:memset_t_avx.c dynamic,bounded 5936 memset_mov_avx_clflushopt : src/debug/libpmem2/memset_t_avx.su:memset_t_avx.c dynamic,bounded 4384 pool_params_parse : src/debug/libpmempool/pool.su:pool.c dynamic,bounded -4352 out_init : src/debug/libpmempool/out.su:out.c dynamic,bounded -4352 out_init : src/debug/libpmem/out.su:out.c dynamic,bounded -4352 out_init : src/debug/libpmemobj/out.su:out.c dynamic,bounded -4352 out_init : src/debug/libpmem2/out.su:out.c dynamic,bounded -4352 out_init : src/debug/core/out.su:out.c dynamic,bounded -4320 ndctl_match_fsdax : src/debug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4320 ndctl_match_fsdax : src/debug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4320 ndctl_match_fsdax : src/debug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4320 ndctl_match_fsdax : src/debug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4320 ndctl_match_fsdax : src/debug/common/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded 4288 pool_set_map : src/debug/libpmempool/pool.su:pool.c dynamic,bounded -4288 ndctl_match_devdax : src/debug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4288 ndctl_match_devdax : src/debug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4288 ndctl_match_devdax : src/debug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4288 ndctl_match_devdax : src/debug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4288 ndctl_match_devdax : src/debug/common/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded 4208 util_header_check : src/debug/libpmempool/set.su:set.c dynamic,bounded 4208 util_header_check : src/debug/libpmemobj/set.su:set.c dynamic,bounded 4208 util_header_check : src/debug/common/set.su:set.c dynamic,bounded 4176 features_check : src/debug/libpmempool/feature.su:feature.c static 4160 pool_hdr_default_fix : src/debug/libpmempool/check_pool_hdr.su:check_pool_hdr.c dynamic,bounded -4160 pmem2_deep_flush_write : src/debug/libpmempool/deep_flush_linux.su:deep_flush_linux.c static -4160 pmem2_deep_flush_write : src/debug/libpmemobj/deep_flush_linux.su:deep_flush_linux.c static -4160 pmem2_deep_flush_write : src/debug/libpmem/deep_flush_linux.su:deep_flush_linux.c static -4160 pmem2_deep_flush_write : src/debug/libpmem2/deep_flush_linux.su:deep_flush_linux.c static -4160 pmem2_deep_flush_write : src/debug/common/deep_flush_linux.su:deep_flush_linux.c static 4160 check_pool_hdr_uuids : src/debug/libpmempool/check_pool_hdr.su:check_pool_hdr.c static 4160 check_pool_hdr : src/debug/libpmempool/check_pool_hdr.su:check_pool_hdr.c static -4160 check_domain_in_region : src/debug/libpmempool/auto_flush_linux.su:auto_flush_linux.c static -4160 check_domain_in_region : src/debug/libpmemobj/auto_flush_linux.su:auto_flush_linux.c static -4160 check_domain_in_region : src/debug/libpmem/auto_flush_linux.su:auto_flush_linux.c static -4160 check_domain_in_region : src/debug/libpmem2/auto_flush_linux.su:auto_flush_linux.c static -4160 check_domain_in_region : src/debug/common/auto_flush_linux.su:auto_flush_linux.c static 4144 pool_set_type : src/debug/libpmempool/pool.su:pool.c static 4144 pool_hdr_default_check : src/debug/libpmempool/check_pool_hdr.su:check_pool_hdr.c static 3200 memset_mov_sse2_noflush : src/debug/libpmem/memset_t_sse2.su:memset_t_sse2.c dynamic,bounded @@ -354,6 +324,11 @@ 256 out_nonl : src/debug/libpmemobj/out.su:out.c dynamic,bounded 256 out_nonl : src/debug/libpmem2/out.su:out.c dynamic,bounded 256 out_nonl : src/debug/core/out.su:out.c dynamic,bounded +256 out_init : src/debug/libpmempool/out.su:out.c dynamic,bounded +256 out_init : src/debug/libpmem/out.su:out.c dynamic,bounded +256 out_init : src/debug/libpmemobj/out.su:out.c dynamic,bounded +256 out_init : src/debug/libpmem2/out.su:out.c dynamic,bounded +256 out_init : src/debug/core/out.su:out.c dynamic,bounded 256 out_err : src/debug/libpmempool/out.su:out.c static 256 out_err : src/debug/libpmem/out.su:out.c static 256 out_err : src/debug/libpmemobj/out.su:out.c static @@ -373,6 +348,11 @@ 240 os_open : src/debug/libpmemobj/os_posix.su:os_posix.c static 240 os_open : src/debug/libpmem2/os_posix.su:os_posix.c static 240 os_open : src/debug/core/os_posix.su:os_posix.c static +240 ndctl_match_fsdax : src/debug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +240 ndctl_match_fsdax : src/debug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +240 ndctl_match_fsdax : src/debug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +240 ndctl_match_fsdax : src/debug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +240 ndctl_match_fsdax : src/debug/common/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded 240 huge_ensure_header_type : src/debug/libpmemobj/memblock.su:memblock.c dynamic,bounded 224 util_poolset_chmod : src/debug/libpmempool/set.su:set.c dynamic,bounded 224 util_poolset_chmod : src/debug/libpmemobj/set.su:set.c dynamic,bounded @@ -403,6 +383,11 @@ 208 pmem2_map_delete : src/debug/libpmem2/map_posix.su:map_posix.c static 208 palloc_reservation_clear : src/debug/libpmemobj/palloc.su:palloc.c static 208 operation_init : src/debug/libpmemobj/memops.su:memops.c static +208 ndctl_match_devdax : src/debug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +208 ndctl_match_devdax : src/debug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +208 ndctl_match_devdax : src/debug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +208 ndctl_match_devdax : src/debug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +208 ndctl_match_devdax : src/debug/common/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded 208 list_insert : src/debug/libpmemobj/list.su:list.c dynamic,bounded 208 constructor_zrealloc_root : src/debug/libpmemobj/obj.su:obj.c dynamic,bounded 208 check_shutdown_state : src/debug/libpmempool/replica.su:replica.c dynamic,bounded @@ -934,6 +919,11 @@ 112 pmem2_source_device_usc : src/debug/libpmem2/usc_ndctl.su:usc_ndctl.c dynamic,bounded 112 pmem2_source_device_usc : src/debug/common/usc_ndctl.su:usc_ndctl.c dynamic,bounded 112 pmem2_log_flush : src/debug/libpmem2/persist.su:persist.c dynamic,bounded +112 pmem2_get_type_from_stat : src/debug/libpmempool/pmem2_utils_linux.su:pmem2_utils_linux.c dynamic,bounded +112 pmem2_get_type_from_stat : src/debug/libpmem/pmem2_utils_linux.su:pmem2_utils_linux.c dynamic,bounded +112 pmem2_get_type_from_stat : src/debug/libpmemobj/pmem2_utils_linux.su:pmem2_utils_linux.c dynamic,bounded +112 pmem2_get_type_from_stat : src/debug/libpmem2/pmem2_utils_linux.su:pmem2_utils_linux.c dynamic,bounded +112 pmem2_get_type_from_stat : src/debug/common/pmem2_utils_linux.su:pmem2_utils_linux.c dynamic,bounded 112 pmem2_flush_file_buffers : src/debug/libpmem2/persist.su:persist.c static 112 pmem2_deep_flush : src/debug/libpmem2/deep_flush.su:deep_flush.c dynamic,bounded 112 pmem2_badblock_next_region : src/debug/libpmempool/badblocks_ndctl.su:badblocks_ndctl.c dynamic,bounded @@ -1377,6 +1367,11 @@ 80 check_replica_sizes : src/debug/libpmempool/replica.su:replica.c dynamic,bounded 80 check_replica_cycles : src/debug/libpmempool/replica.su:replica.c dynamic,bounded 80 check_poolset_uuids : src/debug/libpmempool/replica.su:replica.c dynamic,bounded +80 check_domain_in_region : src/debug/libpmempool/auto_flush_linux.su:auto_flush_linux.c static +80 check_domain_in_region : src/debug/libpmemobj/auto_flush_linux.su:auto_flush_linux.c static +80 check_domain_in_region : src/debug/libpmem/auto_flush_linux.su:auto_flush_linux.c static +80 check_domain_in_region : src/debug/libpmem2/auto_flush_linux.su:auto_flush_linux.c static +80 check_domain_in_region : src/debug/common/auto_flush_linux.su:auto_flush_linux.c static 80 check_answer_loop : src/debug/libpmempool/check_util.su:check_util.c static 80 badblocks_recovery_file_exists : src/debug/libpmempool/set_badblocks.su:set_badblocks.c static 80 badblocks_recovery_file_exists : src/debug/libpmemobj/set_badblocks.su:set_badblocks.c static @@ -1618,6 +1613,11 @@ 64 pmem2_realloc : src/debug/libpmemobj/pmem2_utils.su:pmem2_utils.c static 64 pmem2_realloc : src/debug/libpmem2/pmem2_utils.su:pmem2_utils.c static 64 pmem2_realloc : src/debug/common/pmem2_utils.su:pmem2_utils.c static +64 pmem2_deep_flush_write : src/debug/libpmempool/deep_flush_linux.su:deep_flush_linux.c static +64 pmem2_deep_flush_write : src/debug/libpmemobj/deep_flush_linux.su:deep_flush_linux.c static +64 pmem2_deep_flush_write : src/debug/libpmem/deep_flush_linux.su:deep_flush_linux.c static +64 pmem2_deep_flush_write : src/debug/libpmem2/deep_flush_linux.su:deep_flush_linux.c static +64 pmem2_deep_flush_write : src/debug/common/deep_flush_linux.su:deep_flush_linux.c static 64 pmem2_deep_flush_page : src/debug/libpmem2/persist.su:persist.c dynamic,bounded 64 pmem2_config_set_vm_reservation : src/debug/libpmempool/config.su:config.c static 64 pmem2_config_set_vm_reservation : src/debug/libpmemobj/config.su:config.c static diff --git a/src/stats/stack-usage-nondebug.txt b/src/stats/stack-usage-nondebug.txt index 7ac24525825..70d853a5297 100644 --- a/src/stats/stack-usage-nondebug.txt +++ b/src/stats/stack-usage-nondebug.txt @@ -5,29 +5,9 @@ 8432 out_common : src/nondebug/libpmem2/out.su:out.c dynamic,bounded 8432 out_common : src/nondebug/core/out.su:out.c dynamic,bounded 8240 replica_check_store_size : src/nondebug/libpmempool/replica.su:replica.c static -8224 pmem2_get_type_from_stat : src/nondebug/libpmempool/pmem2_utils_linux.su:pmem2_utils_linux.c static -8224 pmem2_get_type_from_stat : src/nondebug/libpmem/pmem2_utils_linux.su:pmem2_utils_linux.c static -8224 pmem2_get_type_from_stat : src/nondebug/libpmemobj/pmem2_utils_linux.su:pmem2_utils_linux.c static -8224 pmem2_get_type_from_stat : src/nondebug/libpmem2/pmem2_utils_linux.su:pmem2_utils_linux.c static -8224 pmem2_get_type_from_stat : src/nondebug/common/pmem2_utils_linux.su:pmem2_utils_linux.c static 7424 memmove_mov_avx512f_empty : src/nondebug/libpmem/memcpy_t_avx512f.su:memcpy_t_avx512f.c static 7424 memmove_mov_avx512f_empty : src/nondebug/libpmem2/memcpy_t_avx512f.su:memcpy_t_avx512f.c static 4352 pool_params_parse.isra.2.constprop : src/nondebug/libpmempool/pool.su:pool.c dynamic,bounded -4272 ndctl_match_fsdax : src/nondebug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_fsdax : src/nondebug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_fsdax : src/nondebug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_fsdax : src/nondebug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_fsdax : src/nondebug/common/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_devdax : src/nondebug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_devdax : src/nondebug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_devdax : src/nondebug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_devdax : src/nondebug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_devdax : src/nondebug/common/region_namespace_ndctl.su:region_namespace_ndctl.c static -4224 check_domain_in_region : src/nondebug/libpmempool/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded -4224 check_domain_in_region : src/nondebug/libpmemobj/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded -4224 check_domain_in_region : src/nondebug/libpmem/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded -4224 check_domain_in_region : src/nondebug/libpmem2/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded -4224 check_domain_in_region : src/nondebug/common/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded 4176 util_header_check : src/nondebug/libpmempool/set.su:set.c static 4176 util_header_check : src/nondebug/libpmemobj/set.su:set.c static 4176 util_header_check : src/nondebug/common/set.su:set.c static @@ -36,11 +16,6 @@ 4176 check_pool_hdr : src/nondebug/libpmempool/check_pool_hdr.su:check_pool_hdr.c static 4144 pool_hdr_default_fix : src/nondebug/libpmempool/check_pool_hdr.su:check_pool_hdr.c static 4144 pool_hdr_default_check : src/nondebug/libpmempool/check_pool_hdr.su:check_pool_hdr.c static -4144 pmem2_deep_flush_write : src/nondebug/libpmempool/deep_flush_linux.su:deep_flush_linux.c static -4144 pmem2_deep_flush_write : src/nondebug/libpmemobj/deep_flush_linux.su:deep_flush_linux.c static -4144 pmem2_deep_flush_write : src/nondebug/libpmem/deep_flush_linux.su:deep_flush_linux.c static -4144 pmem2_deep_flush_write : src/nondebug/libpmem2/deep_flush_linux.su:deep_flush_linux.c static -4144 pmem2_deep_flush_write : src/nondebug/common/deep_flush_linux.su:deep_flush_linux.c static 4112 pool_set_type : src/nondebug/libpmempool/pool.su:pool.c static 3840 memset_mov_avx512f_empty : src/nondebug/libpmem/memset_t_avx512f.su:memset_t_avx512f.c static 3840 memset_mov_avx512f_empty : src/nondebug/libpmem2/memset_t_avx512f.su:memset_t_avx512f.c static @@ -125,6 +100,11 @@ 320 util_compare_file_inodes : src/nondebug/core/util_posix.su:util_posix.c static 320 replica_check_poolset_health : src/nondebug/libpmempool/replica.su:replica.c dynamic,bounded 320 pmemobj_volatile : src/nondebug/libpmemobj/sync.su:sync.c static +320 pmem2_region_namespace : src/nondebug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c static +320 pmem2_region_namespace : src/nondebug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c static +320 pmem2_region_namespace : src/nondebug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c static +320 pmem2_region_namespace : src/nondebug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c static +320 pmem2_region_namespace : src/nondebug/common/region_namespace_ndctl.su:region_namespace_ndctl.c static 320 memset_movnt_avx_empty_wcbarrier : src/nondebug/libpmem/memset_nt_avx.su:memset_nt_avx.c static 320 memset_movnt_avx_empty_wcbarrier : src/nondebug/libpmem2/memset_nt_avx.su:memset_nt_avx.c static 320 memset_movnt_avx_empty_nobarrier : src/nondebug/libpmem/memset_nt_avx.su:memset_nt_avx.c static @@ -149,6 +129,11 @@ 272 util_replica_map_local.constprop : src/nondebug/libpmemobj/set.su:set.c static 272 util_replica_map_local.constprop : src/nondebug/common/set.su:set.c static 272 pmem2_map_new : src/nondebug/libpmem2/map_posix.su:map_posix.c dynamic,bounded +272 pmem2_auto_flush : src/nondebug/libpmempool/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded +272 pmem2_auto_flush : src/nondebug/libpmemobj/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded +272 pmem2_auto_flush : src/nondebug/libpmem/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded +272 pmem2_auto_flush : src/nondebug/libpmem2/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded +272 pmem2_auto_flush : src/nondebug/common/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded 272 obj_runtime_init.constprop : src/nondebug/libpmemobj/obj.su:obj.c static 272 list_move : src/nondebug/libpmemobj/list.su:list.c static 272 list_fill_entry_redo_log : src/nondebug/libpmemobj/list.su:list.c static @@ -243,11 +228,6 @@ 192 pmem2_source_from_fd : src/nondebug/libpmem2/source_posix.su:source_posix.c static 192 pmem2_source_from_fd : src/nondebug/common/source_posix.su:source_posix.c static 192 pmem2_map_delete : src/nondebug/libpmem2/map_posix.su:map_posix.c static -192 pmem2_auto_flush : src/nondebug/libpmempool/auto_flush_linux.su:auto_flush_linux.c static -192 pmem2_auto_flush : src/nondebug/libpmemobj/auto_flush_linux.su:auto_flush_linux.c static -192 pmem2_auto_flush : src/nondebug/libpmem/auto_flush_linux.su:auto_flush_linux.c static -192 pmem2_auto_flush : src/nondebug/libpmem2/auto_flush_linux.su:auto_flush_linux.c static -192 pmem2_auto_flush : src/nondebug/common/auto_flush_linux.su:auto_flush_linux.c static 192 memset_movnt_avx_noflush_wcbarrier : src/nondebug/libpmem/memset_nt_avx.su:memset_nt_avx.c static 192 memset_movnt_avx_noflush_wcbarrier : src/nondebug/libpmem2/memset_nt_avx.su:memset_nt_avx.c static 192 memset_movnt_avx_noflush_nobarrier : src/nondebug/libpmem/memset_nt_avx.su:memset_nt_avx.c static @@ -588,11 +568,6 @@ 80 pmem_map_register : src/nondebug/libpmem/pmem_posix.su:pmem_posix.c dynamic,bounded 80 pmem_flush : src/nondebug/libpmem/pmem.su:pmem.c static 80 pmem_deep_flush : src/nondebug/libpmem/pmem.su:pmem.c static -80 pmem2_region_namespace : src/nondebug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c static -80 pmem2_region_namespace : src/nondebug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c static -80 pmem2_region_namespace : src/nondebug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c static -80 pmem2_region_namespace : src/nondebug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c static -80 pmem2_region_namespace : src/nondebug/common/region_namespace_ndctl.su:region_namespace_ndctl.c static 80 pmem2_get_region_id : src/nondebug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c static 80 pmem2_get_region_id : src/nondebug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c static 80 pmem2_get_region_id : src/nondebug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c static @@ -930,6 +905,16 @@ 48 pmem2_source_from_anon : src/nondebug/common/source.su:source.c static 48 pmem2_memset_nonpmem : src/nondebug/libpmem2/persist.su:persist.c static 48 pmem2_memmove_nonpmem : src/nondebug/libpmem2/persist.su:persist.c static +48 pmem2_get_type_from_stat : src/nondebug/libpmempool/pmem2_utils_linux.su:pmem2_utils_linux.c static +48 pmem2_get_type_from_stat : src/nondebug/libpmem/pmem2_utils_linux.su:pmem2_utils_linux.c static +48 pmem2_get_type_from_stat : src/nondebug/libpmemobj/pmem2_utils_linux.su:pmem2_utils_linux.c static +48 pmem2_get_type_from_stat : src/nondebug/libpmem2/pmem2_utils_linux.su:pmem2_utils_linux.c static +48 pmem2_get_type_from_stat : src/nondebug/common/pmem2_utils_linux.su:pmem2_utils_linux.c static +48 pmem2_deep_flush_write : src/nondebug/libpmempool/deep_flush_linux.su:deep_flush_linux.c static +48 pmem2_deep_flush_write : src/nondebug/libpmemobj/deep_flush_linux.su:deep_flush_linux.c static +48 pmem2_deep_flush_write : src/nondebug/libpmem/deep_flush_linux.su:deep_flush_linux.c static +48 pmem2_deep_flush_write : src/nondebug/libpmem2/deep_flush_linux.su:deep_flush_linux.c static +48 pmem2_deep_flush_write : src/nondebug/common/deep_flush_linux.su:deep_flush_linux.c static 48 pmem2_deep_flush_cache : src/nondebug/libpmem2/persist.su:persist.c static 48 pmem2_deep_flush_byte : src/nondebug/libpmem2/persist.su:persist.c static 48 pmem2_badblock_next_region : src/nondebug/libpmempool/badblocks_ndctl.su:badblocks_ndctl.c static