From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05E8FC433EF for ; Wed, 12 Jan 2022 05:37:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=02g7OsLwj/qsJ56UM3rGdiwM1N7IK5Mih6kkD1hQGmk=; b=gG6/HxW9FOcl+jxzo4fKUtV1Hp 1wMjCofZhf6biXcuccVMVFr5tL+N5uFY23VLN4viDiD6EtItsKAE5pOruWxXfj2vk6YhcfjUKluxh 79vUriwSdwk2hK8T3+m1p2x5Q2se+lKlRgqdHCAl1ab4O7NxVR60buTCoRItTZSznk9uwhdQI4AN6 JbbDXlwSs2gGzXK4HYZf2Hk2JVd93DDaMD8v7d+BbcVHYss0Z+QqPcQcxjwstq/9m4V7kP4PA+H21 MId04niQdrDq1Cq4JgRBLrQVo/98hLNkt6Yx3m8H/RmKG41snND5ZMPkXBO1SPP6wgIqBrDmboZiN E6uMI8+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7WJ9-001BYL-VA; Wed, 12 Jan 2022 05:36:28 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5] helo=mx0a-001b2d01.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7WJ5-001BXh-Qu for linux-arm-kernel@lists.infradead.org; Wed, 12 Jan 2022 05:36:25 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20C2pkbe024353; Wed, 12 Jan 2022 05:36:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=4pQra9VPsb5+5MXeHj0uOPRIm1I6LaYKmWwauINLYwA=; b=ETIdmxlkDEIC1pFugfdKzSDMLORaTNhzXE8LFQFJ2cFdVqiHdjVNW3glLkFsI9cmPmTA ivbWeHZ6xSPNFzv0VZ6t+bwZaUSjXR+hL80pKFsAgTIKoL5+YCIgjm0pDvOmpqOEZFvU KI2exp6vmQboq4Uzlp/ADKz3s9eGHXE4sSoMbgNG5B5duWQttzhRqAjcgb+vGoMqM1wB 9LBcqDIRh3qzQsUZSgUPyFRdyH1MoJWHZrBahOnj64CKzQ3UNzuKHmjaCQ9ujeg3AwUb av0EPqBQ0f0vag1vyPKqA0ESDrl/vJC158a6SyRwOgnQSfjNeli5g5ae5+mM8v+BxK+1 Bw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3dhdw0cqrd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jan 2022 05:36:04 +0000 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 20C5UflQ026007; Wed, 12 Jan 2022 05:36:03 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 3dhdw0cqqv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jan 2022 05:36:03 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20C5WQM2002494; Wed, 12 Jan 2022 05:36:01 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma03fra.de.ibm.com with ESMTP id 3df289c5eu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jan 2022 05:36:01 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20C5ZwYh47120774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Jan 2022 05:35:58 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA2C5A4053; Wed, 12 Jan 2022 05:35:58 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DCF6FA4051; Wed, 12 Jan 2022 05:35:52 +0000 (GMT) Received: from li-e8dccbcc-2adc-11b2-a85c-bc1f33b9b810.ibm.com (unknown [9.43.87.192]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 12 Jan 2022 05:35:52 +0000 (GMT) Subject: Re: [PATCH v4 01/48] libperf: Add comments to perf_cpu_map. To: Ian Rogers , Andi Kleen , Jiri Olsa , Namhyung Kim , John Garry , "Paul A . Clarke" , Arnaldo Carvalho de Melo , Riccardo Mancini , Kan Liang , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Vineet Singh , James Clark , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Leo Yan , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, zhengjun.xing@intel.com Cc: eranian@google.com References: <20220105061351.120843-1-irogers@google.com> <20220105061351.120843-2-irogers@google.com> From: kajoljain Message-ID: <7344589b-1e17-ea8f-2d31-2905331fdcb3@linux.ibm.com> Date: Wed, 12 Jan 2022 11:05:51 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20220105061351.120843-2-irogers@google.com> Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-GUID: fs-4WJWdIysz3YAs8I9M3SLsZlQ36xC7 X-Proofpoint-ORIG-GUID: FoTGJ_wG6kgxzZVMoapiq1g472f3unke X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-12_02,2022-01-11_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 impostorscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1011 suspectscore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201120033 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220111_213624_002976_97916C45 X-CRM114-Status: GOOD ( 26.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/5/22 11:43 AM, Ian Rogers wrote: > A particular observed problem is confusing the index with the CPU value, > documentation should hopefully reduce this type of problem. > Patch looks good. Reviewed-by: Kajol Jain > Reviewed-by: James Clark > Signed-off-by: Ian Rogers > --- > tools/lib/perf/include/internal/cpumap.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/tools/lib/perf/include/internal/cpumap.h b/tools/lib/perf/include/internal/cpumap.h > index 840d4032587b..4054169c12c5 100644 > --- a/tools/lib/perf/include/internal/cpumap.h > +++ b/tools/lib/perf/include/internal/cpumap.h > @@ -4,9 +4,18 @@ > > #include > > +/** > + * A sized, reference counted, sorted array of integers representing CPU > + * numbers. This is commonly used to capture which CPUs a PMU is associated > + * with. The indices into the cpumap are frequently used as they avoid having > + * gaps if CPU numbers were used. For events associated with a pid, rather than > + * a CPU, a single dummy map with an entry of -1 is used. > + */ > struct perf_cpu_map { > refcount_t refcnt; > + /** Length of the map array. */ > int nr; > + /** The CPU values. */ > int map[]; > }; > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel