Received: by 10.192.165.156 with SMTP id m28csp1967417imm; Thu, 12 Apr 2018 06:36:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx48cFdivvF05aJsxxZ9t6cXIUrZEaN9nSOdONd2cU9IZMOFQJKuq3f7Q+B5EiZBdt72VsODS X-Received: by 10.101.97.208 with SMTP id j16mr744658pgv.431.1523540188609; Thu, 12 Apr 2018 06:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523540188; cv=none; d=google.com; s=arc-20160816; b=Oh+W4OiX1ePRt0FEkYqlBS42AEj0zayKynCJa08sIJ8I+K+NlO2VYftuwm2SkLB2JP nviGFymYpxdQxQC7NuEZS7QAs5nKL8kCgot7HPGMg534SQ0bQvSrKJ2CiZsf35sF9EfK HU22mGEC7B8fKJH/vYUKoAGfHKPQoeQ55xP4L8pDibyE6/JGfRv428Ygtx+MkwQ2EEG8 puhG55VLbrKCw6TohX5g+KKclRl/w2m1JNHbHk2X/JGocekx6qmBxkqBJj7vfhotT39v 5PRO8DakaYlrdgp66bTUeqf5a3djJTIubWdpbQEo0YauMjS+aJNsJ5p4qzduD6k0Cf+k CbxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=bwJnzIULZ27XFzG9hAEKy+fSMARiQ8rjOTN+U+RuRTc=; b=G/H/qn9DvugLFd9HW0LPDXZ902bbZ5TNaj5LH1mnwkao8Bt+MsYBZxMILLNbKlzdRA h3sBQyAjebcPATPxKIdo4qytrgtf5t2vjbFpPTPxdbq4MC1Cx89YmjNWT5uu4ZraXqUq pipbqL2TKO7/U6Ps++qLMY8HajfezldMD7FSup1bKVKJeZR4Agkez/QMjvCciKWR8tLQ Sw+xaYzgzvWoz+b998Nsdgya4jjI7QRTipq2DHR6qqxHbMqoDiwaO/lwft2v8kvFAH7y vkTbHXF5GBPTqftJThGiH2BjDmorSJIPPAGCUfeSv2B63fZse1YV2ZMZtOQqirx6Adq0 H1Fw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t20si2637444pfk.228.2018.04.12.06.35.51; Thu, 12 Apr 2018 06:36:28 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752406AbeDLNdL (ORCPT + 99 others); Thu, 12 Apr 2018 09:33:11 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55574 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbeDLNdK (ORCPT ); Thu, 12 Apr 2018 09:33:10 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3CDWamh038483 for ; Thu, 12 Apr 2018 09:33:10 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ha7ynshr2-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 12 Apr 2018 09:33:02 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Apr 2018 14:32:52 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 12 Apr 2018 14:32:49 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3CDWnPZ12583248; Thu, 12 Apr 2018 13:32:49 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D81E54204B; Thu, 12 Apr 2018 14:24:29 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A718B4203F; Thu, 12 Apr 2018 14:24:29 +0100 (BST) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 12 Apr 2018 14:24:29 +0100 (BST) From: Thomas Richter To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, Thomas Richter Subject: [PATCH] perf record: Change warning for missing sysfs entry to debug Date: Thu, 12 Apr 2018 15:32:46 +0200 X-Mailer: git-send-email 2.13.5 X-TM-AS-GCONF: 00 x-cbid: 18041213-0040-0000-0000-0000044CC47E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041213-0041-0000-0000-000020F0F88F Message-Id: <20180412133246.92801-1-tmricht@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-12_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804120135 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using perf on 4.16.0 kernel on s390 shows 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 --- 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; } -- 2.14.3