From patchwork Tue Feb 27 19:04:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 86470 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 42BD53858426 for ; Tue, 27 Feb 2024 19:05:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id C76493858D33 for ; Tue, 27 Feb 2024 19:04:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C76493858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C76493858D33 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1709060691; cv=pass; b=kPaBR11xYMz8G4k3S+wtTmG8Xo7NDhcUCtfFoN4RKT+hxEYvQaKycV4MLKO6FfUt9akni7QHq07QR9+bMWmioxbHrQ7lU6S0mL5/XAbTGBl9dcXTxcltYK48B1p5Vq2fFOaTFPAdE+zqyjKTeGcMTpyANlVOo2mLKLxW3ON6eT8= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1709060691; c=relaxed/simple; bh=xGxzBogL1Jw16ROtO27MYD0teoiV1ajx3a9kdKclF+g=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=M1iei4/AZ58/mC5iepW3GMlY0JkjpT8mBSW3sB/bq+QZ0gg+S25CU52gYDFsX07S/OX6/T8kJ8/YFkZbudY/dSz5E05nbqm2xgK3Q0r0Zs5qjv4LZ8Y23MKAdJBgHfROZfooaE2tj5N4gqt5MJGkeHwIH5Q8Sh3JCQwAAa6OyBA= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41RFXsWa022489 for ; Tue, 27 Feb 2024 19:04:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=rGQVMP7zTU2YGgCyfYfr1coJ05uSceReMAWfueqCudE=; b=G6QBW7E1tXDPIdscvQTAY8NQcBo+/M7M9Ne5sinwhzrPHIxUIJ8j+pBSfeFF/SLYWeCv nIEPrAB0QjMBDQ1bCYmwmdXow54ipub00kiTHrYfbr2jqFmUJa/61VIo2VMQR5UEHSO0 8GE2L10ovolkSYanFAGAafH1lNphxagZJaJgClRoOUD+lst+eUVzD1Ez6B3X9PG1yEdj xKBw3lmLGE6FkS168E5Lhlv5lBrypkuTqcOR+WlZ2YVFw9evdOjwd7ltn+MsdCxRLbXa W4ivxgeMFT6IeyRhQHdltN6bIa3T4NQP1YBCSyrDaVJtfxo/Na9tZxmz+8RnHUbrQsYy PA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3wf784g9tq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 27 Feb 2024 19:04:49 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 41RHn94Z025680 for ; Tue, 27 Feb 2024 19:04:48 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2100.outbound.protection.outlook.com [104.47.55.100]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3wf6we6pn3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 27 Feb 2024 19:04:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m6mcicvC3jR5LpxtFkhRD54J/+h4x1ZhB2nEnA4nkM9Gal1YBac/fhKWxY222G9JtA5C/5PY0w+eE3xgYKG8qKtAU7DRnbMygLsTG/0yJvZNg/kDZMoFfkqCPV9bbRJuX7BOYaUoH4rJGz+GUvDVFcQvhThi2qg3Rqx0eF6lRDALo1D8Dg1MNIQIoApY0Y2GgoeiOKrbvcuDKq1v8+AnRMvhIkdEONoGjI7tHG7XJz3fkhpqzHOWyIRUps1jLSN8ypo6Lk2k9k+azzS+NCOYXT1l1wkhhzxViD5/MKYO66Nf/7h/LOPe8Bf56BY1LAq77BMKQ/NX2+RI7xKoA9SsVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rGQVMP7zTU2YGgCyfYfr1coJ05uSceReMAWfueqCudE=; b=licF90Ee0Mqvhpk/1hf2d+aQO1iamsxtxEnPBPuAjUkXCl0d0xotYtH+58pPgkqLhtY8SA8uf/+djQExxmeoA7n1ETDKmNJV0O7hwvufeyd35qEAWAU9GEuop/p86GL8e0RzkAjMHP8KgpKMPhCQVvrvfRnliAsfmXKtz8B7dICGaNB2HJQTKicWnEuogOoFUIgnb8F58HqUNvcIZtao8sdpH3fAm4AbTwxQkW9mobmBf1UXsw0fe+1OrxeOpXVWaBtvHFz3M1+vtGz0tnqncVfb04L9fc6Xg3r7YvY8CWdbnUaq4KF47stKe+pU9exCDbfUF3AE0+YiiK/tAGutiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rGQVMP7zTU2YGgCyfYfr1coJ05uSceReMAWfueqCudE=; b=kzmgtJQnjYxQAzgqWulANsrXXGUXWnDE0jnItfoxV0yCXt6MBu4Q2ncj1JwuP3lugroithtAyCsu9749I96U7QHNp/WjQnQl9HSUFkVciUcwewlYF6ioJWFw+5BqdyvoI6ChJSkLz3/7rzAgzXUQC06XhFUo9ewqcI5ikm28QsA= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by PH7PR10MB6625.namprd10.prod.outlook.com (2603:10b6:510:208::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.39; Tue, 27 Feb 2024 19:04:44 +0000 Received: from MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::8aee:c094:84e2:9401]) by MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::8aee:c094:84e2:9401%4]) with mapi id 15.20.7316.037; Tue, 27 Feb 2024 19:04:44 +0000 From: Cupertino Miranda To: gcc-patches@gcc.gnu.org Cc: jose.marchesi@oracle.com, david.faust@oracle.com, elena.zannoni@oracle.com, indu.bhagat@oracle.com, Cupertino Miranda Subject: [PATCH v2 1/5] btf: fixed type id in BTF_KIND_FUNC struct data. Date: Tue, 27 Feb 2024 19:04:31 +0000 Message-Id: <20240227190435.35750-2-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240227190435.35750-1-cupertino.miranda@oracle.com> References: <20240227190435.35750-1-cupertino.miranda@oracle.com> X-ClientProxiedBy: LO4P265CA0062.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2af::18) To MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB4382:EE_|PH7PR10MB6625:EE_ X-MS-Office365-Filtering-Correlation-Id: 66238b32-6e9d-42cd-e37f-08dc37c6f59b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +zNy25/muMXSTT7tO4snZVv/69vnJd7YCm9blF1dteW/RPHGUKOtBcBSJB5Q1n79z3huH6PNzr+W5a4oeB8t7UifHbHt0rwQrjtgCisFWXT6Acpl06m0ciO59CnlTW0sR1E/L7P1eAtTxji1zpaVkuaD4EqS71/4rv3Awebg4KX5HUUjDWB7wkAvYkaJ0QAPyds7AybAIXSap/oB4AXvIzVtGu+PfKF66hcbhhk8x7vhuNmH51KQSD5ImY2WQNCQqLwsSganBgZ1eovc3Cc0tsklId2T07y7j8KTHb8A5TRnQkyFhYkqY33k88F1d+FtLKGWIBju0KOfd8RLV818RmORBSWqjezZyJXxr6adbWW4FRXt7R4HNO97NIuRY62Zl+f9dL/XgUpJOkL4km+z9t0qh9w8z+ZDj/8uhQWFBhPwzTFraA97zlc2SPWssiqfACNbgUJ79vnu7DCmBz/JKN0sOKlU7mSSdihpBXv34A1fp+A7k55JYK6AOwP86iECsLt0jn00KQZumzAjL7/G2zqtlBxbjDgO0sh7M3VfCysK7dnKD/rcHgrTzs8XrijVoe3NOhkkVCAHfdnmBzojF8d2J6OHuz+FAph/+5AMcMFgOWd++lAR5fsiob/MG7IDmMSa2Y/9xs7f7LKJOQTI6A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR10MB4382.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: maVXPH1xKijYPQkbBx8Cxl6Avyg6Njizfn6PqJ5+5rCA0046Amvwv3swqfxtfRYCuA00hOXRqBPbZ+/RSpg0twF2d277YPQXUaT6MXqjAAzvDN/T/jGDd89IDXBIXBZQTiHo99ItwtKfO7WWPNPPziQdIF/qiws6vd2QGr4C+0WO0P2GmguFQdhp5Yx5wgFgYQdfiXMTOlxyf5HDB7WfU9Sl4Z9vhuFkQXRzBRk0Gh5iIiuTVjIANq9zfBjEy7PFDhFjFsb/7okBc0o7HTyWsVNehoDwp9WbJCqjkOmGKjXqa1GqO7KdowLdi+jxXFMoNgt1pOV8LZuA4ArNBxOVZPKgZ6yrZCNkvIN9ypm3sJrIx354pCvnWXW72Zw3TLHOfgGJX7tRPdI5WGbu4uR/YL5wGiqVb7Yaltrnczy/EONKuo6gZArZMr0WBjd9DA8uIsVcuqKSVNlgy7FLAyieFI/+F6wGCyh3d871TpbRUQx7kWZvOAqw3On8sYnZDPYcNVPXT/anTaO6I94aUR+DgyXzv19snNU3+zhksK2ftYf2I/+UObxbLhchc8apML6ubrkq8MaTGmAa346spoSjgRXE6S9ANZpB5JfcQCO2nBnU8rH9SLjvnxOvjLVz5fDL3qmQ9pi9KVhVxwvlhPpVCRhl55FDLlRmA6PPCr185gSaQ/DITEndj2KPjkksKni+4G1MLzyis/unuG18+J2q9+xUtnC3pwLyj8Y+pxHzGBdfS94rxDhp/EJ2z7pct917ggycuHGwfAbw9phYWK/MHKcx4RPSYlyyNsmAtBMTEzGhkQDOsaWpMZjXbTrO1bFMZxiaYfXnvXMhNzdSIo/ljvG4/9xuxsVXoBBOSco1Q5z+hWgcUxLHjdgjy5iJt3hsaNX2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UcZSWczNAdy5giyiJlSG0pruatwKXVc5CqzCrlGiQGbWH5B1QPoMBscmo4LALYgRdciwy0ncX4673wX5qC5tzLIVOLINtXtg3bH5uO7iS1eI79LpzUWPLtIpX2AWWM2RVY/+jylrgsC1du4n46YTPEZJjV5Ni2v8Xz3Itru3OKTn4zB/1fa69700pDCeHF3S6GZEUKAv0KS21NREGyGUAQtoWuPOenUKFbffgO3m2fxyYHvdGi73dOyYxVDV6bMBi6yPpmesgU4MzM+/ndwCYILJrs8HayUi97MeWzE+flFuM3b5LTXCQg7/aYh++Oi/iNoRj8gzQ8X/PCCE/rHSkfxqZ5RSIElPzapPZg7XqSzwWNAz8VtC+jU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66238b32-6e9d-42cd-e37f-08dc37c6f59b X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 19:04:44.5076 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: T+uMX3L45qz+Sdp4ArJcrGXjN1oW01vuwlS9kSAI+3tngeDGoewu59so9Hztt3RH/RZoFcOGRo1m5/+zaa6ohZyu5HyulOVYzZFxgEHbWNk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6625 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-27_06,2024-02-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402270148 X-Proofpoint-GUID: lU9sH-N9BeKTR8qZueW4SVLbibFRNRje X-Proofpoint-ORIG-GUID: lU9sH-N9BeKTR8qZueW4SVLbibFRNRje X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org This patch correct the aditition of +1 on the type id, which originally was done in the wrong location and leaded to func_sts->dtd_type for BTF_KIND_FUNCS struct data to contain the type id of the previous entry. gcc/ChangeLog: * btfout.cc (btf_collect_dataset): Corrected BTF type id. --- gcc/btfout.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/btfout.cc b/gcc/btfout.cc index dcf751f8fe0d..7e114e224449 100644 --- a/gcc/btfout.cc +++ b/gcc/btfout.cc @@ -457,7 +457,8 @@ btf_collect_datasec (ctf_container_ref ctfc) func_dtd->dtd_data.ctti_type = dtd->dtd_type; func_dtd->linkage = dtd->linkage; func_dtd->dtd_name = dtd->dtd_name; - func_dtd->dtd_type = num_types_added + num_types_created; + /* +1 for the sentinel type not in the types map. */ + func_dtd->dtd_type = num_types_added + num_types_created + 1; /* Only the BTF_KIND_FUNC type actually references the name. The BTF_KIND_FUNC_PROTO is always anonymous. */ @@ -480,8 +481,7 @@ btf_collect_datasec (ctf_container_ref ctfc) struct btf_var_secinfo info; - /* +1 for the sentinel type not in the types map. */ - info.type = func_dtd->dtd_type + 1; + info.type = func_dtd->dtd_type; /* Both zero at compile time. */ info.size = 0;