From patchwork Tue Dec 19 20:54:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Mezentsev X-Patchwork-Id: 181258 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2220782dyi; Tue, 19 Dec 2023 12:55:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAGIl/GSvUEE/Hw5Q2/ICGAOj75kBDttD8mmXxocWBpXSz5Ih7tu96ZGxqkMlfa7cAcurF X-Received: by 2002:ac5:c854:0:b0:4b6:c0cd:a04e with SMTP id g20-20020ac5c854000000b004b6c0cda04emr2365617vkm.22.1703019332402; Tue, 19 Dec 2023 12:55:32 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1703019332; cv=pass; d=google.com; s=arc-20160816; b=svmnbmS812Db0f/ice3biGJ+IA2xuOoAwzbBY+HfoQQY8o7ZhZsmX8uvJ3DeDWn1YR ppLUfkbfJebSs1wc1oldEDelfSoaIAr3T8/9+P83OCJyUYl49fnOaU/+2OqoRFoug4UB oJM6X6HL02j/oa83B0pf8eS0nUzNzB7nAbHoAbIf76PiVlMgbF8zUkAyissTWCNE9KQO 6NStVZq8fhHgS8eCq7oRm1gb71gEBEJTIfIADVykU6HXyIokUEbVV1AZa70sFVpPfn3x qTmHq1PYbdrJNbdF6EhFxlneqfSacUPzyStQHPZOYVcMP0ZqFr+/zRv/qcx0KlMg1gIW tSRA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:in-reply-to:from :to:content-language:references:subject:user-agent:date:message-id :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=pJ+A82m6DCa2oSwiGugqXa/vMHEoGnOf1owsqmhvvxI=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=EBPd0Ys95oPBKafjyfGBOFbOMVF8/uzV4YCBmFn9aADdEjXw4jcRgTk0QgI8zV6yKS yQhM9uV1EA+7hxn+JC05ixpyZ8xRfS8OeygqugGB3E4DLO5GmitdB1do2yeS+Iy6Y3tP DMbT8dN/nVQfefEvNtfllARf2hqkvu15nYw7sv7JCdfj8C7NSnWg4Ai3WnXmNNPgHsb8 4tloUjwOLderdbOJKARfe3iPLWFKoJLGUomabg2pmlaTntUHWt+B3ifPEZMrSvaSNXrn Hvx/QeZiye8gzidmURnE23nK3HvXIMUiILrK9LRvVlVTOyNmqEUsX+f5Scaxr+xi0r5i EFpg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=VvYMh54U; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=YIWO40Ox; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id fc13-20020a05622a488d00b004236e29618bsi28847919qtb.323.2023.12.19.12.55.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 12:55:32 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=VvYMh54U; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=YIWO40Ox; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 04CE8385DC1A for ; Tue, 19 Dec 2023 20:55:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id CCDBB3858439 for ; Tue, 19 Dec 2023 20:54:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CCDBB3858439 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 CCDBB3858439 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1703019293; cv=pass; b=ZiJaQH5GaewwuTpYMHgaD2YHbFtISx/5dugVwrpwML1VQ0A8lw1UQeU/NIYcdSg3+/+MQ9Ou9Erc8XP6rt7SdjTXuoxcvDte0NHbxE/rgI9+cU+Tol78oJBfTzuyfPM0GI8VvA5IDpcrOybbGWNCCdNe25MkLo5DC1zOB6V3+sY= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1703019293; c=relaxed/simple; bh=2LPvSGPfNYpDo0rnd4plUrn8HNMI0FAbXgetkPBsXH4=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=MZQxvPN5JIlWYhi6/cES/GnZ12uiZEXt+V7nyisGtRPayZOVGeyY1hCClmWq9BaHUJZcHqwpWdcya+x7l564xD4ucYwZis42ZDmwQGtdhNiWdn9xOZvdiPr1hucItUBdIFaNn3NAYvjoDTevI2vWfcE4hhVUZw380kdg3LgKXMo= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BJIoYe5000910 for ; Tue, 19 Dec 2023 20:54:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : message-id : date : subject : references : to : from : in-reply-to : mime-version; s=corp-2023-11-20; bh=pJ+A82m6DCa2oSwiGugqXa/vMHEoGnOf1owsqmhvvxI=; b=VvYMh54U2KYkyLqwg2RAuvCfgSAO03I7afvjBkrGOr5/6/SeNRjTwjS1EPybyJ7puBdr GIYoCAhdpXS1uTKPI1rRB+mLlKaUmcnUJalBPoh0r9S/uoCCjWQpJvaG+GQ+89s6ZsS9 JxorlqVNY5D5lOrU9/w7jhouT7+6RZ7jmH0ry5Cgdu6CgyfVdSjPQXGQOuFNie5yIMRk Kstf6qZSPh+8pi6V9Fz5bphsGnkQY/vLbE6XJpX6RD3355gCt6zE2CEWsiXViHCWwX61 ic++EY7PpjfaphtEkjKGeVb2Zl9Mvvp0thEqjVL2Cr/pCPfHyHY6Mww6shv+2/0DIDCV cg== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3v12g2exr9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Dec 2023 20:54:44 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3BJKFW8E028240 for ; Tue, 19 Dec 2023 20:54:42 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2040.outbound.protection.outlook.com [104.47.57.40]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3v12bdgxw8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Dec 2023 20:54:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UiC0muqb73JBonh28rSLkuLoqQAG0v4G6W//INEOc/v9T3q6Q60Acuu4Gohcf+ZzurkG7W6+Y2aayonoxylRhysxmdRX6txw3Q8oQg7gKaMK1HmW7e67zvP7RkQLU0M4BZESOuOqW45FZDrFssRBPV6iXsk9Gb6+D+ljPWrHlCz2k9p14OUFvVV1hmCTR2mqXT3YcWu3kRZC7kql0Ye/CDJChnGSr7dwpBHGhgQTyzKLGez5zNm4SFNNq+E8hsd0F3sVYZ2x05JMUz+2fsZ+EaDmGNZUhU1XwweAQncHMJ6i2BgALDpkVSwusthkW/AZdYwySsPRl1NojIR/Gg+8DQ== 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=pJ+A82m6DCa2oSwiGugqXa/vMHEoGnOf1owsqmhvvxI=; b=Ulnx0ZN2Zc6hIuHKtC9MZKXLg/Jjhcfw+7NKPsQI98q7skmZFqxKRwpbF+4J76N5rmu1QrrctlZhqbcl4bRgPOXZdxvGhVf6WW8EZ2bMIaVituQLhki0OzoKadYfwvxe4Ck8+tiofRhUd1I6Q08qethqn7PKU6ioZI0CK8D5ZiCnRJUMZmxx3C767FBLXbvxWjq04kF6sw3v+jtCbG0xooRUldE5mGPP9/zUFIc8MDc+fYPwW25atpac8QwTAZFMNDK9qfd7DYhTCVNrc4s9HqNKvTptMEOQfUo4PfMaFACKDYs4auBv10PfX87YQjeXpmiY10u++eUgrazTXwejww== 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=pJ+A82m6DCa2oSwiGugqXa/vMHEoGnOf1owsqmhvvxI=; b=YIWO40Oxsi3nXnrApeeMuJ6dgZl/E434CurN3ONu9rkPe9XBQQ8VeuvHBEIAgUS2FNxg7yLHl/mzaxCualcCiV5t7I3yjLoe2MXNcO7JbCsdaRNis1kTS+tonEGzf84qRK5bxAOjwoKdMIWXO9HW3dkFf4BvyNtIVQUWVgFYE4c= Received: from SA2PR10MB4636.namprd10.prod.outlook.com (2603:10b6:806:11e::10) by DS0PR10MB7509.namprd10.prod.outlook.com (2603:10b6:8:162::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.18; Tue, 19 Dec 2023 20:54:38 +0000 Received: from SA2PR10MB4636.namprd10.prod.outlook.com ([fe80::412c:783e:a135:f0d7]) by SA2PR10MB4636.namprd10.prod.outlook.com ([fe80::412c:783e:a135:f0d7%4]) with mapi id 15.20.7091.034; Tue, 19 Dec 2023 20:54:38 +0000 Message-ID: <42a43f0f-07a9-08fe-a0e9-02eb41398501@oracle.com> Date: Tue, 19 Dec 2023 12:54:34 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Fwd: [PATCH] gprofng: a new GNU profiler References: <20231214012301.2193148-1-vladimir.mezentsev@oracle.com> Content-Language: en-US To: gcc-patches@gcc.gnu.org From: Vladimir Mezentsev In-Reply-To: <20231214012301.2193148-1-vladimir.mezentsev@oracle.com> X-Forwarded-Message-Id: <20231214012301.2193148-1-vladimir.mezentsev@oracle.com> X-ClientProxiedBy: SJ0PR03CA0052.namprd03.prod.outlook.com (2603:10b6:a03:33e::27) To SA2PR10MB4636.namprd10.prod.outlook.com (2603:10b6:806:11e::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PR10MB4636:EE_|DS0PR10MB7509:EE_ X-MS-Office365-Filtering-Correlation-Id: 021111c7-08b6-44fc-652e-08dc00d4b6cd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2Jut4zE1InXusRs7b6L3EQd+bj9chOAzSQmDyMMmJQogwhwBG5kLTxDhhKFkwMaxoRbhYz9kL4U5Drh/7e7KqUCo4hLl3Vyg/OESxndI+riTppvcaPBbPj0t6o983InjavniI9+dz652aZ9FlsomN0nmsufu8eiuy7XG+oNg7WCRpvvkXNGJpkUwe2C03PnD06sE0aeyAYs6bKkyRNEt/3yU28WN2ad4pWYoqSguTv9QuJPAIZCAzj7dq2MWJN+PLmzV1g46IpTHDG+pJ55/op0pNuB2byOUqQ24jZm8BlAX7jc1i8j5GPbL+c3B0dBwJfrP0bd0R1C3MH/ydHKm3tRBdgrwV1gJfdngaluOTyHMool9X3EQPnuMXEsxihvi3bvw76Zha46gWWQq+ZVx5q7LLrLxl93BersJ6qjCbLNx+5X/l9QfNdZI+EDQ1ZYlhCpxsKyRxJ/idkMYut9mgm23cLUZpLkWBlXIbTAM22zSFR5HC1hphxUkXSi6WPIMWM961af/9qx6PWLa/DuMja6vEV8umRC2dW2q8jvDH4+jjZV70DjNXNA3NJ3sJQTg5wZe7BU/xXGD1b3OOpkfbNvAYZmkPr3YXjq8ohXsCFySD8Sa3O1AwWZHAtMZWjw/qXCIDrBu3BPNXhXIRBn21SO+A3P+9Zfr2dKxVRKNDw9ImOv7k0NpRcFesGZrNV+0U+sUXmCMEyHMNjk1cGyG0A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4636.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(366004)(346002)(396003)(39860400002)(136003)(230173577357003)(230922051799003)(230273577357003)(186009)(1800799012)(64100799003)(451199024)(83380400001)(6916009)(2616005)(41300700001)(38100700002)(44832011)(30864003)(316002)(478600001)(66946007)(66476007)(66556008)(31686004)(6486002)(8936002)(8676002)(2906002)(31696002)(86362001)(6666004)(6506007)(5660300002)(6512007)(33964004)(36756003)(2004002)(43740500002)(45980500001)(559001)(579004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?dWzqmsK3F8n52JxX7EcMec4yukxr?= =?utf-8?q?9H1T/Y1PtYUDukymM7pzKb2LyvR4vvmNquzx3snQpyRci+ve70dojw08ezfkECGZW?= =?utf-8?q?dqbQ+n/uegpFyF1Be55kx94UTfviS+DaQLzQZdL9UVhnzWlTJCgbtrCAUVdPREqgP?= =?utf-8?q?pobRuERvLowMLozsYjG4uOGXpB+OKZzWf1VgJU8mr5PpWzYNZm68TDmBA9tKwZq6c?= =?utf-8?q?VC/yWHYXRPMWT/ZTih/+hT3yUc9XzWBLynqWL/M3W1tXUVyWogX4cezeWee4qP1pT?= =?utf-8?q?temwP0yQlNtFQB2GR/NvptihDyzv0J7T3u/KEqxoRXLZjbRHuLVqCkgXSIGQBAull?= =?utf-8?q?WSN8stOH5Gl9RX8QdjUr52pEgF07VvOZWL3HPfXrXXEYoMt9k9ESWRHzQM7AjGC2q?= =?utf-8?q?BLImitMgxpVu7X2TfXojWeksIZLkF9snkOrGhlX/RblK9qZofoA7ft9PRalKa8BF9?= =?utf-8?q?d+m922uKHwrHLdKQcFbTW9FBGE3i2oWJTOR6eM3tX+Txnw/PTikRa06fSuBT8uwLX?= =?utf-8?q?WieTNm7fb9PJvax3qw3NLz+jMT+i8xeScXM+1CC6DO29Dhw9IvOhfIfjhSMyZ60C4?= =?utf-8?q?65Zq9ioV725GN9lSMiKoUSqYKAXQuqbl1wNlJLhKDhmK5MieYNLNS/a9v6NXQjJ6c?= =?utf-8?q?3aSsI2jz+dc+9D8CBztPfgB8UVqJoryNwxkR5sBwM9lbIktTfZs5Qp957lt7QWtbc?= =?utf-8?q?eYnZ/n1AekyXz8mVerw68LJhVXXBpj04mHgzqYTdOwLe+y/AYG/6omufTmbqL3wrm?= =?utf-8?q?ZuNn0fv610pUJJDpS72N78FnRGCa+jy+UM6Y+ZfdHJLCVhdVFZJKYI9BYWIXIcrtZ?= =?utf-8?q?o8tF5S/yoBbzkbas3vrX2quwaJvyuXA42/L27HuaTyXcX9Qh2qCGQp531EL17vO/z?= =?utf-8?q?4pCBsS9zqsCMWHUJYbPU2DN43txUSwV7u/07Na1nWpyBnmXnXYYtC7zrc6yJZyOKd?= =?utf-8?q?DZ9+Xf+hxwQefADcfrrwcdBh2GVDU8ajpVllHeX+LnPCb+5WFsetlZn74N90cOLVk?= =?utf-8?q?lgYhnVGEDycTBZ+UT81ShKUleXezH+QKh53YuOs+8IZr5ZzJeJ3THCdsRwQxnq0oC?= =?utf-8?q?ZxwTQ/vxa14ZfWzSV2eZTEI4L/dBvjKsa+TlZ+wtmlllrD1Lzb0aqzV3Zu4k31+Py?= =?utf-8?q?HtIrCOYo8dJH1skhCEtfSVmRvdGucaCiD3M7DE0R3guG0hgHbZZR7C0xEgXQ8PfNu?= =?utf-8?q?BllxdHUYMY9D/TCl0EQlpI7vdGSGirt/IQMu9PSfuH8Z/UO805Ian3vDo/+/P3Z43?= =?utf-8?q?ftoQbrwC1Iunptv0GV6XTepp+fCDT+4AXeiy7PJjv/KUejsODJPrK8T57kBnxgJjs?= =?utf-8?q?5kOINIXSi7/GScDa0mWetwNcjUSm2l18xBW/MzyLKWueRT2Sh/phzxReXXZk2l/85?= =?utf-8?q?Lvh/x0W82tym4IsSEUPI+FtvnHqIO9uueyr6wnazIO8GG0bTuPH+9+KeDWsXcYYC3?= =?utf-8?q?boUFNDQ+DzOt4KHFO7LQn0kT6UQQtgkOXdk3lYQciIMyXcAwc4MidCv0CbBO1VTDr?= =?utf-8?q?LxG4xIVF+vdRnp/uVuBCYyulwbvm9lq5uKb1Qb0C6pyVuku+xT1UGvs=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: aJqtLaM6tDThUs9yY8pjdTt4JWIKUPa60XK2fZCUrqHDhV3Bv6j+hd4egQvzQBQNM/cAERmmCDw3+oSoNBtq7ba5DDFPKc+CEIXFGyCnjC4lAEOGmOQRGIfZRo0EF6OA2Rv6eG7uV+MBgdhqMAFBqN8g4v2cFFFIt/QhgJhSII6/b7vm2sbaJZd2Kb5GITdHrtyHPsDWiQ21TguWT3esiLTnBVtXjUNUV4Y7DrIIK6VoYx5zm/aHOPpaBqTxW+crEY5/OApkAMz4Bdts20jefS4lxjUgxz/XdZ5UKvfpvR1ddu9OOde1gG7zcXCPnkWK9yp5vPoUgvxVf4CTQf3ljcbdLTvR7nVRcZcmyPETYzUwLNPa713tYgLS5JF+XPzCT56gnI03tpV14vZB5abDzzp4iFlEuZiuGs1JVdYnYf0KXtaA/pF7QKyKt8LlpcQN9WjhGnobp4hwMLTZCacnGKDwdpi9dOaemtNiUn81544q9gtMeM/Ut3lt+TFxwOfSikN9AXmc8mpcLEyEb2Ao+bCXMUeSUb1N0cp/qfJW3PTzAa55GMvR4LjZfq00MrHDCg97knn4C0TIkhOYDNDM85u2Qg0Hvta7kanLtCjvFD4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 021111c7-08b6-44fc-652e-08dc00d4b6cd X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4636.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 20:54:38.2537 (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: CGOBMyhvuY7/xsrA9gYcBrp6edhWUdUsqSEDYDjddg6eNtpXHv22vVnvgUnkb6KU7c0X7y7SI8oWllCLMAVbM1hdrhKoKF0W3KKYMTg1PsQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7509 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-19_12,2023-12-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxscore=0 spamscore=0 adultscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312190154 X-Proofpoint-GUID: ljnqAys0tGidE7X-cGKtRFLQA607Mnps X-Proofpoint-ORIG-GUID: ljnqAys0tGidE7X-cGKtRFLQA607Mnps 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, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785218492497883351 X-GMAIL-MSGID: 1785745199646566001 PING. If the patch is approved, can anyone apply this patch. I don't have permissions for `git push`. Thank you, -Vladimir -------- Forwarded Message -------- Subject: [PATCH] gprofng: a new GNU profiler Date: Wed, 13 Dec 2023 17:23:01 -0800 From: vladimir.mezentsev@oracle.com To: gcc-patches@gcc.gnu.org CC: Vladimir Mezentsev From: Vladimir Mezentsev This is fixes for releases/gcc-13 for 31109 gprofng not built and installed in a combined binutils+gcc build I only cherry-picked 24552056fd5fc677c0d032f54a5cad1c4303d312 and tested my build. ChangeLog: * Makefile.def: Add gprofng module. * configure.ac: Add --enable-gprofng option. * Makefile.in: Regenerate. * configure: Regenerate. include/ChangeLog: * collectorAPI.h: New file. * libcollector.h: New file. * libfcollector.h: New file. --- Makefile.def | 11 + Makefile.in | 497 ++++++++++++++++++++++++++++++++++++++++ configure | 18 ++ configure.ac | 14 ++ include/collectorAPI.h | 73 ++++++ include/libcollector.h | 89 +++++++ include/libfcollector.h | 42 ++++ 7 files changed, 744 insertions(+) create mode 100644 include/collectorAPI.h create mode 100644 include/libcollector.h create mode 100644 include/libfcollector.h diff --git a/Makefile.def b/Makefile.def index 35e994eb77e..9d43b78b51b 100644 --- a/Makefile.def +++ b/Makefile.def @@ -72,6 +72,7 @@ host_modules= { module= isl; lib_path=.libs; bootstrap=true; no_install= true; }; host_modules= { module= gold; bootstrap=true; }; host_modules= { module= gprof; }; +host_modules= { module= gprofng; }; // intl acts on 'host_shared' directly, and does not support --with-pic. host_modules= { module= intl; bootstrap=true; }; host_modules= { module= tcl; @@ -510,6 +511,16 @@ dependencies = { module=all-gprof; on=all-bfd; }; dependencies = { module=all-gprof; on=all-opcodes; }; dependencies = { module=all-gprof; on=all-intl; }; dependencies = { module=all-gprof; on=all-gas; }; + +dependencies = { module=configure-gprofng; on=configure-intl; }; +dependencies = { module=all-gprofng; on=all-libiberty; }; +dependencies = { module=all-gprofng; on=all-bfd; }; +dependencies = { module=all-gprofng; on=all-opcodes; }; +dependencies = { module=all-gprofng; on=all-intl; }; +dependencies = { module=all-gprofng; on=all-gas; }; +dependencies = { module=install-gprofng; on=install-opcodes; }; +dependencies = { module=install-gprofng; on=install-bfd; }; + dependencies = { module=configure-ld; on=configure-intl; }; dependencies = { module=all-ld; on=all-libiberty; }; dependencies = { module=all-ld; on=all-bfd; }; diff --git a/Makefile.in b/Makefile.in index 06a9398e172..2ea8943dc3b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1084,6 +1084,7 @@ configure-host: \ maybe-configure-isl \ maybe-configure-gold \ maybe-configure-gprof \ + maybe-configure-gprofng \ maybe-configure-intl \ maybe-configure-tcl \ maybe-configure-itcl \ @@ -1237,6 +1238,7 @@ all-host: maybe-all-isl all-host: maybe-all-gold @endif gold-no-bootstrap all-host: maybe-all-gprof +all-host: maybe-all-gprofng @if intl-no-bootstrap all-host: maybe-all-intl @endif intl-no-bootstrap @@ -1376,6 +1378,7 @@ info-host: maybe-info-mpc info-host: maybe-info-isl info-host: maybe-info-gold info-host: maybe-info-gprof +info-host: maybe-info-gprofng info-host: maybe-info-intl info-host: maybe-info-tcl info-host: maybe-info-itcl @@ -1466,6 +1469,7 @@ dvi-host: maybe-dvi-mpc dvi-host: maybe-dvi-isl dvi-host: maybe-dvi-gold dvi-host: maybe-dvi-gprof +dvi-host: maybe-dvi-gprofng dvi-host: maybe-dvi-intl dvi-host: maybe-dvi-tcl dvi-host: maybe-dvi-itcl @@ -1556,6 +1560,7 @@ pdf-host: maybe-pdf-mpc pdf-host: maybe-pdf-isl pdf-host: maybe-pdf-gold pdf-host: maybe-pdf-gprof +pdf-host: maybe-pdf-gprofng pdf-host: maybe-pdf-intl pdf-host: maybe-pdf-tcl pdf-host: maybe-pdf-itcl @@ -1646,6 +1651,7 @@ html-host: maybe-html-mpc html-host: maybe-html-isl html-host: maybe-html-gold html-host: maybe-html-gprof +html-host: maybe-html-gprofng html-host: maybe-html-intl html-host: maybe-html-tcl html-host: maybe-html-itcl @@ -1736,6 +1742,7 @@ TAGS-host: maybe-TAGS-mpc TAGS-host: maybe-TAGS-isl TAGS-host: maybe-TAGS-gold TAGS-host: maybe-TAGS-gprof +TAGS-host: maybe-TAGS-gprofng TAGS-host: maybe-TAGS-intl TAGS-host: maybe-TAGS-tcl TAGS-host: maybe-TAGS-itcl @@ -1826,6 +1833,7 @@ install-info-host: maybe-install-info-mpc install-info-host: maybe-install-info-isl install-info-host: maybe-install-info-gold install-info-host: maybe-install-info-gprof +install-info-host: maybe-install-info-gprofng install-info-host: maybe-install-info-intl install-info-host: maybe-install-info-tcl install-info-host: maybe-install-info-itcl @@ -1916,6 +1924,7 @@ install-dvi-host: maybe-install-dvi-mpc install-dvi-host: maybe-install-dvi-isl install-dvi-host: maybe-install-dvi-gold install-dvi-host: maybe-install-dvi-gprof +install-dvi-host: maybe-install-dvi-gprofng install-dvi-host: maybe-install-dvi-intl install-dvi-host: maybe-install-dvi-tcl install-dvi-host: maybe-install-dvi-itcl @@ -2006,6 +2015,7 @@ install-pdf-host: maybe-install-pdf-mpc install-pdf-host: maybe-install-pdf-isl install-pdf-host: maybe-install-pdf-gold install-pdf-host: maybe-install-pdf-gprof +install-pdf-host: maybe-install-pdf-gprofng install-pdf-host: maybe-install-pdf-intl install-pdf-host: maybe-install-pdf-tcl install-pdf-host: maybe-install-pdf-itcl @@ -2096,6 +2106,7 @@ install-html-host: maybe-install-html-mpc install-html-host: maybe-install-html-isl install-html-host: maybe-install-html-gold install-html-host: maybe-install-html-gprof +install-html-host: maybe-install-html-gprofng install-html-host: maybe-install-html-intl install-html-host: maybe-install-html-tcl install-html-host: maybe-install-html-itcl @@ -2186,6 +2197,7 @@ installcheck-host: maybe-installcheck-mpc installcheck-host: maybe-installcheck-isl installcheck-host: maybe-installcheck-gold installcheck-host: maybe-installcheck-gprof +installcheck-host: maybe-installcheck-gprofng installcheck-host: maybe-installcheck-intl installcheck-host: maybe-installcheck-tcl installcheck-host: maybe-installcheck-itcl @@ -2276,6 +2288,7 @@ mostlyclean-host: maybe-mostlyclean-mpc mostlyclean-host: maybe-mostlyclean-isl mostlyclean-host: maybe-mostlyclean-gold mostlyclean-host: maybe-mostlyclean-gprof +mostlyclean-host: maybe-mostlyclean-gprofng mostlyclean-host: maybe-mostlyclean-intl mostlyclean-host: maybe-mostlyclean-tcl mostlyclean-host: maybe-mostlyclean-itcl @@ -2366,6 +2379,7 @@ clean-host: maybe-clean-mpc clean-host: maybe-clean-isl clean-host: maybe-clean-gold clean-host: maybe-clean-gprof +clean-host: maybe-clean-gprofng clean-host: maybe-clean-intl clean-host: maybe-clean-tcl clean-host: maybe-clean-itcl @@ -2456,6 +2470,7 @@ distclean-host: maybe-distclean-mpc distclean-host: maybe-distclean-isl distclean-host: maybe-distclean-gold distclean-host: maybe-distclean-gprof +distclean-host: maybe-distclean-gprofng distclean-host: maybe-distclean-intl distclean-host: maybe-distclean-tcl distclean-host: maybe-distclean-itcl @@ -2546,6 +2561,7 @@ maintainer-clean-host: maybe-maintainer-clean-mpc maintainer-clean-host: maybe-maintainer-clean-isl maintainer-clean-host: maybe-maintainer-clean-gold maintainer-clean-host: maybe-maintainer-clean-gprof +maintainer-clean-host: maybe-maintainer-clean-gprofng maintainer-clean-host: maybe-maintainer-clean-intl maintainer-clean-host: maybe-maintainer-clean-tcl maintainer-clean-host: maybe-maintainer-clean-itcl @@ -2694,6 +2710,7 @@ check-host: \ maybe-check-isl \ maybe-check-gold \ maybe-check-gprof \ + maybe-check-gprofng \ maybe-check-intl \ maybe-check-tcl \ maybe-check-itcl \ @@ -2831,6 +2848,7 @@ install-host-nogcc: \ maybe-install-isl \ maybe-install-gold \ maybe-install-gprof \ + maybe-install-gprofng \ maybe-install-intl \ maybe-install-tcl \ maybe-install-itcl \ @@ -2886,6 +2904,7 @@ install-host: \ maybe-install-isl \ maybe-install-gold \ maybe-install-gprof \ + maybe-install-gprofng \ maybe-install-intl \ maybe-install-tcl \ maybe-install-itcl \ @@ -2996,6 +3015,7 @@ install-strip-host: \ maybe-install-strip-isl \ maybe-install-strip-gold \ maybe-install-strip-gprof \ + maybe-install-strip-gprofng \ maybe-install-strip-intl \ maybe-install-strip-tcl \ maybe-install-strip-itcl \ @@ -19287,6 +19307,474 @@ maintainer-clean-gprof: +.PHONY: configure-gprofng maybe-configure-gprofng +maybe-configure-gprofng: +@if gcc-bootstrap +configure-gprofng: stage_current +@endif gcc-bootstrap +@if gprofng +maybe-configure-gprofng: configure-gprofng +configure-gprofng: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + test ! -f $(HOST_SUBDIR)/gprofng/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprofng; \ + $(HOST_EXPORTS) \ + echo Configuring in $(HOST_SUBDIR)/gprofng; \ + cd "$(HOST_SUBDIR)/gprofng" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/gprofng/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=gprofng; \ + $(SHELL) \ + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + || exit 1 +@endif gprofng + + + + + +.PHONY: all-gprofng maybe-all-gprofng +maybe-all-gprofng: +@if gcc-bootstrap +all-gprofng: stage_current +@endif gcc-bootstrap +@if gprofng +TARGET-gprofng=all +maybe-all-gprofng: all-gprofng +all-gprofng: configure-gprofng + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ + $(TARGET-gprofng)) +@endif gprofng + + + + +.PHONY: check-gprofng maybe-check-gprofng +maybe-check-gprofng: +@if gprofng +maybe-check-gprofng: check-gprofng + +check-gprofng: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(FLAGS_TO_PASS) check) + +@endif gprofng + +.PHONY: install-gprofng maybe-install-gprofng +maybe-install-gprofng: +@if gprofng +maybe-install-gprofng: install-gprofng + +install-gprofng: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(FLAGS_TO_PASS) install) + +@endif gprofng + +.PHONY: install-strip-gprofng maybe-install-strip-gprofng +maybe-install-strip-gprofng: +@if gprofng +maybe-install-strip-gprofng: install-strip-gprofng + +install-strip-gprofng: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(FLAGS_TO_PASS) install-strip) + +@endif gprofng + +# Other targets (info, dvi, pdf, etc.) + +.PHONY: maybe-info-gprofng info-gprofng +maybe-info-gprofng: +@if gprofng +maybe-info-gprofng: info-gprofng + +info-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + info) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-dvi-gprofng dvi-gprofng +maybe-dvi-gprofng: +@if gprofng +maybe-dvi-gprofng: dvi-gprofng + +dvi-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + dvi) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-pdf-gprofng pdf-gprofng +maybe-pdf-gprofng: +@if gprofng +maybe-pdf-gprofng: pdf-gprofng + +pdf-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing pdf in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + pdf) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-html-gprofng html-gprofng +maybe-html-gprofng: +@if gprofng +maybe-html-gprofng: html-gprofng + +html-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing html in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + html) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-TAGS-gprofng TAGS-gprofng +maybe-TAGS-gprofng: +@if gprofng +maybe-TAGS-gprofng: TAGS-gprofng + +TAGS-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + TAGS) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-install-info-gprofng install-info-gprofng +maybe-install-info-gprofng: +@if gprofng +maybe-install-info-gprofng: install-info-gprofng + +install-info-gprofng: \ + configure-gprofng \ + info-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-info) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-install-dvi-gprofng install-dvi-gprofng +maybe-install-dvi-gprofng: +@if gprofng +maybe-install-dvi-gprofng: install-dvi-gprofng + +install-dvi-gprofng: \ + configure-gprofng \ + dvi-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-dvi in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-dvi) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-install-pdf-gprofng install-pdf-gprofng +maybe-install-pdf-gprofng: +@if gprofng +maybe-install-pdf-gprofng: install-pdf-gprofng + +install-pdf-gprofng: \ + configure-gprofng \ + pdf-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-pdf in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-pdf) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-install-html-gprofng install-html-gprofng +maybe-install-html-gprofng: +@if gprofng +maybe-install-html-gprofng: install-html-gprofng + +install-html-gprofng: \ + configure-gprofng \ + html-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-html in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-html) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-installcheck-gprofng installcheck-gprofng +maybe-installcheck-gprofng: +@if gprofng +maybe-installcheck-gprofng: installcheck-gprofng + +installcheck-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + installcheck) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-mostlyclean-gprofng mostlyclean-gprofng +maybe-mostlyclean-gprofng: +@if gprofng +maybe-mostlyclean-gprofng: mostlyclean-gprofng + +mostlyclean-gprofng: + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + mostlyclean) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-clean-gprofng clean-gprofng +maybe-clean-gprofng: +@if gprofng +maybe-clean-gprofng: clean-gprofng + +clean-gprofng: + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + clean) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-distclean-gprofng distclean-gprofng +maybe-distclean-gprofng: +@if gprofng +maybe-distclean-gprofng: distclean-gprofng + +distclean-gprofng: + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + distclean) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-maintainer-clean-gprofng maintainer-clean-gprofng +maybe-maintainer-clean-gprofng: +@if gprofng +maybe-maintainer-clean-gprofng: maintainer-clean-gprofng + +maintainer-clean-gprofng: + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + maintainer-clean) \ + || exit 1 + +@endif gprofng + + + .PHONY: configure-intl maybe-configure-intl maybe-configure-intl: @if gcc-bootstrap @@ -66049,6 +66537,8 @@ all-stagetrain-gas: maybe-all-stagetrain-intl all-stagefeedback-gas: maybe-all-stagefeedback-intl all-stageautoprofile-gas: maybe-all-stageautoprofile-intl all-stageautofeedback-gas: maybe-all-stageautofeedback-intl +install-gprofng: maybe-install-opcodes +install-gprofng: maybe-install-bfd configure-ld: maybe-configure-intl configure-stage1-ld: maybe-configure-stage1-intl configure-stage2-ld: maybe-configure-stage2-intl @@ -66489,6 +66979,7 @@ configure-gdb: stage_last configure-gdbserver: stage_last configure-gdbsupport: stage_last configure-gprof: stage_last +configure-gprofng: stage_last configure-sid: stage_last configure-sim: stage_last configure-fastjar: stage_last @@ -66523,6 +67014,12 @@ all-gprof: maybe-all-bfd all-gprof: maybe-all-opcodes all-gprof: maybe-all-intl all-gprof: maybe-all-gas +configure-gprofng: maybe-configure-intl +all-gprofng: maybe-all-libiberty +all-gprofng: maybe-all-bfd +all-gprofng: maybe-all-opcodes +all-gprofng: maybe-all-intl +all-gprofng: maybe-all-gas all-sid: maybe-all-libiberty all-sid: maybe-all-bfd all-sid: maybe-all-opcodes diff --git a/configure b/configure index 117a7ef23f2..b564accf3e1 100755 --- a/configure +++ b/configure @@ -800,6 +800,7 @@ enable_offload_targets enable_offload_defaulted enable_gold enable_ld +enable_gprofng enable_compressed_debug_sections enable_libquadmath enable_libquadmath_support @@ -1536,6 +1537,7 @@ Optional Features: --enable-gold[=ARG] build gold [ARG={default,yes,no}] --enable-ld[=ARG] build ld [ARG={default,yes,no}] + --enable-gprofng[=ARG] build gprofng [ARG={yes,no}] --enable-compressed-debug-sections={all,gas,gold,ld,none} Enable compressed debug sections for gas, gold or ld by default @@ -3110,6 +3112,22 @@ $as_echo "$as_me: WARNING: neither ld nor gold are enabled" >&2;} ;; esac +# Check whether --enable-gprofng was given. +if test "${enable_gprofng+set}" = set; then : + enableval=$enable_gprofng; enable_gprofng=$enableval +else + enable_gprofng=yes +fi + +if test "$enable_gprofng" = "yes"; then + case "${target}" in + x86_64-*-linux* | i?86-*-linux* | aarch64-*-linux*) + configdirs="$configdirs gprofng" + ;; + esac +fi + + # PR gas/19109 # Decide the default method for compressing debug sections. # Provide a configure time option to override our default. diff --git a/configure.ac b/configure.ac index b3e9bbd2aa5..f1c280680fc 100644 --- a/configure.ac +++ b/configure.ac @@ -401,6 +401,20 @@ case "${ENABLE_LD}" in ;; esac +AC_ARG_ENABLE(gprofng, +[AS_HELP_STRING([[--enable-gprofng[=ARG]]], + [build gprofng @<:@ARG={yes,no}@:>@])], +enable_gprofng=$enableval, +enable_gprofng=yes) +if test "$enable_gprofng" = "yes"; then + case "${target}" in + x86_64-*-linux* | i?86-*-linux* | aarch64-*-linux*) + configdirs="$configdirs gprofng" + ;; + esac +fi + + # PR gas/19109 # Decide the default method for compressing debug sections. # Provide a configure time option to override our default. diff --git a/include/collectorAPI.h b/include/collectorAPI.h new file mode 100644 index 00000000000..010074a271f --- /dev/null +++ b/include/collectorAPI.h @@ -0,0 +1,73 @@ +/* Copyright (C) 2021-2023 Free Software Foundation, Inc. + Contributed by Oracle. + + This file is part of GNU Binutils. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef _COLLECTORAPI_H +#define _COLLECTORAPI_H + +/* This file contains function prototypes for the user-callable API + routines in libcollector. */ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + /* Routine to record a sample in the experiment. */ + extern void collector_sample (const char *name); + + /* Routine to suspend data collection during an experiment. */ + extern void collector_pause (void); + + /* Routine to resume data collection during an experiment. */ + extern void collector_resume (void); + + /* Routine to suspend per-thread data collection during an experiment. */ + extern void collector_thread_pause (pthread_t tid); + + /* Routine to resume per-thread data collection during an experiment. */ + extern void collector_thread_resume (pthread_t tid); + + /* Routine to close the experiment, and stop all data collection. */ + extern void collector_terminate_expt (void); + + typedef struct + { + unsigned int offset; + unsigned int lineno; + } Lineno; + + /* Routines to let libcollector know about dynamically loaded functions. */ + extern void collector_func_load (const char *name, const char *alias, + const char *sourcename, void *vaddr, + int size, int lntsize, Lineno *lntable); + + extern void collector_func_unload (void *vaddr); + +#ifdef NEED_COLLECTOR_MODULE + extern void collector_module_load (const char *modulename, void *vaddr); + extern void collector_module_unload (void *vaddr); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _COLLECTORAPI_H */ diff --git a/include/libcollector.h b/include/libcollector.h new file mode 100644 index 00000000000..e1c2a440b2a --- /dev/null +++ b/include/libcollector.h @@ -0,0 +1,89 @@ +/* Copyright (C) 2021-2023 Free Software Foundation, Inc. + Contributed by Oracle. + + This file is part of GNU Binutils. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef _LIBCOLLECTOR_H +#define _LIBCOLLECTOR_H + +typedef struct +{ + unsigned int offset; + unsigned int lineno; +} Lineno; + +#ifdef __cplusplus +extern "C" +{ +#endif + + /* This file contains function prototypes for the user-callable API + routines in libcollector for C and C++ codes. */ + + /* Routine to record a sample in the experiment. */ + void collector_sample (char *name); + + /* Routine to suspend data collection during an experiment. */ + void collector_pause (void); + + /* Routine to resume data collection during an experiment. */ + void collector_resume (void); + + /* Routine to suspend per-thread data collection during an experiment. */ + void collector_thread_pause (unsigned int tid); + + /* Routine to resume per-thread data collection during an experiment. */ + void collector_thread_resume (unsigned int tid); + + /* Routine to close the experiment, and stop all data collection. */ + void collector_terminate_expt (void); + + /* Routines to let libcollector know about a dynamically loaded function. */ + void collector_func_load (char *name, char *alias, char *sourcename, + void *vaddr, int size, int lntsize, Lineno *lntable); + void collector_func_unload (void *vaddr); + + /* Define the weak symbols for the API. */ + void collector_sample () __attribute__ ((weak)); + void collector_pause () __attribute__ ((weak)); + void collector_resume () __attribute__ ((weak)); + void collector_thread_pause () __attribute__ ((weak)); + void collector_thread_resume () __attribute__ ((weak)); + void collector_terminate_expt () __attribute__ ((weak)); + void collector_func_load () __attribute__ ((weak)); + void collector_func_unload () __attribute__ ((weak)); + +#ifdef __cplusplus +} +#endif + +/* Define the macros that actually get inserted in the caller's code. */ +#define collector_sample(x) (collector_sample ? collector_sample(x), 0 : 0) +#define collector_pause() (collector_pause ? collector_pause(), 0 : 0) +#define collector_resume() (collector_resume ? collector_resume(),0 : 0 +#define collector_thread_pause(tid) \ + (collector_thread_pause ? collector_thread_pause(tid), 0 : 0) +#define collector_thread_resume(tid) \ + (collector_thread_resume ? collector_thread_resume(tid), 0 : 0) +#define collector_terminate_expt() \ + (collector_terminate_expt ? collector_terminate_expt(), 0 : 0) +#define collector_func_load(x0,x1,x2,x3,x4,x5,x6) \ + collector_func_load ? collector_func_load(x0,x1,x2,x3,x4,x5,x6), 0 : 0) +#define collector_func_unload(x) \ + (collector_func_unload ? collector_func_unload(x), 0 : 0) +#endif /* _LIBCOLLECTOR_H */ diff --git a/include/libfcollector.h b/include/libfcollector.h new file mode 100644 index 00000000000..1dc6b144e6c --- /dev/null +++ b/include/libfcollector.h @@ -0,0 +1,42 @@ +! Copyright (C) 2021-2023 Free Software Foundation, Inc. +! Contributed by Oracle. +! +! This file is part of GNU Binutils. +! +! This program is free software; you can redistribute it and/or modify +! it under the terms of the GNU General Public License as published by +! the Free Software Foundation; either version 3, or (at your option) +! any later version. +! +! This program is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU General Public License for more details. +! +! You should have received a copy of the GNU General Public License +! along with this program; if not, write to the Free Software +! Foundation, 51 Franklin Street - Fifth Floor, Boston, +! MA 02110-1301, USA. +! +! Developer Sampling Collector interface include file + + interface + + ! Routine to record a sample in the experiment. + subroutine collector_sample(name) + character(len=*), intent(in) :: name + end subroutine + + ! Routine to suspend data collection during an experiment. + subroutine collector_pause() + end subroutine + + ! Routine to resume data collection during an experiment. + subroutine collector_resume() + end subroutine + + ! Routine to stop all data collection and close the experiment. + subroutine collector_terminate_expt() + end subroutine + + end interface