linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org, howaboutsynergy@pm.me,
	"Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Subject: [PATCH 2/3] kernel-shark: Better error message for the constructor of KsCaptureControl
Date: Tue, 23 Jul 2019 15:52:03 +0300	[thread overview]
Message-ID: <20190723125204.22799-3-y.karadz@gmail.com> (raw)
In-Reply-To: <20190723125204.22799-1-y.karadz@gmail.com>

The error message includes the case when the tracing directory cannot be
found or mounted.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 kernel-shark/src/KsCaptureDialog.cpp | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/kernel-shark/src/KsCaptureDialog.cpp b/kernel-shark/src/KsCaptureDialog.cpp
index 0a29518..2e6e8f9 100644
--- a/kernel-shark/src/KsCaptureDialog.cpp
+++ b/kernel-shark/src/KsCaptureDialog.cpp
@@ -55,13 +55,19 @@ KsCaptureControl::KsCaptureControl(QWidget *parent)
 		_topLayout.addWidget(line);
 	};
 
-	if (pluginList.count() == 0) {
+	if (pluginList.count() == 0 || !_localTEP) {
 		/*
-		 * No plugins have been found. Most likely this is because
-		 * the process has no Root privileges.
+		 * No plugins or events have been found. Most likely this is
+		 * because the process has no Root privileges or because
+		 * tracefs cannot be mounted.
 		 */
 		QString message("Error: No events or plugins found.\n");
-		message += "Root privileges are required.";
+
+		if (!_localTEP)
+			message += "Cannot find or mount tracing directory.\n";
+		if (!pluginList.count())
+			message += "Root privileges are required.\n";
+
 		QLabel *errorLabel = new QLabel(message);
 
 		errorLabel->setStyleSheet("QLabel {color : red;}");
-- 
2.20.1


  parent reply	other threads:[~2019-07-23 12:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 12:52 [PATCH 0/3] Fixes needed befor KS 1.0 Yordan Karadzhov (VMware)
2019-07-23 12:52 ` [PATCH 1/3] kernel-shark: Make KsEventsCheckBoxWidget::removeSystem more robust Yordan Karadzhov (VMware)
2019-07-23 12:52 ` Yordan Karadzhov (VMware) [this message]
2019-07-23 12:52 ` [PATCH 3/3] kernel-shark: Disable Capture if trace-cmd can't function Yordan Karadzhov (VMware)
2019-07-23 23:06   ` Steven Rostedt

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=20190723125204.22799-3-y.karadz@gmail.com \
    --to=y.karadz@gmail.com \
    --cc=howaboutsynergy@pm.me \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).