Skip to contentSkip to conversation

Add Qt-based GUI for KernelShark

PATCH Superseded Yordan Karadzhov 1 participant 11 messages Oct 12, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add Qt-based GUI for KernelShark

In this series of patches the major components of the Qt-based KernelShark GUI are introduced one by one in a sequence which follows there internal dependence. The series ends with the introduction of the MainWindow widget and the KernelShark executable itself.

Yordan Karadzhov (VMware) (10):
kernel-shark-qt: Add Dual Marker for KernelShark GUI.
kernel-shark-qt: Add model for showing trace data in a text format.
kernel-shark-qt: Add Trace Viewer widget.
kernel-shark-qt: Add visualization (graph) model
kernel-shark-qt: Add widget for OpenGL rendering
kernel-shark-qt: Add Trace Graph widget.
kernel-shark-qt: Add dialog for Advanced filtering.
kernel-shark-qt: Add a manager class for GUI sessions.
kernel-shark-qt: Add Main Window widget gir the KernelShark GUI.
kernel-shark-qt: Add KernelShark GUI executable.

 kernel-shark-qt/CMakeLists.txt               |   5 +
 kernel-shark-qt/src/CMakeLists.txt           |  23 +-
 kernel-shark-qt/src/KsAdvFilteringDialog.cpp | 440 +++++++++
 kernel-shark-qt/src/KsAdvFilteringDialog.hpp |  91 ++
 kernel-shark-qt/src/KsDualMarker.cpp         | 336 +++++++
 kernel-shark-qt/src/KsDualMarker.hpp         | 190 ++++
 kernel-shark-qt/src/KsGLWidget.cpp           | 913 +++++++++++++++++++
 kernel-shark-qt/src/KsGLWidget.hpp           | 220 +++++
 kernel-shark-qt/src/KsMainWindow.cpp         | 909 ++++++++++++++++++
 kernel-shark-qt/src/KsMainWindow.hpp         | 191 ++++
 kernel-shark-qt/src/KsModels.cpp             | 485 ++++++++++
 kernel-shark-qt/src/KsModels.hpp             | 289 ++++++
 kernel-shark-qt/src/KsSession.cpp            | 574 ++++++++++++
 kernel-shark-qt/src/KsSession.hpp            | 100 ++
 kernel-shark-qt/src/KsTraceGraph.cpp         | 690 ++++++++++++++
 kernel-shark-qt/src/KsTraceGraph.hpp         | 137 +++
 kernel-shark-qt/src/KsTraceViewer.cpp        | 655 +++++++++++++
 kernel-shark-qt/src/KsTraceViewer.hpp        | 144 +++
 kernel-shark-qt/src/kernelshark.cpp          |  93 ++
 19 files changed, 6483 insertions(+), 2 deletions(-)
 create mode 100644 kernel-shark-qt/src/KsAdvFilteringDialog.cpp
 create mode 100644 kernel-shark-qt/src/KsAdvFilteringDialog.hpp
 create mode 100644 kernel-shark-qt/src/KsDualMarker.cpp
 create mode 100644 kernel-shark-qt/src/KsDualMarker.hpp
 create mode 100644 kernel-shark-qt/src/KsGLWidget.cpp
 create mode 100644 kernel-shark-qt/src/KsGLWidget.hpp
 create mode 100644 kernel-shark-qt/src/KsMainWindow.cpp
 create mode 100644 kernel-shark-qt/src/KsMainWindow.hpp
 create mode 100644 kernel-shark-qt/src/KsModels.cpp
 create mode 100644 kernel-shark-qt/src/KsModels.hpp
 create mode 100644 kernel-shark-qt/src/KsSession.cpp
 create mode 100644 kernel-shark-qt/src/KsSession.hpp
 create mode 100644 kernel-shark-qt/src/KsTraceGraph.cpp
 create mode 100644 kernel-shark-qt/src/KsTraceGraph.hpp
 create mode 100644 kernel-shark-qt/src/KsTraceViewer.cpp
 create mode 100644 kernel-shark-qt/src/KsTraceViewer.hpp
 create mode 100644 kernel-shark-qt/src/kernelshark.cpp
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/10 kernel-shark-qt: Add Dual Marker for KernelShark GUI.

From: Yordan Karadzhov (VMware) <[email protected]>

This patch implements the Dual Marker used by the KernelShark GUI. The Dual Marker uses a simple State Machine having only two states (A and B). In the following patches the State Machine will connect to the Table and Graph widgets (not introduced yet) and will allow the user's actions in one of these widgets to have effect in the other one.

---
 kernel-shark-qt/src/CMakeLists.txt   |   2 +
 kernel-shark-qt/src/KsDualMarker.cpp | 332 +++++++++++++++++++++++++++
 kernel-shark-qt/src/KsDualMarker.hpp | 188 +++++++++++++++
 3 files changed, 522 insertions(+)
 create mode 100644 kernel-shark-qt/src/KsDualMarker.cpp
 create mode 100644 kernel-shark-qt/src/KsDualMarker.hpp
kernel-shark-qt/src/CMakeLists.txt +2 -0
index 2ac79ca..dc86cdf 100644
@@ -32,11 +32,13 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
 
     message(STATUS "libkshark-gui")
     set (ks-guiLib_hdr  KsUtils.hpp
+                        KsDualMarker.hpp
                         KsWidgetsLib.hpp)
 
     QT5_WRAP_CPP(ks-guiLib_hdr_moc ${ks-guiLib_hdr})
 
     add_library(kshark-gui  SHARED  ${ks-guiLib_hdr_moc}    KsUtils.cpp
+                                                            KsDualMarker.cpp
                                                             KsWidgetsLib.cpp)
 
     target_link_libraries(kshark-gui kshark-plot
kernel-shark-qt/src/KsDualMarker.cpp new file +332 -0

332 lines not on this page · raw message

kernel-shark-qt/src/KsDualMarker.hpp new file +188 -0

188 lines not on this page · raw message

Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/10 kernel-shark-qt: Add model for showing trace data in a text format.

In reply to Yordan Karadzhov

From: Yordan Karadzhov (VMware) <[email protected]>

This patch defines the model used by the Trace Viewer widget used to display trace data in a table-like form.

---
 kernel-shark-qt/src/CMakeLists.txt |   2 +
 kernel-shark-qt/src/KsModels.cpp   | 332 +++++++++++++++++++++++++++++
 kernel-shark-qt/src/KsModels.hpp   | 223 +++++++++++++++++++
 3 files changed, 557 insertions(+)
 create mode 100644 kernel-shark-qt/src/KsModels.cpp
 create mode 100644 kernel-shark-qt/src/KsModels.hpp
kernel-shark-qt/src/CMakeLists.txt +2 -0
index dc86cdf..3fd518b 100644
@@ -32,12 +32,14 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
 
     message(STATUS "libkshark-gui")
     set (ks-guiLib_hdr  KsUtils.hpp
+                        KsModels.hpp
                         KsDualMarker.hpp
                         KsWidgetsLib.hpp)
 
     QT5_WRAP_CPP(ks-guiLib_hdr_moc ${ks-guiLib_hdr})
 
     add_library(kshark-gui  SHARED  ${ks-guiLib_hdr_moc}    KsUtils.cpp
+                                                            KsModels.cpp
                                                             KsDualMarker.cpp
                                                             KsWidgetsLib.cpp)
 
kernel-shark-qt/src/KsModels.cpp new file +332 -0

332 lines not on this page · raw message

kernel-shark-qt/src/KsModels.hpp new file +223 -0

223 lines not on this page · raw message

Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/10 kernel-shark-qt: Add Trace Viewer widget.

In reply to Yordan Karadzhov

From: Yordan Karadzhov (VMware) <[email protected]>

This patch defines widget for browsing in the trace data shown in a text form. The provides a search panel and a Table view area. The panel and the table are integrated with the Dual Marker.

---
 kernel-shark-qt/src/CMakeLists.txt    |   6 +-
 kernel-shark-qt/src/KsTraceViewer.cpp | 655 ++++++++++++++++++++++++++
 kernel-shark-qt/src/KsTraceViewer.hpp | 144 ++++++
 3 files changed, 803 insertions(+), 2 deletions(-)
 create mode 100644 kernel-shark-qt/src/KsTraceViewer.cpp
 create mode 100644 kernel-shark-qt/src/KsTraceViewer.hpp
kernel-shark-qt/src/CMakeLists.txt +4 -2
index 3fd518b..3f40930 100644
@@ -34,14 +34,16 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
     set (ks-guiLib_hdr  KsUtils.hpp
                         KsModels.hpp
                         KsDualMarker.hpp
-                        KsWidgetsLib.hpp)
+                        KsWidgetsLib.hpp
+                        KsTraceViewer.hpp)
 
     QT5_WRAP_CPP(ks-guiLib_hdr_moc ${ks-guiLib_hdr})
 
     add_library(kshark-gui  SHARED  ${ks-guiLib_hdr_moc}    KsUtils.cpp
                                                             KsModels.cpp
                                                             KsDualMarker.cpp
-                                                            KsWidgetsLib.cpp)
+                                                            KsWidgetsLib.cpp
+                                                            KsTraceViewer.cpp)
 
     target_link_libraries(kshark-gui kshark-plot
                                      ${CMAKE_DL_LIBS}
kernel-shark-qt/src/KsTraceViewer.cpp new file +655 -0

655 lines not on this page · raw message

kernel-shark-qt/src/KsTraceViewer.hpp new file +144 -0

144 lines not on this page · raw message

Signature · 1 line
2.17.1
#4 lore raw

PATCH 4/10 kernel-shark-qt: Add visualization (graph) model

In reply to Yordan Karadzhov

From: Yordan Karadzhov (VMware) <[email protected]>

This patch defines the class KsGraphModel which provides a model for visualization of trace data. This class is a wrapper of kshark_trace_histo and is needed only because we want to use the signals defined in QAbstractTableModel (a class inherited by KsGraphModel).

---
 kernel-shark-qt/src/KsModels.cpp | 153 +++++++++++++++++++++++++++++++
 kernel-shark-qt/src/KsModels.hpp |  66 +++++++++++++
 2 files changed, 219 insertions(+)
kernel-shark-qt/src/KsModels.cpp +153 -0
index 095e26b..5eb1646 100644
@@ -330,3 +330,156 @@ size_t KsViewModel::search(int column,
 
 	return matchList->count();
 }
+
+/** Create a default (empty) KsFilterProxyModel object. */
+KsGraphModel::KsGraphModel(QObject *parent)
+: QAbstractTableModel(parent)
+{
+	ksmodel_init(&_histo);
+}
+
+/** Destroy KsFilterProxyModel object. */
+KsGraphModel::~KsGraphModel()
+{
+	ksmodel_clear(&_histo);
+}
+
+/**
+ * @brief Provide the Visualization model with data. Calculate the current
+ *	  state of the model.
+ *
+ * @param entries: Input location for the trace data.
+ * @param n: Number of bins.
+ */
+void KsGraphModel::fill(kshark_entry **entries, size_t n)
+{
+	if (n == 0)
+		return;
+
+	beginResetModel();
+
+	if (_histo.n_bins == 0)
+		ksmodel_set_bining(&_histo,
+				   KS_DEFAULT_NBUNS,
+				   entries[0]->ts,
+				   entries[n-1]->ts);
+
+	ksmodel_fill(&_histo, entries, n);
+
+	endResetModel();
+}
+
+/**
+ * @brief Shift the time-window of the model forward. Recalculate the current
+ *	  state of the model.
+ *
+ * @param n: Number of bins to shift.
+ */
+void KsGraphModel::shiftForward(size_t n)
+{
+	beginResetModel();
+	ksmodel_shift_forward(&_histo, n);
+	endResetModel();
+}
+
+/**
+ * @brief Shift the time-window of the model backward. Recalculate the current
+ *	  state of the model.
+ *
+ * @param n: Number of bins to shift.
+ */
+void KsGraphModel::shiftBackward(size_t n)
+{
+	beginResetModel();
+	ksmodel_shift_backward(&_histo, n);
+	endResetModel();
+}
+
+/**
+ * @brief Move the time-window of the model to a given location. Recalculate
+ *	  the current state of the model.
+ *
+ * @param ts: position in time to be visualized.
+ */
+void KsGraphModel::jumpTo(size_t ts)
+{
+	beginResetModel();
+	ksmodel_jump_to(&_histo, ts);
+	endResetModel();
+}
+
+/**
+ * @brief Extend the time-window of the model. Recalculate the current state
+ *	  of the model.
+ *
+ * @param r: Scale factor of the zoom-out.
+ * @param mark: Focus point of the zoom-out.
+ */
+void KsGraphModel::zoomOut(double r, int mark)
+{
+	beginResetModel();
+	ksmodel_zoom_out(&_histo, r, mark);
+	endResetModel();
+}
+
+/**
+ * @brief Shrink the time-window of the model. Recalculate the current state
+ *	  of the model.
+ *
+ * @param r: Scale factor of the zoom-in.
+ * @param mark: Focus point of the zoom-in.
+ */
+void KsGraphModel::zoomIn(double r, int mark)
+{
+	beginResetModel();
+	ksmodel_zoom_in(&_histo, r, mark);
+	endResetModel();
+}
+
+/** Quick zoom out. The entire data-set will be visualized. */
+void KsGraphModel::quickZoomOut()
+{
+	beginResetModel();
+
+	ksmodel_set_bining(&_histo,
+			   _histo.n_bins,
+			   _histo.data[0]->ts,
+			   _histo.data[_histo.data_size - 1]->ts);
+
+	ksmodel_fill(&_histo, _histo.data, _histo.data_size);
+
+	endResetModel();
+}
+
+/**
+ * @brief Quick zoom in to a state of the Visualization model which has the
+ * given bin size. The actual value of the bin size may en up being slightly
+ * different because of the fine tuning performed by the model.
+ *
+ * @param binSize: an approximate value for the new size of the bins.
+ */
+void KsGraphModel::quickZoomIn(uint64_t binSize)
+{
+	double range, r;
+
+	range =  _histo.max - _histo.min;
+	r = 1 - (binSize * _histo.n_bins) / range;
+	zoomIn(r);
+}
+
+/** Reset the model. */
+void KsGraphModel::reset()
+{
+	beginResetModel();
+	ksmodel_clear(&_histo);
+	endResetModel();
+}
+
+/** Update the model. Use this function if the data has changed. */
+void KsGraphModel::update(KsDataStore *data)
+{
+	beginResetModel();
+	if (data)
+		ksmodel_fill(&_histo, data->rows(), data->size());
+	endResetModel();
+}
kernel-shark-qt/src/KsModels.hpp +66 -0

70 lines not on this page · raw message

Signature · 1 line
2.17.1
#5 lore raw

PATCH 5/10 kernel-shark-qt: Add widget for OpenGL rendering

In reply to Yordan Karadzhov

From: Yordan Karadzhov (VMware) <[email protected]>

This patch defines the widget for rendering OpenGL graphics used to plot trace graphs.

---
 kernel-shark-qt/src/CMakeLists.txt   |   2 +
 kernel-shark-qt/src/KsDualMarker.cpp |  12 +-
 kernel-shark-qt/src/KsDualMarker.hpp |   4 +-
 kernel-shark-qt/src/KsGLWidget.cpp   | 913 +++++++++++++++++++++++++++
 kernel-shark-qt/src/KsGLWidget.hpp   | 220 +++++++
 5 files changed, 1146 insertions(+), 5 deletions(-)
 create mode 100644 kernel-shark-qt/src/KsGLWidget.cpp
 create mode 100644 kernel-shark-qt/src/KsGLWidget.hpp
kernel-shark-qt/src/CMakeLists.txt +2 -0
index 3f40930..2ca5187 100644
@@ -33,6 +33,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
     message(STATUS "libkshark-gui")
     set (ks-guiLib_hdr  KsUtils.hpp
                         KsModels.hpp
+                        KsGLWidget.hpp
                         KsDualMarker.hpp
                         KsWidgetsLib.hpp
                         KsTraceViewer.hpp)
@@ -41,6 +42,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
 
     add_library(kshark-gui  SHARED  ${ks-guiLib_hdr_moc}    KsUtils.cpp
                                                             KsModels.cpp
+                                                            KsGLWidget.cpp
                                                             KsDualMarker.cpp
                                                             KsWidgetsLib.cpp
                                                             KsTraceViewer.cpp)
kernel-shark-qt/src/KsDualMarker.cpp +8 -4
index ae637aa..ef126f7 100644
@@ -10,6 +10,7 @@
  */
 
 #include "KsDualMarker.hpp"
+#include "KsGLWidget.hpp"
 
 /**
  * @brief Create KsGraphMark object.
@@ -287,13 +288,16 @@ void KsDualMarkerSM::setState(DualMarkerState st) {
  *	  model has changed.
  *
  * @param data: Input location for the Data Store object.
- * @param histo: Input location for the model descriptor.
+ * @param glw: Input location for the OpenGL widget object.
  */
 void KsDualMarkerSM::updateMarkers(const KsDataStore &data,
-				   kshark_trace_histo *histo)
+				   KsGLWidget *glw)
 {
-	_markA.update(data, histo);
-	_markB.update(data, histo);
+	if(_markA.update(data, glw->model()->histo()))
+		glw->setMark(&_markA);
+
+	if(_markB.update(data, glw->model()->histo()))
+		glw->setMark(&_markB);
 
 	updateLabels();
 }
kernel-shark-qt/src/KsDualMarker.hpp +3 -1
index 401b41c..73d4f8a 100644
@@ -19,6 +19,8 @@
 #include "KsUtils.hpp"
 #include "KsPlotTools.hpp"
 
+class KsGLWidget;
+
 /** The KsGraphMark represents a marker for KernelShark GUI. */
 class KsGraphMark : public QObject
 {
@@ -124,7 +126,7 @@ public:
 	QState *stateBPtr() {return _stateB;}
 
 	void updateMarkers(const KsDataStore &data,
-			   kshark_trace_histo *histo);
+			   KsGLWidget *glw);
 
 	void updateLabels();
 
kernel-shark-qt/src/KsGLWidget.cpp new file +913 -0

913 lines not on this page · raw message

kernel-shark-qt/src/KsGLWidget.hpp new file +220 -0

220 lines not on this page · raw message

Signature · 1 line
2.17.1
#6 lore raw

PATCH 6/10 kernel-shark-qt: Add Trace Graph widget.

In reply to Yordan Karadzhov

From: Yordan Karadzhov (VMware) <[email protected]>

This patch defines widget for interactive visualization of trace data shown as time-series. The provides an info panel and a graph plotting area (KsGLWidget). The panel and the plotting area are integrated with the Dual Marker.

---
 kernel-shark-qt/src/CMakeLists.txt   |   2 +
 kernel-shark-qt/src/KsTraceGraph.cpp | 690 +++++++++++++++++++++++++++
 kernel-shark-qt/src/KsTraceGraph.hpp | 137 ++++++
 3 files changed, 829 insertions(+)
 create mode 100644 kernel-shark-qt/src/KsTraceGraph.cpp
 create mode 100644 kernel-shark-qt/src/KsTraceGraph.hpp
kernel-shark-qt/src/CMakeLists.txt +2 -0
index 2ca5187..d406866 100644
@@ -36,6 +36,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
                         KsGLWidget.hpp
                         KsDualMarker.hpp
                         KsWidgetsLib.hpp
+                        KsTraceGraph.hpp
                         KsTraceViewer.hpp)
 
     QT5_WRAP_CPP(ks-guiLib_hdr_moc ${ks-guiLib_hdr})
@@ -45,6 +46,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
                                                             KsGLWidget.cpp
                                                             KsDualMarker.cpp
                                                             KsWidgetsLib.cpp
+                                                            KsTraceGraph.cpp
                                                             KsTraceViewer.cpp)
 
     target_link_libraries(kshark-gui kshark-plot
kernel-shark-qt/src/KsTraceGraph.cpp new file +690 -0

690 lines not on this page · raw message

kernel-shark-qt/src/KsTraceGraph.hpp new file +137 -0

137 lines not on this page · raw message

Signature · 1 line
2.17.1
#7 lore raw

PATCH 7/10 kernel-shark-qt: Add dialog for Advanced filtering.

In reply to Yordan Karadzhov

From: Yordan Karadzhov (VMware) <[email protected]>

This patch defines a dialog for configuring and using Advanced filtering.

---
 kernel-shark-qt/src/CMakeLists.txt           |   6 +-
 kernel-shark-qt/src/KsAdvFilteringDialog.cpp | 440 +++++++++++++++++++
 kernel-shark-qt/src/KsAdvFilteringDialog.hpp |  91 ++++
 3 files changed, 535 insertions(+), 2 deletions(-)
 create mode 100644 kernel-shark-qt/src/KsAdvFilteringDialog.cpp
 create mode 100644 kernel-shark-qt/src/KsAdvFilteringDialog.hpp
kernel-shark-qt/src/CMakeLists.txt +4 -2
index d406866..26b45f4 100644
@@ -37,7 +37,8 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
                         KsDualMarker.hpp
                         KsWidgetsLib.hpp
                         KsTraceGraph.hpp
-                        KsTraceViewer.hpp)
+                        KsTraceViewer.hpp
+                        KsAdvFilteringDialog.hpp)
 
     QT5_WRAP_CPP(ks-guiLib_hdr_moc ${ks-guiLib_hdr})
 
@@ -47,7 +48,8 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
                                                             KsDualMarker.cpp
                                                             KsWidgetsLib.cpp
                                                             KsTraceGraph.cpp
-                                                            KsTraceViewer.cpp)
+                                                            KsTraceViewer.cpp
+                                                            KsAdvFilteringDialog.cpp)
 
     target_link_libraries(kshark-gui kshark-plot
                                      ${CMAKE_DL_LIBS}
kernel-shark-qt/src/KsAdvFilteringDialog.cpp new file +440 -0

440 lines not on this page · raw message

kernel-shark-qt/src/KsAdvFilteringDialog.hpp new file +91 -0

91 lines not on this page · raw message

Signature · 1 line
2.17.1
#8 lore raw

PATCH 8/10 kernel-shark-qt: Add a manager class for GUI sessions.

In reply to Yordan Karadzhov

From: Yordan Karadzhov (VMware) <[email protected]>

The KsSession class provides instruments for importing/exporting the state of the different components of the GUI from/to Json documents. These instruments are used to save/load user session in the GUI.

---
 kernel-shark-qt/src/CMakeLists.txt |   1 +
 kernel-shark-qt/src/KsSession.cpp  | 574 +++++++++++++++++++++++++++++
 kernel-shark-qt/src/KsSession.hpp  | 100 +++++
 3 files changed, 675 insertions(+)
 create mode 100644 kernel-shark-qt/src/KsSession.cpp
 create mode 100644 kernel-shark-qt/src/KsSession.hpp
kernel-shark-qt/src/CMakeLists.txt +1 -0
index 26b45f4..192cd12 100644
@@ -44,6 +44,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
 
     add_library(kshark-gui  SHARED  ${ks-guiLib_hdr_moc}    KsUtils.cpp
                                                             KsModels.cpp
+                                                            KsSession.cpp
                                                             KsGLWidget.cpp
                                                             KsDualMarker.cpp
                                                             KsWidgetsLib.cpp
kernel-shark-qt/src/KsSession.cpp new file +574 -0

574 lines not on this page · raw message

kernel-shark-qt/src/KsSession.hpp new file +100 -0

100 lines not on this page · raw message

Signature · 1 line
2.17.1
#9 lore raw

PATCH 9/10 kernel-shark-qt: Add Main Window widget gir the KernelShark GUI.

In reply to Yordan Karadzhov

From: Yordan Karadzhov (VMware) <[email protected]>

The KsMainWindow class provides the Main window for the KernelShark GUI. It implements the frame used by the two trace data viewing areas (Graphs and Table) together withe the system of menus, used to perform different actions.

---
 kernel-shark-qt/CMakeLists.txt       |   5 +
 kernel-shark-qt/src/CMakeLists.txt   |   2 +
 kernel-shark-qt/src/KsMainWindow.cpp | 909 +++++++++++++++++++++++++++
 kernel-shark-qt/src/KsMainWindow.hpp | 191 ++++++
 4 files changed, 1107 insertions(+)
 create mode 100644 kernel-shark-qt/src/KsMainWindow.cpp
 create mode 100644 kernel-shark-qt/src/KsMainWindow.hpp
kernel-shark-qt/CMakeLists.txt +5 -0
index 71a021e..0ccb61e 100644
@@ -12,6 +12,11 @@ message("\n project: Kernel Shark: (version: ${KS_VERSION_STRING})\n")
 
 set(KS_DIR ${CMAKE_SOURCE_DIR})
 
+# Make a directory to hold configuration files. To change this do:
+# cmake .. -DKS_CONF_DIR=/your/preferred/path
+set(KS_CONF_DIR "${KS_DIR}/.ksconf" CACHE STRING "Directory for configuration files.")
+file(MAKE_DIRECTORY ${KS_CONF_DIR})
+
 include(${KS_DIR}/build/FindTraceCmd.cmake)
 include(${KS_DIR}/build/FindJSONC.cmake)
 
kernel-shark-qt/src/CMakeLists.txt +2 -0
index 192cd12..d8daada 100644
@@ -38,6 +38,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
                         KsWidgetsLib.hpp
                         KsTraceGraph.hpp
                         KsTraceViewer.hpp
+                        KsMainWindow.hpp
                         KsAdvFilteringDialog.hpp)
 
     QT5_WRAP_CPP(ks-guiLib_hdr_moc ${ks-guiLib_hdr})
@@ -50,6 +51,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
                                                             KsWidgetsLib.cpp
                                                             KsTraceGraph.cpp
                                                             KsTraceViewer.cpp
+                                                            KsMainWindow.cpp
                                                             KsAdvFilteringDialog.cpp)
 
     target_link_libraries(kshark-gui kshark-plot
kernel-shark-qt/src/KsMainWindow.cpp new file +909 -0

909 lines not on this page · raw message

kernel-shark-qt/src/KsMainWindow.hpp new file +191 -0

191 lines not on this page · raw message

Signature · 1 line
2.17.1
#10 lore raw

PATCH 10/10 kernel-shark-qt: Add KernelShark GUI executable.

In reply to Yordan Karadzhov

From: Yordan Karadzhov (VMware) <[email protected]>

This patch adds the main executable of the KernelShark GUI.

---
 kernel-shark-qt/src/CMakeLists.txt  |  4 ++
 kernel-shark-qt/src/kernelshark.cpp | 93 +++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+)
 create mode 100644 kernel-shark-qt/src/kernelshark.cpp
kernel-shark-qt/src/CMakeLists.txt +4 -0
index d8daada..b51980f 100644
@@ -63,6 +63,10 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
 
     set_target_properties(kshark-gui PROPERTIES  SUFFIX ".so.${KS_VERSION_STRING}")
 
+    message(STATUS "kernelshark")
+    add_executable(kernelshark          kernelshark.cpp)
+    target_link_libraries(kernelshark   kshark-gui)
+
 endif (Qt5Widgets_FOUND AND Qt5Network_FOUND)
 
 add_subdirectory(plugins)
kernel-shark-qt/src/kernelshark.cpp new file +93 -0

93 lines not on this page · raw message

Signature · 1 line
2.17.1