From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH v3 3/5] kernel-shark-2.alpha: Print the plugin's file name in case of loading error
Date: Thu, 16 Apr 2020 19:00:45 +0300 [thread overview]
Message-ID: <20200416160047.77118-4-tz.stoyanov@gmail.com> (raw)
In-Reply-To: <20200416160047.77118-1-tz.stoyanov@gmail.com>
From: Tzvetomir (VMware) Stoyanov <tz.stoyanov@gmail.com>
When dlopen() fails to load the plugin, "plugin->file" is still not initialized.
It is useful to print the file name of the problematic plugin, "file", instead of not
yet initialized "plugin->file".
Signed-off-by: Tzvetomir (VMware) Stoyanov <tz.stoyanov@gmail.com>
---
src/libkshark-plugin.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/libkshark-plugin.c b/src/libkshark-plugin.c
index f9a721f..1cea87b 100644
--- a/src/libkshark-plugin.c
+++ b/src/libkshark-plugin.c
@@ -331,8 +331,7 @@ kshark_register_plugin(struct kshark_context *kshark_ctx,
return plugin;
fail:
- fprintf(stderr, "cannot load plugin '%s'\n",
- plugin->file);
+ fprintf(stderr, "cannot load plugin '%s'\n", file);
if (plugin->handle)
dlclose(plugin->handle);
--
2.25.1
next prev parent reply other threads:[~2020-04-16 16:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 16:00 [PATCH v3 0/5] Various enhancements, related to reading trace.dat file Tzvetomir Stoyanov (VMware)
2020-04-16 16:00 ` [PATCH v3 1/5] kernel-shark-2.alpha: Adjust the width of marker buttons Tzvetomir Stoyanov (VMware)
2020-04-16 16:00 ` [PATCH v3 2/5] kernel-shark-2.alpha: Use new tracecmd APIs to open guest tracing file Tzvetomir Stoyanov (VMware)
2020-04-22 13:39 ` Yordan Karadzhov (VMware)
2020-04-16 16:00 ` Tzvetomir Stoyanov (VMware) [this message]
2020-04-16 16:00 ` [PATCH v3 4/5] kernel-shark-2.alpha: Force trace-cmd.h to be used as plain C Tzvetomir Stoyanov (VMware)
2020-04-22 13:40 ` Yordan Karadzhov (VMware)
2020-04-16 16:00 ` [PATCH v3 5/5] kernel-shark-2.alpha: Restructure KVMCombo plugin to use CPU mapping information from the trace files Tzvetomir Stoyanov (VMware)
2020-04-22 14:42 ` Yordan Karadzhov (VMware)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200416160047.77118-4-tz.stoyanov@gmail.com \
--to=tz.stoyanov@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.