From 45f026c45c996bb65d2bd3e350587d51d6862a03 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 13 Apr 2023 11:13:00 -0700 Subject: debug: Only initialize gpfs wrapper when gpfs logging is enabled This avoids unnecessary attempts to load libgpfs.so when it is not needed. Signed-off-by: Christof Schmitt Reviewed-by: Michael Tokarev Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Fri Apr 14 12:28:23 UTC 2023 on atb-devel-224 --- lib/util/debug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/util') diff --git a/lib/util/debug.c b/lib/util/debug.c index 95de5ce3595..b83075cb239 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -406,7 +406,9 @@ static void debug_lttng_log(int msg_level, const char *msg, size_t msg_len) static void debug_gpfs_reload(bool enabled, bool previously_enabled, const char *prog_name, char *option) { - gpfswrap_init(); + if (enabled) { + gpfswrap_init(); + } if (enabled && !previously_enabled) { gpfswrap_init_trace(); -- cgit v1.2.1