Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5504705ybv; Mon, 17 Feb 2020 21:57:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwZrL2GtYjMq5cQomx1AZItwgVbOJKbuXBVT8JaYYNLK9lOGaATVTJN35m21B3aIuHhxipz X-Received: by 2002:a9d:6f07:: with SMTP id n7mr14210387otq.112.1582005468579; Mon, 17 Feb 2020 21:57:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582005468; cv=none; d=google.com; s=arc-20160816; b=iyGRd+pjT0/VYHWVReiAu1OkW4bdUmjxa7u5eaCeDoi+4oG3wETZYfqpEnvfVkshQg a6UxhJlIEbaD6k3eBjUzmHt28e3EQAF9WJKJLKIqVuRpNBKwG8vqGN/47hozMGjUh9Bq c/ZVnF3VECUdxJ456dFL1j/GffY3Ja18IjVbC20avnDJbXTGUpqX6iKVeF8tpu4+sFo/ /23Rg4DtQlEB+FtOCeddGFrEG9TXMyoUFLq46GpCQsYwOYBomWU4dBQiRzgqxIR9QazX 7pfDtiCjD9G0rKMWlDzeEZ2R2H3tNMTi4tPaW+juumjFXWaP4JDXiNcW1nzBcM3GNsFD gehA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=9i5ui5WDwDie96CsFlTyuvtb5pYUMFTEpq9eU8fGZbQ=; b=DhABNfiwy1jHxeKdg4LLJNWaQaYGm4m9FWZ43ywb6rPKMqSuhvs48Q8mg3tfFpvV+y ctwonI82wPSe2UhDkdBm5QUrKtK2tO42ohQZ2gLISvVsSENWMUzIkU6XcxYbLEAHiY+b rZK1785VEuDJ6FbBTWZ7Vf7QNlrqXF+xlIwXsxJTg3eLtj9a++H1aHONG7h5D5CElo2O yrg4Ag/HeSB24x8FYvibnU4VTbwWjD3Fn5rxQC48nXSI+qFaCbhmrCesSxT3Al0IfOK2 XZRtURfEPBZEKIBoN2zoEQl8qxREr8tocMQGR1cp3reRwaxp4EMyVC/8XmxHE9Z4xvoh /VXQ== 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 f28si1299908otc.110.2020.02.17.21.57.36; Mon, 17 Feb 2020 21:57:48 -0800 (PST) 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 S1726289AbgBRF50 (ORCPT + 99 others); Tue, 18 Feb 2020 00:57:26 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48748 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725954AbgBRF5Y (ORCPT ); Tue, 18 Feb 2020 00:57:24 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01I5sxIw115376; Tue, 18 Feb 2020 00:57:16 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y6e1h7n0n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Feb 2020 00:57:16 -0500 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 01I5tR8j117074; Tue, 18 Feb 2020 00:57:15 -0500 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y6e1h7n07-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Feb 2020 00:57:15 -0500 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 01I5o40P013863; Tue, 18 Feb 2020 05:57:14 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma04wdc.us.ibm.com with ESMTP id 2y68967j5u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Feb 2020 05:57:14 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01I5vE0A54067678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Feb 2020 05:57:14 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1057F124054; Tue, 18 Feb 2020 05:57:14 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F2183124052; Tue, 18 Feb 2020 05:57:09 +0000 (GMT) Received: from localhost.localdomain (unknown [9.199.40.231]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 18 Feb 2020 05:57:09 +0000 (GMT) Subject: Re: [PATCH v4] tools/perf/metricgroup: Fix printing event names of metric group with multiple events incase of overlapping events To: Jiri Olsa Cc: acme@kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Jiri Olsa , Alexander Shishkin , Andi Kleen , Kan Liang , Peter Zijlstra , Jin Yao , Madhavan Srinivasan , Anju T Sudhakar , Ravi Bangoria References: <20200212054102.9259-1-kjain@linux.ibm.com> <20200216202143.GA145986@krava> From: kajoljain Message-ID: Date: Tue, 18 Feb 2020 11:27:08 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20200216202143.GA145986@krava> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-17_14:2020-02-17,2020-02-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 spamscore=0 adultscore=0 mlxscore=0 impostorscore=0 malwarescore=0 phishscore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002180048 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/17/20 1:51 AM, Jiri Olsa wrote: > On Wed, Feb 12, 2020 at 11:11:02AM +0530, Kajol Jain wrote: > > SNIP > >> >> return metric_events[0]; >> @@ -160,6 +161,14 @@ static int metricgroup__setup_events(struct list_head *groups, >> int ret = 0; >> struct egroup *eg; >> struct evsel *evsel; >> + bool *evlist_used; >> + >> + evlist_used = (bool *)calloc(perf_evlist->core.nr_entries, >> + sizeof(bool)); >> + if (!evlist_used) { >> + ret = -ENOMEM; >> + break; > > hum, how did this compile for you? ;-) > > util/metricgroup.c: In function ‘metricgroup__setup_events’: > util/metricgroup.c:170:3: error: break statement not within loop or switch > 170 | break; > > Hi jiri, Yes you are right. My bad I send patch from other branch. Will send correct one. Thanks, Kajol > jirka >