From patchwork Wed Nov 28 15:16:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10760029 Return-Path: Received: from mail-eopbgr710070.outbound.protection.outlook.com ([40.107.71.70]:36576 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727941AbeK2CSK (ORCPT ); Wed, 28 Nov 2018 21:18:10 -0500 From: Yordan Karadzhov To: "rostedt@goodmis.org" CC: "linux-trace-devel@vger.kernel.org" Subject: [PATCH 02/17] kernel-shark-qt: Reprocess all CPU collections when the filtering changes Date: Wed, 28 Nov 2018 15:16:07 +0000 Message-ID: <20181128151530.21965-3-ykaradzhov@vmware.com> References: <20181128151530.21965-1-ykaradzhov@vmware.com> In-Reply-To: <20181128151530.21965-1-ykaradzhov@vmware.com> Content-Language: en-US MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org List-ID: The CPU data collections are processed according to the visibility of the entries. If the filtering condition changes, we need to reprocess those data collections. Signed-off-by: Yordan Karadzhov --- kernel-shark-qt/src/KsUtils.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel-shark-qt/src/KsUtils.cpp b/kernel-shark-qt/src/KsUtils.cpp index 8bb0970..25e7fdb 100644 --- a/kernel-shark-qt/src/KsUtils.cpp +++ b/kernel-shark-qt/src/KsUtils.cpp @@ -186,10 +186,14 @@ void KsDataStore::update() if (!kshark_instance(&kshark_ctx)) return; + _unregisterCPUCollections(); + if (kshark_filter_is_set(kshark_ctx)) { kshark_filter_entries(kshark_ctx, _rows, _dataSize); emit updateWidgets(this); } + + registerCPUCollections(); } /** Register a collection of visible entries for each CPU. */