Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10025850ybi; Wed, 10 Jul 2019 22:05:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxo9dpThdp0iJ0Jn6aXdP9oxpoJKmE8fDA3pfwP5kziSaXF9v8hIIL26xKXm05E9Comacy4 X-Received: by 2002:a65:5cca:: with SMTP id b10mr2316182pgt.365.1562821543592; Wed, 10 Jul 2019 22:05:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562821543; cv=none; d=google.com; s=arc-20160816; b=s7lVKk/YsMGNPp43XR9oNEHj9mPJlVzlM5J4TB/uy1YYbqo9fpXRJQBBwCqiue76ds fpF7828EcZ0nagog1Tzek9NvBNdA+Sgje+JA3OzbV9htyITJR3X28X9d3M71pgy/gsxY KTNcGSrBY9WFuOnK5m6+YxLL+pO0V0LTNg/apIgsyzpWQAXvwM8gWWvpO09io1Dkg1lh bEHyAMsEYEtauo7Ib1sR5d7Mm0jQ7/0nyx8HAToNg6iU1Tmv+8tTNqK4iic4pw1T+me5 awEeksUhQmnwbtFqojyx70p1AAivVIWCfgI22UPeBAyJ2+2N7EtELYZcdFbWDEZXlFOG i18g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :references:cc:to:subject:from; bh=7nn4NhzMqAhnuiD15nQ89Pl11L37GkdBJ07m1lM3BUA=; b=sOAErnU2LdU0BCH3ClI3NeR2nx7sOJS0q7adpTEUg9Rs9MGUEGAnCrla2AQqtYVir9 1V91O+R9m+u5OGDEyNC0pHVPMFPcaPgZLqxus4lM2lp2VjfKijRV6NehJNM784U0qx8x JqKnXcYkWT1rQ8FauMQ9rDYPxDP50ynDuF8HU5G03pnEpCUaGmN58sjMvE/4HS3JntbH GA5JPEYYsredL/qMffMDQhS9GhXN+uUaIwk5YBAi+UzWpqLNv4ePf4EV7sjDCn9XYXTM 30ZSaGKfpl5a3hQycMiZ0s8Qq+QrWkqv0K627Dfxxr39lBFdcrEw4/cJS+DxoJiBc/yk I8QQ== 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 e7si4368129pfi.130.2019.07.10.22.05.26; Wed, 10 Jul 2019 22:05:43 -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 S1727470AbfGKEoO (ORCPT + 99 others); Thu, 11 Jul 2019 00:44:14 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:64122 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726088AbfGKEoO (ORCPT ); Thu, 11 Jul 2019 00:44:14 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6B4gZZn128493 for ; Thu, 11 Jul 2019 00:44:13 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2tnvm9k5g4-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 11 Jul 2019 00:44:12 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 Jul 2019 05:44:10 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 11 Jul 2019 05:44:05 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x6B4i4J546268522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Jul 2019 04:44:04 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A059D4C046; Thu, 11 Jul 2019 04:44:04 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A3D054C044; Thu, 11 Jul 2019 04:44:02 +0000 (GMT) Received: from [9.124.31.192] (unknown [9.124.31.192]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 11 Jul 2019 04:44:02 +0000 (GMT) From: Ravi Bangoria Subject: Re: [PATCH] Fix perf stat repeat segfault To: Numfor Mbiziwo-Tiapo Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, songliubraving@fb.com, mbd@fb.com, linux-kernel@vger.kernel.org, irogers@google.com, eranian@google.com References: <20190710204540.176495-1-nums@google.com> Date: Thu, 11 Jul 2019 10:14:01 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190710204540.176495-1-nums@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19071104-0016-0000-0000-0000029161B7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19071104-0017-0000-0000-000032EF1EB4 Message-Id: <9e68ade9-ebf9-eb70-474d-3720bb49d9f9@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-07-11_01:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907110053 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Numfor, On 7/11/19 2:15 AM, Numfor Mbiziwo-Tiapo wrote: > -static bool perf_evsel__should_store_id(struct perf_evsel *counter) > +static bool perf_evsel__should_store_id(struct perf_evsel *counter, int run_idx) > { > - return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID; > + return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID > + && run_idx < 1; > } Build fails for me: builtin-stat.c: In function ‘perf_evsel__should_store_id’: builtin-stat.c:395:3: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses] return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ && run_idx < 1; ^~~~~~~~~~~~~~ cc1: all warnings being treated as errors And probably, Fixes: 82bf311e15d2 ("perf stat: Use group read for event groups")