Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1977028ybh; Tue, 14 Jul 2020 12:06:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtvkDM18LyeiuUD7JFhZ2FrTk+ekZM3R5vu/TSZqxuUEZg4XvZPo15R3pR8HCNzBA6iHYI X-Received: by 2002:a17:907:94ca:: with SMTP id dn10mr5781120ejc.348.1594753606774; Tue, 14 Jul 2020 12:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594753606; cv=none; d=google.com; s=arc-20160816; b=qcTyLjqx3BjggyfGpFMfMn0w9xSlnFMS1YFaTby9hRSGW7EgJ0v6XMWkHQlR9svS6z iN6voztLTUoOzmH+1Rc4Rek8Izy+yn1VLMPihPShlCoTTO7uruou5lg1kZmjmnY04i1a blWBT4D3fPkUPDTdGeY6EXj5c2lj+FTBiCNmYu3SX95FFFjz5ZE7X59EMnRqprAPoolu z8cn1+sSBD2q+y2kgJluP3GIltwa3ahWGPSMblzX4sF7klVNvIooHMy3Wz+KmVh5AUJ/ +9H9T/ArkciIZ7NU0mutKA7SKeMs377phMkM/FtbY73kUkJ2NfL0hgyhK/AK0HOJQ1w1 2FBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YJvOXHCJeZw7H5n3Lsd02Dmy/sP0aIG4GeaX1WS0ndo=; b=ksfxMGu7t/cs5PCoIWVn9ZS/Y1oOjNBW2N7FrVXO1Ij5i4pfiqNVdzH6zJBjrp9mNY jtfBmgLS58Fkl/X/bpFql5JE4HRufQPwAQ94aIZq2BympewWDJYJrQ1Bs2rA49m9i0xQ TUsH7XmWl6n2luPy8rBMBxk16YGigbEHgbqssHgh9wI3c07aaz/ROfCaEI2b3Vyt0bOW Kxh5V4vipVc0RdLZXy4jKapiMaFMrA+mw7DMu+jJlz5s0f6fIzvW1J0iErJr+ceCpS7w 3hlh/R4537GOwOzoeB+e1l9SGkL7Tr/BChJKU0xaD7hnCrR7STDZU+xtLa3p8QJnbYfU JFyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=T1FsQWB5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si11574374ejx.378.2020.07.14.12.06.22; Tue, 14 Jul 2020 12:06:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=T1FsQWB5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731197AbgGNTGR (ORCPT + 99 others); Tue, 14 Jul 2020 15:06:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:50454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730618AbgGNSx0 (ORCPT ); Tue, 14 Jul 2020 14:53:26 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CD89B22B3A; Tue, 14 Jul 2020 18:53:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594752806; bh=QMg3t7v4m+X0ZUi5wRxz4kW2zgxCcrXARq5pJ5mrBuk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T1FsQWB5+uvgRaZ7Co39xZj81n9cMvQFMG9yPYjrb/0DUKZbYvEvObKnwiV86T8rJ Vc6gEKTyucIzHmNXGtDdUze1fO+9VBuOFOoqADeeQVjxjPyUV96rHDk2oIzk2pkCJd eOp38lJ0WwRcexEaJr7sHeR6CsQY2cEpkPWSMaJg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 5.4 108/109] perf scripts python: exported-sql-viewer.py: Fix unexpanded Find result Date: Tue, 14 Jul 2020 20:44:51 +0200 Message-Id: <20200714184110.734736570@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200714184105.507384017@linuxfoundation.org> References: <20200714184105.507384017@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adrian Hunter commit 3a3cf7c570a486b07d9a6e68a77548aea6a8421f upstream. Using Python version 3.8.2 and PySide2 version 5.14.0, ctrl-F ('Find') would not expand the tree to the result. Fix by using setExpanded(). Example: $ perf record -e intel_pt//u uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.034 MB perf.data ] $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py perf.data.db branches calls 2020-06-26 15:32:14.928997 Creating database ... 2020-06-26 15:32:14.933971 Writing records... 2020-06-26 15:32:15.535251 Adding indexes 2020-06-26 15:32:15.542993 Dropping unused tables 2020-06-26 15:32:15.549716 Done $ python3 ~/libexec/perf-core/scripts/python/exported-sql-viewer.py perf.data.db Select: Reports -> Context-Sensitive Call Graph or Reports -> Call Tree Press: Ctrl-F Enter: main Press: Enter Before: line showing 'main' does not display After: tree is expanded to line showing 'main' Fixes: ebd70c7dc2f5f ("perf scripts python: exported-sql-viewer.py: Add ability to find symbols in the call-graph") Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20200629091955.17090-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/perf/scripts/python/exported-sql-viewer.py | 1 + 1 file changed, 1 insertion(+) --- a/tools/perf/scripts/python/exported-sql-viewer.py +++ b/tools/perf/scripts/python/exported-sql-viewer.py @@ -1018,6 +1018,7 @@ class TreeWindowBase(QMdiSubWindow): child = self.model.index(row, 0, parent) if child.internalPointer().dbid == dbid: found = True + self.view.setExpanded(parent, True) self.view.setCurrentIndex(child) parent = child break