From patchwork Wed Jun 19 15:31:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Zissulescu-Ianculescu X-Patchwork-Id: 92451 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 4C27F3885C27 for ; Wed, 19 Jun 2024 15:32:28 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 82E533886C4A for ; Wed, 19 Jun 2024 15:32:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 82E533886C4A Authentication-Results: sourceware.org; dmarc=pass (p=reject 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 82E533886C4A 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=1718811142; cv=pass; b=LQV44790Xfrw0hL4PUlXWGw6IOxY5+Kr7LeTsfzL5uyJ+oFSF22yWrzH3RK7CGTsMUkIxA4C0Pu2sGYGc0znu2ydFoHmVEkCchSsvFuFQVJtLbvzZzy1OcAH2QaOrOGTPxTH1UVPyRgs0qeKtEr65LhmW0197/Z6fEB1isDrm84= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1718811142; c=relaxed/simple; bh=dVLYD/QhrWgIgyjeByRWby7R0G0i+kHXusxUiHv+q+4=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=kUVKPVrWXIip1m8ReT0uVFnBVkP7f6kyMlSRFeP/+924XmUNPSF5V54ktN3WVBiXChCfFlrbGjxIEFh9Q4nUmTV/+/NJBFtq2d3FHaSDdr1mFsN/y/55TrqqU4JFQrx1BVVqigGol63KrmBtb3bEh87hk0y0GYIazE8Zz6v0rJg= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45JFBVXY014188 for ; Wed, 19 Jun 2024 15:32:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:content-transfer-encoding :content-type:mime-version; s=corp-2023-11-20; bh=SaaB82HaqngDbF zCiau1/5bwD9FX9g1O9QfociUmHE8=; b=KfeSmEylYfs1bXdkO5yD0IJ89YNif7 NARRIsq6Wyv7mgRX/AlsrPCZSMIiGlboeBo2S++FUwE4DRyDaggRPsDqQ0AX33Gx 9e6HsqXF0wbw2tmntfYCikf2l2nxau3/V26Dbea5Up5+y4ZvEhYXkGGsNvpR6j3f IRsGk8n+/3ysJgTDE+I63XKl8GB3exiik8ig81LcRtL6fmTt9juxxlrCNWbJeoan Gqd4LiL49GhjCA1/APvv96amNlXtSpNH8k/JqkPWFbk0pZaU6m0Z7CxI4471RRuV EGLbG37k1h6zEa7/26IS2tJZfStdEuhXC9mvF4ITKw+/GGw+/+3wp7Rg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3yujc09jsa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 19 Jun 2024 15:32:18 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45JErRuQ034503 for ; Wed, 19 Jun 2024 15:32:16 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2049.outbound.protection.outlook.com [104.47.55.49]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ys1dg066t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 19 Jun 2024 15:32:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VvVcrPfco08muhCZiV2L9t3ZTEdwW6My4QkyHv4bOle0enXNUEs6hujghDNkowRhsv8xwC9SyL+wABrh5sXTRJ1+zbZFlfTpUacLSZt2fLrBUY0bzwEf6yUoQipumaQ7JrIpFmyItNcRYX4N7wa1rcRMr/9r6gCU/U914KhkbcAgmQbJRR4rUrsI72Q5hK+9/Ipdqlq6+TslUyjPLOeeU9M15pem9AS3Sn5e1V5qBwbo6eD/AVPenLtD2NRTa2JxnRKb9CfGpuGYqGBoWKamvebL+XaWR29WEF6UYkardnFNg9VwUCcoBEWas4YzEohIXNjixZUktxNXDWP4AoezGA== 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=SaaB82HaqngDbFzCiau1/5bwD9FX9g1O9QfociUmHE8=; b=XvR1rjE+yftVfbPPFWFf8qD3vjtU6bggQSM4frNRFr4QNagGS8NHv9+pPIq/B+WEGO7Kr+rJclp4b1L8tI5SX2F4XxROXUUSgkyctrMx5PKzujAy3xd+R1O31Ove0KNbXUJNahlkzgH8wagCJ3B8Hbb7E+kpLmd/MTsBzX5U3mi5k3YiA0/TD5EOPWWA/EteIWXqt7AWuVaKOsnzLyAGY0QoUzveEuGfkBpjlOgPh2dvvCcPtKR2pAWc8D6lAZlt8FWWlIajRqnVT493KGd3jSHMFceJFQksr+FSmafbSMmDJBGtLxfc3LT6nihhjUuKobFRqUGWa+Kr4gsl1R2xlw== 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=SaaB82HaqngDbFzCiau1/5bwD9FX9g1O9QfociUmHE8=; b=zdeb0rt5LwUBT7yeGhKUJ6i+Ir1Y4c904FdPEHGn6LLWpUGS/l6pcDkdP+bKvqgY/yTZev0c16iddNlk5Rj78CzKSgjbfmEUQnC7WKCmgx3/sABxnukKAc9zNP5+7v7ctclw3D6I1fqtP604J3BdXaGHOCuuack7pyyy9fkyr74= Received: from CY5PR10MB6011.namprd10.prod.outlook.com (2603:10b6:930:28::16) by MW6PR10MB7640.namprd10.prod.outlook.com (2603:10b6:303:245::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Wed, 19 Jun 2024 15:32:14 +0000 Received: from CY5PR10MB6011.namprd10.prod.outlook.com ([fe80::3aca:a3f6:e92f:782e]) by CY5PR10MB6011.namprd10.prod.outlook.com ([fe80::3aca:a3f6:e92f:782e%6]) with mapi id 15.20.7677.027; Wed, 19 Jun 2024 15:32:14 +0000 From: claudiu.zissulescu-ianculescu@oracle.com To: libabigail@sourceware.org Cc: Claudiu Zissulescu Subject: [PATCH] ctf-reader: Add time logging to CTF reader Date: Wed, 19 Jun 2024 18:31:59 +0300 Message-ID: <20240619153159.98933-1-claudiu.zissulescu-ianculescu@oracle.com> X-Mailer: git-send-email 2.45.2 X-ClientProxiedBy: VI1PR07CA0244.eurprd07.prod.outlook.com (2603:10a6:802:58::47) To CY5PR10MB6011.namprd10.prod.outlook.com (2603:10b6:930:28::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY5PR10MB6011:EE_|MW6PR10MB7640:EE_ X-MS-Office365-Filtering-Correlation-Id: e37e974b-a25d-4e83-5e43-08dc9074fe9e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|376011|1800799021|366013; X-Microsoft-Antispam-Message-Info: V/TwaD4NNr12RtIqCl4qrNi1Ly9RlTJMh9U+Z/ES2KpJS01AO5SyTEUbuDIaHZayf/iNrfDprSuk3igIvGZ/KXrVHClQBoOVgEdJscpIG1ltBLN5pGwLsv2ANxeB+uNH1xMJXXtZFythvEf4/hOy0bxU4fP8kcj5+ZkPIl9T4pF9PoCuosQT8k3K+gR3y/3DvjRExs6OiJNM5caFavNiF3psuLiL+EjH48hZzeQcZW5CwZpiaBpWtBJ0tN3nFDEQYCa/uIvKUwj4Z+plKkJtZT31w0MBp1dcKH9RBIfuZ8LRb7Okd2WNe+PSv6wtGlWEeIt4gJf+xYm1swQEPdVmacY3xcx7RxJZnXCiGY3Aw8CsCueiQyguCpI256VwR91KOX19Gumz03UkwZ6zGiufqf9hU8D4I7HXK518AoVdCMU3plrrGaKJImA1QeU0UIKCZX+VHwu49VQuw0HznkwWNhtt3EfqtL+iPkOsWCEqfMdodCwvE93knQry7Zu/gc9/yPiv3FO8DT4Q29XvVcy6ThKJy5o9cqK5ZBIMxDpxQ9UxS6Av4kaOqcqGqbjMaP6/aQEVdu7HDJ769peKRtshvs+8GIF1NbEmS1WganfqlQrRddBW6Ts30uw/zzBnHw3CxYkpp4/k7cis3MKreff0driEPnLkhrqrQ39p83AbvMwmBVi7jWwX03vHULJYqpu2F6ey0Nzut6eyVCZIhD/F0CI/BLpOVZYgfo1cm+UyLVhWNsabyC653OZmzYEXkOHViE1jjHW4tmt5F5nTeb5savqBrKzNnARD2ghabrezdTeQtVWAmtQotigmYBWkz8Vn25E4uaMejbuz1UU+2+bEXwNep5riaZnJTvvQURv4s8XTeiF5Zj0v5HVBJ0plsl7Vn8DjUb5tHdmzGNqyuyIQw/MO3WZjIFUyDmuiop9fHWko8rlC2Bl9uStiXvEc7AMlOmQPWH3qazOcxN/RmfifeSje3y40CEEPmiFPbP809OXsE0NQADMHqO98rnoa4+EP/VmT7Yzu9qRFV14f2bGhjGO6N+9pCtEnspfXHJNUlKtoSRZXLaTXl25DxyYVp6ySA1g//3hlZA9XT0epWul5frfmBzWs8HKGIMKKEsQhQlfIlmjcfJDyr8E+IBlYiWd6sOaJEk0whsIeOPvKqb6pGp8yo4Y9vImrPj+hWri9pdJnr4hoWLA0xB2d/yEW/LQq5WnsCJmD60BaKYJk7QawH1+1/0nXHrtqE1p6XGJ3xnHNuNX5T78NV8OgZBQC1isZa3w5P85i3WP3xQyzitC4bGrv9yhE9sKAZNCLqBOy5Vp3aOjcLHkwJhQ/hQ+e6VdV X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY5PR10MB6011.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(376011)(1800799021)(366013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8jNFhMRP6x9W59w32oAGwhFsLdhJ24/sC2YN191rJ3f+0PHGMx1Jiky3Sjuc64THaR+QV6UTKs2jGG4lDfjatAa53aZTmQ+qpSpPGdqCOjk12wnU+UkIgr8I0t9lie7VZK/Ps20Bm8zcTWtIbDzWYp3mjM/VyA0wstpElFutVjDzf6mwhQTNhL78QT+ZQPpkS5kZJ5ztP+HyEDMVbN9r7+WWUs5HInsG+SGVVrt1UcptMcWMSDJgAHbr2+ripWO7HcrNRq9vvRi2MvubIlmhfRJgblbgj9iTvam2lxCcpZhUo4BrWOm14Sj9/IYZNv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oQe17aAdLxk+VCWyC9eKqUF9gh6Xgt/tPU+ZM8x2N0CPVYLCw6nxH3UL1rlvhzMUoFIjbIP1Dl3GWGpbhCvhJSXHAjz7ojjsEL4WFXUPuCW262th6tLzjmOS5BAwC+sEZOlDiR81i+OrfTmmli0tN864WMGUU8el5Hx6FnQGpk7awyVCWJDxYjra0qwuIrav7PAgP/fhL32nISUFjxJup6NYkidmR1ynz4+GLlX6FrRE9AixAXTy/gTc0GrHvqIrz X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: OTR+worm/bWzQHX6zEOmtJRLOqFZFE6JxzYqjgMp8TP9IHPGbMnG8jJkTJ5vCSVKDrrPVSzVjUQKvFZxtDP3R0sxP0NdB/o47juzaiWpXqz06u7g0Hq9TlL26vUz06K/dQTXkX7/PygZkbW6+yiaOVrSP5AUUD8y+iIItki5a/8C8fsDmtC0GuJkuHYlLyBeQXU++BojwUzwMRcVZPdSWIJPIKphx09zvUtg2h6ANs0n05etm+RG+kln76TFEj+3BD5A/qGoG+nWYKtb9mMdToddG+b3thXgR9jZblfhfFXrP9x8X4maNX0OacLdi7gF5zR4NFzC6Uff/XbqVNxre6yPgxJ4q+xIvAuSx047BmSqFHpFmjKfaZhiT7voYfS4TNck+FrHutHQ9q4Mdf66k1kM6gNftpv6O3GNThhWDG3rC8esq+oBRlM8pw6/2NL+0wua1SrLTdkgTkxTlyIYoz2Zxwbq2UsSZSgUujskVqsudy9z88ClKwGeuCGNhAQW78SLUCk0zKFF4/hoygbnyniYXperEG/g8tHCWyiAuj4s2r8/++WYgv7CO/2nzogiqASL7rd4PWINnuapBvsmmuaZbGAS0l5BpSLxAMylwGE= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e37e974b-a25d-4e83-5e43-08dc9074fe9e X-MS-Exchange-CrossTenant-AuthSource: CY5PR10MB6011.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 15:32:14.2801 (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: 8xUND03OgZvpDPvUd2HIQeQ+2OQR0/kPi14eXxHl+TwvRVJrk9gKzbZy8DdgG/EEAbZHOd5VQjeJp1LqD0Q3t7T08r9444GFlyv93Qs41owip9Mhk47grv2NjEYzIzooq+2GKCGl3uaiztXcVld1fw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR10MB7640 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-19_02,2024-06-19_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 malwarescore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406190116 X-Proofpoint-ORIG-GUID: wVMVIvSiuA2yI45RpJUjkQhekYXGmlNi X-Proofpoint-GUID: wVMVIvSiuA2yI45RpJUjkQhekYXGmlNi X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, 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: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org From: Claudiu Zissulescu Log the time spent while reading the CTF archive and canonicalizing it. * src/abg-ctf-reader.cc (do_log()): Getter of the do_log flag. (read_corpus()): Add time logging. Signed-off-by: Claudiu Zissulescu --- src/abg-ctf-reader.cc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/abg-ctf-reader.cc b/src/abg-ctf-reader.cc index 623bfa2b..67db400e 100644 --- a/src/abg-ctf-reader.cc +++ b/src/abg-ctf-reader.cc @@ -42,6 +42,9 @@ ABG_END_EXPORT_DECLARATIONS namespace abigail { + +using std::cerr; + /// Namespace of the reader for the CTF debug information namespace ctf { @@ -327,6 +330,16 @@ public: env() {return options().env;} + /// Getter of the "do_log" flag. + /// + /// This flag tells if we should log about various internal + /// details. + /// + /// return the "do_log" flag. + bool + do_log() const + {return options().do_log;} + /// Look for vmlinux.ctfa file in default directory or in /// directories provided by debug-info-dir command line option, /// it stores location path in @ref ctfa_file. @@ -680,6 +693,10 @@ public: && (status & fe_iface::STATUS_DEBUG_INFO_NOT_FOUND)) return corp; + tools_utils::timer t; + if (do_log()) + t.start(); + int errp; if ((corp->get_origin() & corpus::LINUX_KERNEL_BINARY_ORIGIN) && corpus_group()) @@ -699,6 +716,13 @@ public: ctfa = ctf_arc_bufopen(&ctf_sect, &symtab_sect, &strtab_sect, &errp); + if (do_log()) + { + t.stop(); + cerr << "Reading CTF info in:" << t << "\n"; + t.start(); + } + env().canonicalization_is_done(false); if (ctfa == NULL) status |= fe_iface::STATUS_DEBUG_INFO_NOT_FOUND; @@ -716,6 +740,12 @@ public: env().canonicalization_is_done(true); + if (do_log()) + { + t.stop(); + cerr << "Building ABG-IR in:" << t << "\n"; + } + return corp; }