@@ -81,6 +81,7 @@ KsCaptureControl::KsCaptureControl(QWidget *parent)
_eventsWidget.setDefault(false);
_eventsWidget.setMinimumHeight(25 * FONT_HEIGHT);
+ _eventsWidget.removeSystem("ftrace");
_topLayout.addWidget(&_eventsWidget);
_pluginsLabel.adjustSize();
@@ -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.
*
@@ -332,6 +332,8 @@ struct KsEventsCheckBoxWidget : public KsCheckBoxTreeWidget
KsEventsCheckBoxWidget(struct tep_handle *pe,
QWidget *parent = nullptr);
+
+ void removeSystem(QString name);
};
/**
"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(+)