diff mbox series

[3/8] kernel-shark-qt: Update the visualization model before plotting new graphs

Message ID 20181107161410.22507-4-ykaradzhov@vmware.com (mailing list archive)
State Superseded
Headers show
Series New/improved KernelShark plugins | expand

Commit Message

Yordan Karadzhov Nov. 7, 2018, 4:14 p.m. UTC
Updating the model before creating new graphs guaranties that all
previously plotted graphs are wiped out.

Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark-qt/src/KsGLWidget.cpp | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/kernel-shark-qt/src/KsGLWidget.cpp b/kernel-shark-qt/src/KsGLWidget.cpp
index 2a0b16b..92b9224 100644
--- a/kernel-shark-qt/src/KsGLWidget.cpp
+++ b/kernel-shark-qt/src/KsGLWidget.cpp
@@ -484,6 +484,8 @@  void KsGLWidget::_makeGraphs(QVector<int> cpuList, QVector<int> taskList)
 		_graphs.append(graph);
 	};
 
+	_model.update();
+
 	/* Create CPU graphs according to the cpuList. */
 	for (auto const &cpu: cpuList)
 		lamAddGraph(_newCPUGraph(cpu));