From patchwork Wed Nov 7 16:14:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10759681 Return-Path: Received: from mail-bl2nam02on0062.outbound.protection.outlook.com ([104.47.38.62]:11903 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727630AbeKHBpl (ORCPT ); Wed, 7 Nov 2018 20:45:41 -0500 From: Yordan Karadzhov To: "rostedt@goodmis.org" CC: "linux-trace-devel@vger.kernel.org" Subject: [PATCH 3/8] kernel-shark-qt: Update the visualization model before plotting new graphs Date: Wed, 7 Nov 2018 16:14:35 +0000 Message-ID: <20181107161410.22507-4-ykaradzhov@vmware.com> References: <20181107161410.22507-1-ykaradzhov@vmware.com> In-Reply-To: <20181107161410.22507-1-ykaradzhov@vmware.com> Content-Language: en-US MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org List-ID: Updating the model before creating new graphs guaranties that all previously plotted graphs are wiped out. Signed-off-by: Yordan Karadzhov --- kernel-shark-qt/src/KsGLWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 cpuList, QVector taskList) _graphs.append(graph); }; + _model.update(); + /* Create CPU graphs according to the cpuList. */ for (auto const &cpu: cpuList) lamAddGraph(_newCPUGraph(cpu));