summaryrefslogtreecommitdiffstats
path: root/src/jemalloc.c
diff options
context:
space:
mode:
authorDavid Goldblatt <davidgoldblatt@fb.com>2017-07-21 20:34:45 (GMT)
committerDavid Goldblatt <davidtgoldblatt@gmail.com>2017-07-22 16:38:19 (GMT)
commita9f7732d45c22ca7d22bed6ff2eaeb702356884e (patch)
tree0472fe6cc282a7fd82b0debe36a1ced5fb2d2e89 /src/jemalloc.c
parentaa6c2821374f6dd6ed2e628c06bc08b0c4bc485c (diff)
downloadjemalloc-a9f7732d45c22ca7d22bed6ff2eaeb702356884e.zip
jemalloc-a9f7732d45c22ca7d22bed6ff2eaeb702356884e.tar.gz
jemalloc-a9f7732d45c22ca7d22bed6ff2eaeb702356884e.tar.bz2
Logging: allow logging with empty varargs.
Currently, the log macro requires at least one argument after the format string, because of the way the preprocessor handles varargs macros. We can hide some of that irritation by pushing the extra arguments into a varargs function.
Diffstat (limited to 'src/jemalloc.c')
-rw-r--r--src/jemalloc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c
index 48a268f..1dc6682 100644
--- a/src/jemalloc.c
+++ b/src/jemalloc.c
@@ -2364,7 +2364,7 @@ je_free(void *ptr) {
}
check_entry_exit_locking(tsd_tsdn(tsd));
}
- log(log_core_free_exit, "%s", "");
+ log(log_core_free_exit, "");
}
/*
@@ -2957,7 +2957,7 @@ je_dallocx(void *ptr, int flags) {
}
check_entry_exit_locking(tsd_tsdn(tsd));
- log(log_core_dallocx_exit, "%s", "");
+ log(log_core_dallocx_exit, "");
}
JEMALLOC_ALWAYS_INLINE size_t
@@ -3024,7 +3024,7 @@ je_sdallocx(void *ptr, size_t size, int flags) {
}
check_entry_exit_locking(tsd_tsdn(tsd));
- log(log_core_sdallocx_exit, "%s", "");
+ log(log_core_sdallocx_exit, "");
}
JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW
@@ -3083,7 +3083,7 @@ je_mallctl(const char *name, void *oldp, size_t *oldlenp, void *newp,
check_entry_exit_locking(tsd_tsdn(tsd));
ret = ctl_byname(tsd, name, oldp, oldlenp, newp, newlen);
check_entry_exit_locking(tsd_tsdn(tsd));
-
+
log(log_core_mallctl_exit, "result: %d", ret);
return ret;
}
@@ -3124,7 +3124,7 @@ je_mallctlbymib(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
static log_var_t log_core_mallctlbymib_exit = LOG_VAR_INIT(
"core.mallctlbymib.exit");
- log(log_core_mallctlbymib_entry, "%s", "");
+ log(log_core_mallctlbymib_entry, "");
if (unlikely(malloc_init())) {
@@ -3150,13 +3150,13 @@ je_malloc_stats_print(void (*write_cb)(void *, const char *), void *cbopaque,
static log_var_t log_core_malloc_stats_print_exit = LOG_VAR_INIT(
"core.malloc_stats_print.exit");
- log(log_core_malloc_stats_print_entry, "%s", "");
+ log(log_core_malloc_stats_print_entry, "");
tsdn = tsdn_fetch();
check_entry_exit_locking(tsdn);
stats_print(write_cb, cbopaque, opts);
check_entry_exit_locking(tsdn);
- log(log_core_malloc_stats_print_exit, "%s", "");
+ log(log_core_malloc_stats_print_exit, "");
}
JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW