Received: by 10.192.165.156 with SMTP id m28csp334460imm; Mon, 16 Apr 2018 00:28:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/RlkNN6rDLIRRno2Vk7+O9GI3MOviIW6gKRJEFFGtgi0VPXrqa2riAe3Scjcmm3vKmd3/Z X-Received: by 10.99.121.65 with SMTP id u62mr2947925pgc.163.1523863700454; Mon, 16 Apr 2018 00:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523863700; cv=none; d=google.com; s=arc-20160816; b=G3ark6sbWN8FyrSVAWdWwuMZuQtyQrjaaG9aCrQUa5O/3/M93X4BwzsPFTiEzDENuH uFZT60ZzEnifCChBE0/Ie1RYcRqveI8X7kiesIFBNDofh2GDOHuGafWhFYJQv5LD3rIs ZFCZEf0XwJUgnOY0nuufWzuyVtxdiH4WbCZ7JX0Ps2dEvghuG3Zq6UzUp/1Jzqn5Njfw STO6xmupFnpa/28QNACKdDS66h17XvSf6+KIDpOyL7Tc2FSxD8VMxbVOK/rMnHAQEQz5 5WQboKWhV6dZKvWQr1h72EqTE9j4SaJtDClsIFNnBKfshtagt+6WkQUAKL4ssvUdhL6J G/gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=AYnAl6C8bOf3h5SqrHbDjd8mQhki/Bpw7XyKMQfv+MI=; b=s/FWNRU2685CbtM6ZQMJP/xQw6Lfmv71lT0bDSP4/2L8XFaCsowO031L9jv2LM3j0O RMbfAeT+Ksvd7MBTdi93/Q7X8PH7qYzq2iwbz13aGgpjvDITk5PksX3Z+rBqaJXsB/QS xu0Q8o5VGLe1ekHrgIxgRPgdQ42FWYGfF8D+Zx4F7ld6jIj4fJvlJDohVWPxgQkSMiaF MGeAdoLtfYHvQphLAqaOfTJkXdY+SOh6bFf3uDh61v8GnCpFjuV3UGc891B66hxkTzHE itJgI7A78g5W1NGNu7dbCD6ZloX0yAhhRx+sOb35sKE0X4vAdCROrz61ym1RwjxKw2P/ e4Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si9541093pgr.486.2018.04.16.00.28.06; Mon, 16 Apr 2018 00:28:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753575AbeDPGrq (ORCPT + 99 others); Mon, 16 Apr 2018 02:47:46 -0400 Received: from terminus.zytor.com ([198.137.202.136]:59453 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752221AbeDPGrn (ORCPT ); Mon, 16 Apr 2018 02:47:43 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w3G6laja407188; Sun, 15 Apr 2018 23:47:36 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w3G6lZrO407184; Sun, 15 Apr 2018 23:47:35 -0700 Date: Sun, 15 Apr 2018 23:47:35 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Thomas Richter Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, brueckner@linux.vnet.ibm.com, heiko.carstens@de.ibm.com, tmricht@linux.ibm.com, tglx@linutronix.de, acme@redhat.com, mingo@kernel.org, schwidefsky@de.ibm.com Reply-To: schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, tmricht@linux.ibm.com, hpa@zytor.com, linux-kernel@vger.kernel.org, brueckner@linux.vnet.ibm.com, mingo@kernel.org, acme@redhat.com, tglx@linutronix.de In-Reply-To: <20180412133246.92801-1-tmricht@linux.ibm.com> References: <20180412133246.92801-1-tmricht@linux.ibm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf record: Change warning for missing sysfs entry to debug Git-Commit-ID: 4f75f1cbf95e2f0853cd229d042b203931b899af X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 4f75f1cbf95e2f0853cd229d042b203931b899af Gitweb: https://git.kernel.org/tip/4f75f1cbf95e2f0853cd229d042b203931b899af Author: Thomas Richter AuthorDate: Thu, 12 Apr 2018 15:32:46 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 13 Apr 2018 09:59:56 -0300 perf record: Change warning for missing sysfs entry to debug Using perf on 4.16.0 kernel on s390 shows this warning: failed: can't open node sysfs data each time I run command perf record ... for example: [root@s35lp76 perf]# ./perf record -e rB0000 -- sleep 1 [ perf record: Woken up 1 times to write data ] failed: can't open node sysfs data [ perf record: Captured and wrote 0.001 MB perf.data (4 samples) ] [root@s35lp76 perf]# It turns out commit e2091cedd51bf ("perf tools: Add MEM_TOPOLOGY feature to perf data file") tries to open directory named /sys/devices/system/node/ which does not exist on s390. This is the call stack: __cmd_record +---> perf_session__write_header +---> perf_header__adds_write +---> do_write_feat +---> write_mem_topology +---> build_mem_topology prints warning The issue starts in do_write_feat() which unconditionally loops over all features and now includes HEADER_MEM_TOPOLOGY and calls write_mem_topology(). Function record__init_features() at the beginning of __cmd_record() sets all features and then turns off some of them. Fix this by changing the warning to a level 2 debug output statement. So it is only shown when debug level 2 or higher is set. Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180412133246.92801-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/header.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 121df1683c36..a8bff2178fbc 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1320,7 +1320,8 @@ static int build_mem_topology(struct memory_node *nodes, u64 size, u64 *cntp) dir = opendir(path); if (!dir) { - pr_warning("failed: can't open node sysfs data\n"); + pr_debug2("%s: could't read %s, does this arch have topology information?\n", + __func__, path); return -1; }