From: Yordan Karadzhov <ykaradzhov@vmware.com>
To: "rostedt@goodmis.org" <rostedt@goodmis.org>
Cc: "linux-trace-devel@vger.kernel.org" <linux-trace-devel@vger.kernel.org>
Subject: [PATCH 09/11] kernel-shark-qt: Remove all system=ftrace events from Record dialog
Date: Wed, 21 Nov 2018 15:14:27 +0000 [thread overview]
Message-ID: <20181121151356.16901-11-ykaradzhov@vmware.com> (raw)
In-Reply-To: <20181121151356.16901-1-ykaradzhov@vmware.com>
"ftrace" system events should not be passed as a command line option
to trace-cmd. This patch remove these events from the checkbox tree of
the Record dialog.
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
kernel-shark-qt/src/KsCaptureDialog.cpp | 1 +
kernel-shark-qt/src/KsWidgetsLib.cpp | 10 ++++++++++
kernel-shark-qt/src/KsWidgetsLib.hpp | 2 ++
3 files changed, 13 insertions(+)
diff --git a/kernel-shark-qt/src/KsCaptureDialog.cpp b/kernel-shark-qt/src/KsCaptureDialog.cpp
index ee1abc3..5d5ca2f 100644
--- a/kernel-shark-qt/src/KsCaptureDialog.cpp
+++ b/kernel-shark-qt/src/KsCaptureDialog.cpp
@@ -81,6 +81,7 @@ KsCaptureControl::KsCaptureControl(QWidget *parent)
_eventsWidget.setDefault(false);
_eventsWidget.setMinimumHeight(25 * FONT_HEIGHT);
+ _eventsWidget.removeSystem("ftrace");
_topLayout.addWidget(&_eventsWidget);
_pluginsLabel.adjustSize();
diff --git a/kernel-shark-qt/src/KsWidgetsLib.cpp b/kernel-shark-qt/src/KsWidgetsLib.cpp
index dd6ab0f..191ea7d 100644
--- a/kernel-shark-qt/src/KsWidgetsLib.cpp
+++ b/kernel-shark-qt/src/KsWidgetsLib.cpp
@@ -706,6 +706,16 @@ KsEventsCheckBoxWidget::KsEventsCheckBoxWidget(struct tep_handle *tep,
_adjustSize();
}
+/** Remove a System from the Checkbox tree. */
+void KsEventsCheckBoxWidget::removeSystem(QString name) {
+ QTreeWidgetItem *item =
+ _tree.findItems(name, Qt::MatchFixedString, 0)[0];
+
+ int index = _tree.indexOfTopLevelItem(item);
+ if (index >= 0)
+ _tree.takeTopLevelItem(index);
+}
+
/**
* @brief Create KsTasksCheckBoxWidget.
*
diff --git a/kernel-shark-qt/src/KsWidgetsLib.hpp b/kernel-shark-qt/src/KsWidgetsLib.hpp
index 89c196a..c09bcd5 100644
--- a/kernel-shark-qt/src/KsWidgetsLib.hpp
+++ b/kernel-shark-qt/src/KsWidgetsLib.hpp
@@ -332,6 +332,8 @@ struct KsEventsCheckBoxWidget : public KsCheckBoxTreeWidget
KsEventsCheckBoxWidget(struct tep_handle *pe,
QWidget *parent = nullptr);
+
+ void removeSystem(QString name);
};
/**
--
2.17.1
next prev parent reply other threads:[~2018-11-22 1:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 15:14 [PATCH 00/11] Small modifications and bug fixes toward KS 1.0 Yordan Karadzhov
2018-11-21 15:14 ` [PATCH 01/11] kernel-shark-qt: protect all calls of tep_read_number_field() Yordan Karadzhov
2018-11-21 15:14 ` [PATCH 01/11] kernel-shark-qt: Protect " Yordan Karadzhov
2018-11-27 20:34 ` Steven Rostedt
2018-11-21 15:14 ` [PATCH 02/11] kernel-shark-qt: Fix the returned error value of kshark_get_event_id_easy() Yordan Karadzhov
2018-11-21 15:14 ` [PATCH 03/11] kernel-shark-qt: Avoid race condition in kshark_get_event_name_easy() Yordan Karadzhov
2018-11-27 20:37 ` Steven Rostedt
2018-11-21 15:14 ` [PATCH 04/11] kernel-shark-qt: Optimize the search in the text data Yordan Karadzhov
2018-11-21 15:14 ` [PATCH 05/11] kernel-shark-qt: Add iterator index to the search panel Yordan Karadzhov
2018-11-21 15:14 ` [PATCH 06/11] kernel-shark-qt: Update search iterator when marker is changed Yordan Karadzhov
2018-11-21 15:14 ` [PATCH 07/11] kernel-shark-qt: Optimize the search in a case of a small data-set Yordan Karadzhov
2018-11-21 15:14 ` [PATCH 08/11] kernel-shark qt: No error when Record authentication dialog is closed Yordan Karadzhov
2018-11-27 20:45 ` Steven Rostedt
2018-11-21 15:14 ` Yordan Karadzhov [this message]
2018-11-27 23:02 ` [PATCH 00/11] Small modifications and bug fixes toward KS 1.0 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=20181121151356.16901-11-ykaradzhov@vmware.com \
--to=ykaradzhov@vmware.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 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).