Received: by 10.213.65.68 with SMTP id h4csp563611imn; Tue, 13 Mar 2018 13:11:32 -0700 (PDT) X-Google-Smtp-Source: AG47ELtjFFdlDAF2PZsa3lcnZb8TfJpdpl6cU2/ntSpPutiVyi/8woOiJ7wgIW3NcsFy59lFGH+j X-Received: by 2002:a17:902:d807:: with SMTP id a7-v6mr1678024plz.218.1520971892511; Tue, 13 Mar 2018 13:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520971892; cv=none; d=google.com; s=arc-20160816; b=CfIKzTlWAeUIUVew0zMzDnjOTbCbvw8Pjd7CzZer9Z7vACtSeY0p8sjb2h3KgCEKy0 1ijRvp019L0K15tZVuNBJfXzUncMNTg5a8TmwTAVxJV2Gt8Rsm5dFyPXBqWzMNmPd3jY 3ZKgKK1+RO7AUbgBzWRVCaGE6uyUJvk4IRBQPNWwD/rEtlui1wtPqScKUh0jthgOHx3C C8JoFPe4mJBaerHQShpe/uy7M/7AQTr1Qpzy7xgawy+3WfgvfnLxb4IPY+f1rEpT/BkR d5+CJOIXnhF5Hw6JpJ8CwugP3bP3Gs731HKi2U9MfdEDlrgEsuOxN96yo3kLL1+cf8y+ KHrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date :arc-authentication-results; bh=3tKDOjMLw2yaKqpyMhDv3kgtYGflpd+0v0DkQY5oz34=; b=eKTqo45+jk+eSL2XIg3UJ0J2QvCrpVUCCt+rP5JHiPHCPuy2BVMhOApK0rl1Rv9yR7 MZLavuCi2HE15dGE6Ss18A0kPWRWh2O+Bs1h8qPik8Qycxjw2vUcm0TkVT0zSSZRVTAl jHbVLOTUyDyFFiiq6tkYZnqwwOTHItKOat0riuZJpiGsSGhj+GNGym/CliGMFc7smvKl /NBI3Qrbc11IA2RW+JDYKjTznYEYvyxUDbHZXVECo0e70LY4O+uced5vQMjlm56SAQqr 01xx3dfr23vI1JFvkZSA7xbZhYauHAacAEgdvSY1Gxwb3TbkZKz49gtNCDi5NfSm7az3 3+JA== 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 e61-v6si654920plb.190.2018.03.13.13.11.18; Tue, 13 Mar 2018 13:11:32 -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 S932669AbeCMUKN (ORCPT + 99 others); Tue, 13 Mar 2018 16:10:13 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:33036 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932544AbeCMUKK (ORCPT ); Tue, 13 Mar 2018 16:10:10 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2DK9Jtl097981 for ; Tue, 13 Mar 2018 16:10:10 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gpmb5tmrj-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Tue, 13 Mar 2018 16:10:08 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Mar 2018 14:10:07 -0600 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 13 Mar 2018 14:10:05 -0600 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2DKA5r512517882; Tue, 13 Mar 2018 13:10:05 -0700 Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E4D8378057; Tue, 13 Mar 2018 14:10:04 -0600 (MDT) Received: from suka-w540.localdomain (unknown [9.70.94.25]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP id BD92778047; Tue, 13 Mar 2018 14:10:04 -0600 (MDT) Received: by suka-w540.localdomain (Postfix, from userid 1000) id 5F65E22928B; Tue, 13 Mar 2018 13:10:03 -0700 (PDT) Date: Tue, 13 Mar 2018 13:10:03 -0700 From: Sukadev Bhattiprolu To: John Garry Cc: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Michael Ellerman Subject: Re: perf-core build fails on powerpc References: <20180313191742.GA29120@us.ibm.com> <152d2ba4-fe57-beab-87d5-554a0fede9ae@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152d2ba4-fe57-beab-87d5-554a0fede9ae@huawei.com> X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.7.1 (2016-10-04) X-TM-AS-GCONF: 00 x-cbid: 18031320-0016-0000-0000-00000863230F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008667; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01002585; UDB=6.00510161; IPR=6.00781915; MB=3.00020012; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-13 20:10:06 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031320-0017-0000-0000-00003DD45551 Message-Id: <20180313201003.GB29120@us.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-13_08:,, 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-1803130225 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org John Garry [john.garry@huawei.com] wrote: > On 13/03/2018 19:17, Sukadev Bhattiprolu wrote: > > > > > > Building perf on Powerpc seems broken when using Arnaldo's perf/core branch > > with HEAD as: > > > > 1b442ed ("perf test: Fix exit code for record+probe_libc_inet_pton.sh") > > > > It maybe related to this commit: > > > > commit d596299 > > Author: John Garry > > Date: Thu Mar 8 18:58:29 2018 +0800 > > > > perf vendor events: Add support for pmu events vendor subdirectory > > > > Reverting this hunk from tools/perf/pmu-events/jevents.c, seems to fix the > > problem for me. > > Hi John, I have an xfs file system which seems to have d_type == DT_UNKNOWN for all entries in 'tools/perf/pmu-events/arch/power8'! readdir(3) says ->d_type may not be supported by all file systems. Not relying on ->d_type seems to fix it: @@ -873,26 +879,26 @@ static int is_leaf_dir(const char *fpath) return 0; while ((dir = readdir(d)) != NULL) { - if (dir->d_type == DT_DIR && dir->d_name[0] != '.') { - res = 0; - break; - } else if (dir->d_type == DT_UNKNOWN) { - char path[PATH_MAX]; - struct stat st; + char path[PATH_MAX]; + struct stat st; - sprintf(path, "%s/%s", fpath, dir->d_name); - if (stat(path, &st)) - break; + if (strcmp(dir->d_name, ".") == 0 || + strcmp(dir->d_name, "..") == 0) + continue; - if (S_ISDIR(st.st_mode)) { - res = 0; - break; - } + sprintf(path, "%s/%s", fpath, dir->d_name); + if (stat(path, &st)) + break; + + if (S_ISDIR(st.st_mode)) { + res = 0; + break;