From patchwork Fri May 26 19:54:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Mezentsev X-Patchwork-Id: 99644 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp715929vqr; Fri, 26 May 2023 12:54:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6R6gm3KOpVPH8Ohn9/VCkpMQltybwg4Yw7QOJ6jmMNNU9RRg4m39y7yjTWvEZp1AhgFfwf X-Received: by 2002:a17:907:d8a:b0:971:fa86:28b with SMTP id go10-20020a1709070d8a00b00971fa86028bmr111550ejc.23.1685130882375; Fri, 26 May 2023 12:54:42 -0700 (PDT) Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id vg14-20020a170907d30e00b0096f593362a4si353531ejc.553.2023.05.26.12.54.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 12:54:42 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=kegL1WCH; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0E817385700B for ; Fri, 26 May 2023 19:54:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0E817385700B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1685130876; bh=VgFRM0TRfqiA/m33319CSx2vYwMb5R7xBRcEhoS00Hs=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=kegL1WCHaBxTwEKwKhY0DmuNuihBvsB3ZqGh8V6lDH3VUkSP5agd3o5vBW+BHdLCJ ZtydelUv7ec9xndthzV1tLL9e9fcclOOnWEPLo5uUtRh7MvmmAN9dtI8IHH/F24hQL w/biARNwFoTNfEW7gsQL2EdoV1Z13gGj37sty9M4= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 4105E3858C5F for ; Fri, 26 May 2023 19:54:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4105E3858C5F Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34QJiWAo006820 for ; Fri, 26 May 2023 19:54:23 GMT Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qu36hr0f6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 26 May 2023 19:54:23 +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 34QJfpgW015799 for ; Fri, 26 May 2023 19:54:23 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2176.outbound.protection.outlook.com [104.47.56.176]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3qqk6pwa6u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 26 May 2023 19:54:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H6PVfVqJUZH3rIq8ZBYt9ShfyINnnCdknv5Ny/seC8ZiYHUeKsP9q3O61P/3GOsd54F/8kB5PJngz5o/yrgtYQ/cCV0Dr4VccqQGcoK4GywbiWEGN7gsRViD6ekH8BMEDNUfgemtgTvuXCIrhn+mY1GkPXGVXLQW+dAmPY9sFsJH2BnYZdA6fH2Ca4kEHQhxU2tCly9j/GdJlHckoLN9LI75vwLtbY9LvmYrbqtSClV3AIu2AfdHST8uKJwQSjFuw04r1mXPDTdrsO22PHf15IwN9vDRN1MNkOt9HiYdDFd2NHWnCZm6oYjOrbAH6VP5y2QQVNVPqi6pU6Iy3f6Vdg== 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=VgFRM0TRfqiA/m33319CSx2vYwMb5R7xBRcEhoS00Hs=; b=IiZUsHCuHxqxS324LYMU1rPQ9S2tKc4wBI++2jpCmh0obYBX6+OfmvnJGtGjEVanZxFjueOkyuxmdO72z07dJmmHmix9BJXRUxxtmS6tc/KbZjXJqozyoR3kTAyg+OoXAMebDOAksd0pkqt2t6PvFb/+qagdhEfrF0OEZZAMqOZBWO16l8OIpWYhha96o2CiK565Zdgz+Sl6H/YF3c/dX6Gz8WaAbLRNV5O35c6/ZtahN5FqogLRqD2/sGJgc11KVVTtROOojYxYYRdf/bRC62n2AWev4Y+8O1OOhO9o3r+svUu5FV4GsWOMdlSxvlKK3UFqs2VRaHjw8h6TPEfnzg== 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 Received: from SA2PR10MB4636.namprd10.prod.outlook.com (2603:10b6:806:11e::10) by PH7PR10MB6309.namprd10.prod.outlook.com (2603:10b6:510:1b0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Fri, 26 May 2023 19:54:13 +0000 Received: from SA2PR10MB4636.namprd10.prod.outlook.com ([fe80::d045:6fb:e0f4:631b]) by SA2PR10MB4636.namprd10.prod.outlook.com ([fe80::d045:6fb:e0f4:631b%4]) with mapi id 15.20.6433.015; Fri, 26 May 2023 19:54:13 +0000 To: binutils@sourceware.org Cc: Vladimir Mezentsev Subject: [PATCH] gprofng: 29470 The test suite should be made more flexible Date: Fri, 26 May 2023 12:54:07 -0700 Message-Id: <20230526195407.2663991-1-vladimir.mezentsev@oracle.com> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: DS7PR03CA0187.namprd03.prod.outlook.com (2603:10b6:5:3b6::12) To SA2PR10MB4636.namprd10.prod.outlook.com (2603:10b6:806:11e::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PR10MB4636:EE_|PH7PR10MB6309:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ecc0df6-1936-4e38-5350-08db5e22fa8e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2mEnKHqOHrwKN++G8MFrBRbV19/ppEqaEL+81lovkiKUcnvmaSQM7PZFdkQU9tIi0feMT/DAEB/u7W6OL5m0Xk3uRXMW34U8S8lkdG3ijsGQBRRfiKX3aKh+BJGrWFipYByDWBX8u8PmvUZQD5DE52QdzV/glL+Pl7k5lFtUsLTjtosdJG82agObgdR2+4Fm64opStXeKGu2mFDdomVh+rxkMYBIMx9exExdNG9FeD6m9CLiqhjOz4tO/66vpTo0+43qYR5occUbOwZ0i9G10MxnrTx1xW6Be+CX8s2t+FKQIc/uOxY7+V2WozSCbZ7fGcz0nSuAd/L3nNEhgq+OwZGyzPuuOy/Kq3/ZOUoc8/79RZQI6mql8lWqh8feupuob/1fPRAZH3FMrf/G7oGcbL5ff598HL7+QFKw8QAB1OLw8b04OG/72Vb/gHL1n/bov5kyxPWMPcCE7bZs25/KAtNOS3I0Rx7tILCFPqUqCquoefGe8Lw6OdenuN+SJ1P43gGVQ2TSdyKjziYTNX3dxZDNNCLQWnjnjtrEEGOQXFZPB2bBJcHjVIeTZ5W3//TLqnPq/BWq0LNULoAMYaYoT20Xv/GGwUbuFGyRfk9KMFM= 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:(13230028)(39860400002)(376002)(396003)(366004)(346002)(136003)(451199021)(4326008)(41300700001)(107886003)(6486002)(6512007)(26005)(1076003)(6666004)(9686003)(6506007)(316002)(36756003)(5660300002)(8676002)(8936002)(38100700002)(478600001)(86362001)(2616005)(83380400001)(30864003)(2906002)(186003)(6916009)(66556008)(66476007)(66946007)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yCj8jz3qqAfTFlH1+HHJaF8v3i8YXRFGgWjEpNkMMuvRdcSYH5anOgWzaRo/EzMAXun3uYyDNkxvUUzdq9G+2T01NrkVLvwa30X39iA6dTsskqjiY4KAM4SUGsLRsOHjBvGppAAXqORu2YdeKqdZ1DOuE9QK7TYXoE11RG+/UqQg44udfeY9+fW34A9W4L1TlmUVQHFSaxWXYstCWBxtrQrKBLTdeki6CZ2SKaOnysas3rTmq8hl316OkdNAG3569vEmPN8tqJjmHXzGAq9cQXtH9APaEflGALzLDD2otr2YzNn3awQrkBX1kXtJjJkKfecq9DEz30/pUmNvQKWVQkvJNCupjFLmcp9SHDYJo8XRjeGIwpZwYnC28zAIusRrE+QH5xDVp/+GSDFi9mfA8NUlcxWlJ2i7KolarjMj1OXIPzKXv0/Ccu2ZrxMsCixNEhZB3JZNprVjcj0QICRmJdSBDA559JibTBkDbnNkACUlyItXAefwpWrEgGDbZoZtX7sIuu8orYAeO9lD9sL4PObC+5Ok82DnV8FL/5viZ63cFLDqffJE1+7FBtxpe8ffYqH7r0bgzr1t1DfpQPKXM8A7FcKU4u3VSwqYSq4NHh3eAJnoQW/ShyMU0PBazwOn45rw3LNBFOwAo1RJUMWPOr5MZVj3+XC3J1pu34ttOMTaiZz01zurk3IvxLZeCwReXis4kBGsbdOy0Hw35+dfdkZjrvdsXBGiHXmffd3WEjutfIY87YMDyXnl0CzvkrD5c3NnnkdGzEaBruAn15182+fzhCbBFSh8sjWoqULc83bO89FqM4FvXmx52IXjrP880a5ljrmLNX3igG9AdwjHga/vdOhuBuybC06OFSaQ+XtkNaWUBMq1qeE7rD3GXutHfvYZ4HUyZsLc2iBzWeZp+cUL+whKXfhqe6RgrX5v4ruh26+3YZY20AIGOUstLhj+f9Vx+8Zou1qTMSGQmbVKUMTz0gFDG4zHDhmfBCQynthxi16XrxknRMsMaO0vpYYVuwfk9coMV6Tvtc9gyKVh6R1/k5yT1xOnWiGgyT1ym3VZTDOQmjHShTfPgp3QldETagoU0IGQemorWGNk4HRNIumR5JRFwZC1twYNsZidqsvJybDtY7bmT4y5ivTM4iyY75QVjMx14KxoWEwIhUm4Nv8Xy2Y48x3VBtlUsCqsJHrfjYJhi3yEA7YDoKSLH/RyMvMm99fvhpraBh9qG/FmsVsWRSUd1bKS3+MAQpiKQAO6+4/nEyyH7AGGE7Z/hOMxzPYHcOMh1od4HI0TgWmSkrWRRNA9zswtb2MQfGPEKIW26rbagpJyhQydLoF/3dO7dxz+OnCGFkzDIp83ObTu+zqI+Dg6eNGdPYBgnPfgI1oKPYFYkJKMb34qcpZqRhjfUHTrQntcfxG7CgS1vLqWOSEeiliN70HYzYKGkGacAVkaeUT6jCLnzLojJdPhBdZLUTE67nPatrKoAvvHSKP5qhVyyR/Lgl9lcxgBiUUm5VIyuM8IxfrxxtalvqU5BanE7k4jNyA+5KPj4DQag4UJZTpD78NpXD5XLbn0N1ZS6DoNQQC3DGqcM82iwaGPH7nEl6ZYMIoG52wMSw5d+Wt3gg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: sqYgvIxmQLbH5DePqdbZrC2suUrhyP/ljRJhtztQl15B9EuICRxgMrnDw8yiEx7C30Agyuo0238AE0HobLbjoNPkey96mttEmTHpC9TT0N6LdcOJ8XrWGBmIA96MDbaaECYTBVw/bzCmE1wiqNksjGoumwHcmeL3XaYRH70FEiybXyTu1qCq+c+FH3NiG23deKV0VPI6hHHfSgbFvxDDPDtUody27KPBzclaHYCt5sRvkB38xF6k+szby4iISfziWgyPCA59t0RlZwkiFH9SK4olimgibShlxq5PFwEjBrfuas839PCryTWqnCJa00bbtbZc5hFfXzBRmomtqibeg+to/UxDJcbIRyp6NX9HYIVeoFF/TBBWu0PKU01TGTndBfKQO4D+cQHfJq4kKVwuH1iG3KwmtjvsHzC0pvDOC1EFTS3z/E7RdpydonitCwNQF2SGe6H/9zg/fEsxUwutdCizkTCsM6c5AYlPwp85JXs5BdmGTTK/NvyYJQ2IBvxHjSLCJsRxzSwe6b7Bs6R7Z4DokFCsVpvXcpPtsAWTiNTA+8bseQs5oGnKc2s2XM3JAvYzT/LGPLW6HvbXtPccLe7w3v4gKIbvXBB9t4OhbnqrdBWr49CXNupk1MTmzM2qanVDu+qLbEyhNXlHyApBbNTA56pLWJ+Vy9y298yQuZeFNHZXPK1kxbBH7aigOiemgZt1h9SStUQVg61BLL2SNh76D6iDj2aaEQ8CT/2AVfo6o6XNApQsByWfolPaICtY X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ecc0df6-1936-4e38-5350-08db5e22fa8e X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4636.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2023 19:54:13.1414 (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: CN/f/LRBFC1eYYEVwIKUkLguPSOGQvMNb0rhPITHc2Y5jj48B+zj395GdTiqlIUgbfV1deEwEPcBW0FPPsxPUEwQgGhEyvYg0RUKkaxIKfU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6309 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-26_10,2023-05-25_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305260170 X-Proofpoint-GUID: CBamkgF34089q_3IeRaE-rzhNm9JaQvK X-Proofpoint-ORIG-GUID: CBamkgF34089q_3IeRaE-rzhNm9JaQvK X-Spam-Status: No, score=-12.5 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_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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Vladimir Mezentsev via Binutils From: Vladimir Mezentsev Reply-To: vladimir.mezentsev@oracle.com Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766987799811205961?= X-GMAIL-MSGID: =?utf-8?q?1766987799811205961?= From: Vladimir Mezentsev If there are no rejections, on Wednesday I will applay my fixes. It is tested on x86_64 and aarch64. I add two new targets (check-extra, check-install) for gprofng testing: `make check` runs sanity testing for gprofng and takes ~30 secunds. `make check-extra` runs all gprofng tests and takes ~20 minutus. `make check-install` runs all gprofng tests and uses gprofng installation. On aarch64, there are unwind problems in libgp-collector.so. I set ACCT_FILTER to temporarily ignore problematic functions. gprofng/ChangeLog 2023-05-25 Vladimir Mezentsev PR gprofng/29470 * Makefile.am: Add check-extra, check-install. * Makefile.in: Rebuild * testsuite/config/default.exp: Set the GPROFNG variable. * testsuite/gprofng.display/display.exp: Updated the test list. * testsuite/gprofng.display/jsynprog/Intface.java: Correct copyright. * testsuite/gprofng.display/jsynprog/Launcher.java: Likewise. * testsuite/gprofng.display/jsynprog/Makefile: Likewise. * testsuite/gprofng.display/jsynprog/Routine.java: Likewise. * testsuite/gprofng.display/jsynprog/Sub_Routine.java: Likewise. * testsuite/gprofng.display/jsynprog/cloop.cc: Likewise. * testsuite/gprofng.display/jsynprog/jsynprog.h: Likewise. * testsuite/gprofng.display/jsynprog/jsynprog.java: Correct copyright. Add the -j option to run the selected functions. * testsuite/gprofng.display/synprog/check_results.pl: Remove unused environment variable. * testsuite/gprofng.display/synprog/synprog.c: Updated DEFAULT_COMMAND. * testsuite/lib/Makefile.skel: Apply $(ACCT_FILTER). * testsuite/lib/acct.pm: Ignore errors when $(ACCT_FILTER) is set. * testsuite/lib/display-lib.exp: Add TARGET_FLAGS in make_args. --- gprofng/Makefile.am | 9 +- gprofng/Makefile.in | 9 +- gprofng/testsuite/config/default.exp | 6 + gprofng/testsuite/gprofng.display/display.exp | 58 ++++--- .../gprofng.display/jsynprog/Intface.java | 21 ++- .../gprofng.display/jsynprog/Launcher.java | 21 ++- .../gprofng.display/jsynprog/Makefile | 2 +- .../gprofng.display/jsynprog/Routine.java | 24 ++- .../gprofng.display/jsynprog/Sub_Routine.java | 25 ++- .../gprofng.display/jsynprog/cloop.cc | 23 ++- .../gprofng.display/jsynprog/jsynprog.h | 22 ++- .../gprofng.display/jsynprog/jsynprog.java | 161 ++++++++++++------ .../gprofng.display/synprog/check_results.pl | 12 +- .../gprofng.display/synprog/synprog.c | 2 +- gprofng/testsuite/lib/Makefile.skel | 3 +- gprofng/testsuite/lib/acct.pm | 27 ++- gprofng/testsuite/lib/display-lib.exp | 5 +- 17 files changed, 311 insertions(+), 119 deletions(-) diff --git a/gprofng/Makefile.am b/gprofng/Makefile.am index 9658efd348c..b0c960a0ae0 100644 --- a/gprofng/Makefile.am +++ b/gprofng/Makefile.am @@ -52,9 +52,12 @@ AM_MAKEFLAGS = \ GPROFNG_CPPFLAGS="$(GPROFNG_CPPFLAGS)" if TCL_TRY -check-DEJAGNU: site.exp development.exp +.PHONY: check-small check-extra check-install + +check-DEJAGNU: check-small + +check-small check-extra check-install: site.exp development.exp srcroot=`cd $(srcdir) && pwd`; export srcroot; \ - r=`pwd`; export r; \ LC_ALL=C; export LC_ALL; \ EXPECT=$(EXPECT); export EXPECT; \ jdk_inc="$(jdk_inc)"; export jdk_inc; \ @@ -62,6 +65,8 @@ check-DEJAGNU: site.exp development.exp if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \ JDK_INC="$(jdk_inc)" \ + CHECK_TARGET=$@ \ + PREFIX="$(prefix)" \ GPROFNG_BROKEN_JAVAC="$(GPROFNG_BROKEN_JAVAC)" \ MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS) $(PTHREAD_CFLAGS)" \ LDFLAGS="$(LDFLAGS)" LIBS="$(PTHREAD_LIBS) $(LIBS)" \ diff --git a/gprofng/Makefile.in b/gprofng/Makefile.in index a2854950e34..582e0bb8716 100644 --- a/gprofng/Makefile.in +++ b/gprofng/Makefile.in @@ -929,9 +929,12 @@ uninstall-am: .PRECIOUS: Makefile -@TCL_TRY_TRUE@check-DEJAGNU: site.exp development.exp +@TCL_TRY_TRUE@.PHONY: check-small check-extra check-install + +@TCL_TRY_TRUE@check-DEJAGNU: check-small + +@TCL_TRY_TRUE@check-small check-extra check-install: site.exp development.exp @TCL_TRY_TRUE@ srcroot=`cd $(srcdir) && pwd`; export srcroot; \ -@TCL_TRY_TRUE@ r=`pwd`; export r; \ @TCL_TRY_TRUE@ LC_ALL=C; export LC_ALL; \ @TCL_TRY_TRUE@ EXPECT=$(EXPECT); export EXPECT; \ @TCL_TRY_TRUE@ jdk_inc="$(jdk_inc)"; export jdk_inc; \ @@ -939,6 +942,8 @@ uninstall-am: @TCL_TRY_TRUE@ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ @TCL_TRY_TRUE@ $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \ @TCL_TRY_TRUE@ JDK_INC="$(jdk_inc)" \ +@TCL_TRY_TRUE@ CHECK_TARGET=$@ \ +@TCL_TRY_TRUE@ PREFIX="$(prefix)" \ @TCL_TRY_TRUE@ GPROFNG_BROKEN_JAVAC="$(GPROFNG_BROKEN_JAVAC)" \ @TCL_TRY_TRUE@ MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS) $(PTHREAD_CFLAGS)" \ @TCL_TRY_TRUE@ LDFLAGS="$(LDFLAGS)" LIBS="$(PTHREAD_LIBS) $(LIBS)" \ diff --git a/gprofng/testsuite/config/default.exp b/gprofng/testsuite/config/default.exp index ca2997b1742..f76047e2a34 100644 --- a/gprofng/testsuite/config/default.exp +++ b/gprofng/testsuite/config/default.exp @@ -32,6 +32,12 @@ if {![info exists CFLAGS]} { set CFLAGS "-g -O2" } +if { "$CHECK_TARGET" == "check-install" } { + set ::env(GPROFNG) "$PREFIX/bin/gprofng" +} else { + set ::env(GPROFNG) "$BUILDDIR/src/gprofng" +} + # Create directories where gprofng can find libraries and binaries: remote_exec host "sh -c \"rm -rf tmpdir; mkdir -p tmpdir\"" remote_exec host "sh -c \"mkdir -p lib; rm -f lib/gprofng; ln -s ../libcollector/.libs lib/gprofng\"" diff --git a/gprofng/testsuite/gprofng.display/display.exp b/gprofng/testsuite/gprofng.display/display.exp index c34ba3abd54..4698795288f 100644 --- a/gprofng/testsuite/gprofng.display/display.exp +++ b/gprofng/testsuite/gprofng.display/display.exp @@ -31,34 +31,37 @@ if { ![istarget $pltf-*-*] return } -switch $pltf { - x86_64 { - # Columns in the table represent: - # dir cflags gprofflags Others - set table { - {"jsynprog" "-g -Wall" "-p on -j on"} - {"mttest" "-g -O0" "-p on"} - {"mttest" "-g -O0" "-p on -h on"} - {"synprog" "-g -O0" "-p on"} - {"synprog" "-g -O0" "-p on -h on"} - } - } - aarch64 { +if { "$pltf" == "aarch64" } { +# Use a filter for not leaf functions due to the unwind problem in libgp-collector.so + set ::env(ACCT_FILTER) [join { "|egrep -vw 'gpf|tailcallopt|" + "cache_trash|calladd|computeF|cond_global|cond_timeout_global|" + "lock_global|lock_local|lock_none|nothreads|sema_global|trylock_global'" + } "" ] +} +if { "$CHECK_TARGET" == "check-extra" || "$CHECK_TARGET" == "check-install" } { +# dir cflags gprofflags tflags set table { - {"jsynprog" "-g -Wall" "-p on -j on"} - {"mttest" "-g -O0" "-p on"} - {"synprog" "-g -O0" "-p on"} + {"mttest" "-g -O0" "-p on"} + {"mttest" "-g -O0" "-p on -h on"} + {"mttest" "-g -O" "-p on -a on"} + {"mttest" "-g -O" "-p on -a off"} + {"mttest" "-g -O" "-p on -h on"} + {"jsynprog" "-g -Wall" "-p on -a on"} + {"jsynprog" "-g -Wall" "-p on -a off"} + {"jsynprog" "-g -Wall" "-p on -j on"} + {"synprog" "-g -O0" "-p on"} + {"synprog" "-g -O0" "-p on -h on"} + {"synprog" "-g -O" "-p on -a on"} + {"synprog" "-g -O" "-p on -a off"} + {"synprog" "-g -O" "-p on -h on"} } - } - default { - # Columns in the table represent: - # dir cflags gprofflags Others +} else { # "$CHECK_TARGET" is "check" or "check-DEJAGNU" +# dir cflags gprofflags tflags set table { - {"jsynprog" "" ""} - {"mttest" "" ""} - {"synprog" "" ""} + {"jsynprog" "-g -Wall" "-p on -j on" "-j add_int"} + {"mttest" "-g -O0" "-p on" "-j calladd"} + {"synprog" "-g -O0" "-p on" "cpu"} } - } } global JDK_INC @@ -68,6 +71,11 @@ foreach line $table { set dir [lindex $line 0] set cflags [lindex $line 1] set gprofflags [lindex $line 2] + if { [llength $line] > 3 } { + set tflags [lindex $line 3] + } else { + set tflags " " + } verbose [file rootname $line] verbose running display test $line @@ -75,7 +83,7 @@ foreach line $table { && ($JDK_INC == "" || $GPROFNG_BROKEN_JAVAC == "yes") } { unsupported $dir } else { - run_display_test $dir $cflags $gprofflags + run_display_test $dir $cflags $gprofflags $tflags } } diff --git a/gprofng/testsuite/gprofng.display/jsynprog/Intface.java b/gprofng/testsuite/gprofng.display/jsynprog/Intface.java index 016e7b28ba6..4a1edb18c4a 100644 --- a/gprofng/testsuite/gprofng.display/jsynprog/Intface.java +++ b/gprofng/testsuite/gprofng.display/jsynprog/Intface.java @@ -1,4 +1,23 @@ -// Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. +/* 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. */ + public interface Intface { public int add_int (int scale); diff --git a/gprofng/testsuite/gprofng.display/jsynprog/Launcher.java b/gprofng/testsuite/gprofng.display/jsynprog/Launcher.java index 33ee06cd8db..37669dc41c6 100644 --- a/gprofng/testsuite/gprofng.display/jsynprog/Launcher.java +++ b/gprofng/testsuite/gprofng.display/jsynprog/Launcher.java @@ -1,5 +1,22 @@ -// Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. -// @(#)Launcher.java 1.3 10/03/24 SMI +/* 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. */ import java.lang.reflect.*; diff --git a/gprofng/testsuite/gprofng.display/jsynprog/Makefile b/gprofng/testsuite/gprofng.display/jsynprog/Makefile index 3d9222dc9ec..37ea9edbb92 100644 --- a/gprofng/testsuite/gprofng.display/jsynprog/Makefile +++ b/gprofng/testsuite/gprofng.display/jsynprog/Makefile @@ -52,5 +52,5 @@ jsynprog.class: $(JAVA_SRCS) $(EXPERIMENT): $(TARGETS) @echo " ---- Build: $@ -----" rm -rf $@ - $(COLLECT) $(COLLECT_FLAGS) -o $@ $(JAVA) $(JAVACFLAGS) jsynprog + $(COLLECT) $(COLLECT_FLAGS) -o $@ $(JAVA) $(JAVACFLAGS) jsynprog $(TARGET_FLAGS) diff --git a/gprofng/testsuite/gprofng.display/jsynprog/Routine.java b/gprofng/testsuite/gprofng.display/jsynprog/Routine.java index cfe45d2b93d..1295d82f12a 100644 --- a/gprofng/testsuite/gprofng.display/jsynprog/Routine.java +++ b/gprofng/testsuite/gprofng.display/jsynprog/Routine.java @@ -1,8 +1,22 @@ -/** - * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. - * This class implements the Intface interface - * increments value of integer and floats - */ +/* 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. */ import java.util.*; diff --git a/gprofng/testsuite/gprofng.display/jsynprog/Sub_Routine.java b/gprofng/testsuite/gprofng.display/jsynprog/Sub_Routine.java index 11e045edc11..57afd272314 100644 --- a/gprofng/testsuite/gprofng.display/jsynprog/Sub_Routine.java +++ b/gprofng/testsuite/gprofng.display/jsynprog/Sub_Routine.java @@ -1,7 +1,24 @@ -/* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. -** @(#)Sub_Routine.java 1.4 10/03/24 SMI -** This is subclass of Routine , overrides one method -*/ +/* 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. */ + +// This is subclass of Routine, overrides one method public class Sub_Routine extends Routine { private static native double cTimer(); diff --git a/gprofng/testsuite/gprofng.display/jsynprog/cloop.cc b/gprofng/testsuite/gprofng.display/jsynprog/cloop.cc index cf8b779916b..d9a78e23f9a 100644 --- a/gprofng/testsuite/gprofng.display/jsynprog/cloop.cc +++ b/gprofng/testsuite/gprofng.display/jsynprog/cloop.cc @@ -1,6 +1,23 @@ -/* - * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. - */ +/* 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. */ + #include #include #include diff --git a/gprofng/testsuite/gprofng.display/jsynprog/jsynprog.h b/gprofng/testsuite/gprofng.display/jsynprog/jsynprog.h index 34b4f6cf0a7..97a24b33f33 100644 --- a/gprofng/testsuite/gprofng.display/jsynprog/jsynprog.h +++ b/gprofng/testsuite/gprofng.display/jsynprog/jsynprog.h @@ -1,5 +1,23 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -/* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved. */ +/* 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. */ + #include /* Header for class jsynprog */ diff --git a/gprofng/testsuite/gprofng.display/jsynprog/jsynprog.java b/gprofng/testsuite/gprofng.display/jsynprog/jsynprog.java index eb98b5ea7fd..ee22bb971cb 100644 --- a/gprofng/testsuite/gprofng.display/jsynprog/jsynprog.java +++ b/gprofng/testsuite/gprofng.display/jsynprog/jsynprog.java @@ -1,5 +1,22 @@ -// Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. -// @(#)jsynprog.java SMI +/* 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. */ import java.util.*; import java.io.*; @@ -27,17 +44,22 @@ class jsynprog jsynprog jsyn_obj = new jsynprog(); Integer ni; int scale = 1000; + String commands = "memalloc.add_int.add_double.has_inner_class" + + ".recurse.recursedeep.bounce.array_op.vector_op.sys_op" + + ".jni_JavaJavaC.JavaCC.JavaCJava.Launcher"; createAcct(); LoadJNILibrary(args); testtime = computeSet(); /* check for invocation parameter */ - if (args.length != 0) { - if (args[0].equals("fast")) { + for (int i = 0; i < args.length; i++) { + if (args[i].equals("-fast")) { scale = 10000; - } else if (args[0].equals("slow")) { + } else if (args[i].equals("-slow")) { scale = 1; + } else if (args[i].equals("-j") && i + 1 < args.length) { + commands = args[++i]; } else { System.err.println("fatal: unexpected argument: " + args[0] ); System.exit(1); @@ -47,84 +69,115 @@ class jsynprog /* large memory allocations, trigger gc */ Routine rtn = new Routine(); Sub_Routine sbrt = new Sub_Routine(); - recTime(); - rtn.memalloc(10000, scale); - printValue("Routine.memalloc", false); + + if (commands.indexOf("memalloc") >= 0) { + recTime(); + rtn.memalloc(10000, scale); + printValue("Routine.memalloc", false); + } /* add integers */ - recTime(); - ni = new Integer (rtn.add_int(scale)); - printValue("Routine.add_int", true); + if (commands.indexOf("add_int") >= 0) { + recTime(); + ni = new Integer (rtn.add_int(scale)); + printValue("Routine.add_int", true); + } /* add double */ - recTime(); - Double nd = new Double(rtn.add_double(scale)); - printValue("Routine.add_double", true); + if (commands.indexOf("add_double") >= 0) { + recTime(); + Double nd = new Double(rtn.add_double(scale)); + printValue("Routine.add_double", true); + } /* call method in derived class */ - recTime(); - ni = new Integer (sbrt.add_int(scale)); - printValue("Sub_Routine.add_int", true); + if (commands.indexOf("add_int") >= 0) { + recTime(); + ni = new Integer (sbrt.add_int(scale)); + printValue("Sub_Routine.add_int", true); + } /* call method that defines an inner class */ - recTime(); - Integer[] na = rtn.has_inner_class(scale); - printValue("Routine.has_inner_class", true); + if (commands.indexOf("has_inner_class") >= 0) { + recTime(); + Integer[] na = rtn.has_inner_class(scale); + printValue("Routine.has_inner_class", true); + } /* recursion */ - recTime(); - rtn.recurse(0,80, scale); - printValue("Routine.recurse", true); + if (commands.indexOf("recurse") >= 0) { + recTime(); + rtn.recurse(0,80, scale); + printValue("Routine.recurse", true); + } /* deep recursion */ - recTime(); - rtn.recursedeep(0,500, scale); - printValue("", true); + if (commands.indexOf("recursedeep") >= 0) { + recTime(); + rtn.recursedeep(0,500, scale); + printValue("", true); + } /* indirect recursion */ - recTime(); - rtn.bounce(0,20, scale); - printValue("Routine.bounce", true); + if (commands.indexOf("bounce") >= 0) { + recTime(); + rtn.bounce(0,20, scale); + printValue("Routine.bounce", true); + } /* array operations */ - recTime(); - rtn.array_op(scale); - printValue("Routine.array_op", false); + if (commands.indexOf("array_op") >= 0) { + recTime(); + rtn.array_op(scale); + printValue("Routine.array_op", false); + } /* Vector operations */ - recTime(); - rtn.vector_op(scale); - printValue("Routine.vector_op", false); + if (commands.indexOf("vector_op") >= 0) { + recTime(); + rtn.vector_op(scale); + printValue("Routine.vector_op", false); + } /* spend time in system calls */ - recTime(); - rtn.sys_op(scale); - printValue("Routine.sys_op", false); + if (commands.indexOf("sys_op") >= 0) { + recTime(); + rtn.sys_op(scale); + printValue("Routine.sys_op", false); + } /* java->java->c */ - recTime(); - int np = 0; - jni_JavaJavaC(np, scale); - printValue("jsynprog.jni_JavaJavaC", true); + if (commands.indexOf("jni_JavaJavaC") >= 0) { + recTime(); + int np = 0; + jni_JavaJavaC(np, scale); + printValue("jsynprog.jni_JavaJavaC", true); + } /* java->c->c */ - recTime(); - JavaCC(scale); - printValue("jsynprog.JavaCC", true); + if (commands.indexOf("JavaCC") >= 0) { + recTime(); + JavaCC(scale); + printValue("jsynprog.JavaCC", true); + } /* java->c->java */ - recTime(); - JavaCJava(scale); - printValue("jsynprog.JavaCJava", true); + if (commands.indexOf("JavaCJava") >= 0) { + recTime(); + JavaCJava(scale); + printValue("jsynprog.JavaCJava", true); + } /* dynamically loaded classes */ - String java_ver = System.getProperty("java.version"); - Launcher lnch = new Launcher(); - String[] params = new String[]{"DynLoadedClass"}; - recTime(); - lnch.main(params); - printValue("Launcher.main", true); + if (commands.indexOf("Launcher") >= 0) { + String java_ver = System.getProperty("java.version"); + Launcher lnch = new Launcher(); + String[] params = new String[]{"DynLoadedClass"}; + recTime(); + lnch.main(params); + printValue("Launcher.main", true); + } System.gc(); } diff --git a/gprofng/testsuite/gprofng.display/synprog/check_results.pl b/gprofng/testsuite/gprofng.display/synprog/check_results.pl index ec278be9a02..830ed9a00fc 100755 --- a/gprofng/testsuite/gprofng.display/synprog/check_results.pl +++ b/gprofng/testsuite/gprofng.display/synprog/check_results.pl @@ -25,16 +25,8 @@ if 0; use strict; require "acct.pm"; -my(@checkTime); - -if ("$ENV{DA_io}" eq "on") { - @checkTime = (); - acct::readAcct("synprog.acct2", @checkTime); -} else { - @checkTime = (1, 2); - acct::readAcct("synprog.acct", @checkTime); -} - +my(@checkTime) = (1, 2); # columns 1 and 2 - time in seconds. +acct::readAcct($ARGV[0], @checkTime); acct::read_er_print_out($ARGV[1], -1); acct::createDiff(); exit acct::set_retVal(0); diff --git a/gprofng/testsuite/gprofng.display/synprog/synprog.c b/gprofng/testsuite/gprofng.display/synprog/synprog.c index ac5950a0d4b..3e0eac2f67f 100644 --- a/gprofng/testsuite/gprofng.display/synprog/synprog.c +++ b/gprofng/testsuite/gprofng.display/synprog/synprog.c @@ -149,7 +149,7 @@ static int CLONE_FLAGS[] = { /* the default script */ static char DEFAULT_COMMAND[] = "icpu.md.cpu.rec.recd.dousl.gpf.fitos.ec.tco.b.nap.uf." - "sys.sig.so.sx.so.sched.uwdc"; + "sys.sig.so.sx.so.sched"; struct scripttab scripttab[] = { {"abt", doabort, "doabort", 0, 0}, diff --git a/gprofng/testsuite/lib/Makefile.skel b/gprofng/testsuite/lib/Makefile.skel index ebb76a89d7a..5a30966c1cd 100644 --- a/gprofng/testsuite/lib/Makefile.skel +++ b/gprofng/testsuite/lib/Makefile.skel @@ -56,7 +56,8 @@ $(DISPLAY_LOG): $(EXPERIMENT) $(DISPLAY) $(DISPLAY_FLAGS) $(EXPERIMENT) > $@ compare: $(DISPLAY_LOG) - perl -I $(srcdir)/../../lib $(srcdir)/check_results.pl $(ACCT_FILE) $(DISPLAY_LOG) + cat $(ACCT_FILE) $(ACCT_FILTER) > $(ACCT_FILE).fltr + perl -I $(srcdir)/../../lib $(srcdir)/check_results.pl $(ACCT_FILE).fltr $(DISPLAY_LOG) clobber clean: rm -rf *.er diff --git a/gprofng/testsuite/lib/acct.pm b/gprofng/testsuite/lib/acct.pm index 7d754aeeaae..7c328e7fc2f 100644 --- a/gprofng/testsuite/lib/acct.pm +++ b/gprofng/testsuite/lib/acct.pm @@ -97,7 +97,21 @@ sub set_retVal if ( $retVal == 0 ) { $retVal = $_[0]; if ($retVal != 0 ) { - warn sprintf("DEBUG: retVal=%d\n", $retVal); + my $s = ""; + if ($retVal == $ERROR_DIFF_RANGE) { + $s = "Difference out of range"; + } elsif ($retVal == $ERROR_HIGH_UNKNOWN) { + $s = "High unknown detected"; + } elsif ($retVal == $ERROR_ACCT_MISMATCH) { + $s = "Accounting file mismatch"; + } elsif ($retVal == $ERROR_CALLER_VERIF) { + $s = "Caller/caller verification failed"; + } elsif ($retVal == $ERROR_ZERO_METRIC) { + $s = "Unexpected zero metric"; + } elsif ($retVal == $ERROR_NEGATIVE_TIME) { + $s = "Negative CPU time"; + } + warn sprintf("DEBUG: retVal=%d %s\n", $retVal, $s); } } return $retVal; @@ -450,7 +464,9 @@ sub doComp if ( $r2 > 0 ) { $err_diff_range = $ERROR_DIFF_RANGE; } else { - $err_zero_metric = $ERROR_ZERO_METRIC; + if (! exists $ENV{ACCT_FILTER}) { + $err_zero_metric = $ERROR_ZERO_METRIC; + } } } else { $err_acct_mismatch = $ERROR_ACCT_MISMATCH; @@ -544,7 +560,9 @@ sub doComp2AVG if ( $r2 > 0 ) { $err_diff_range = $ERROR_DIFF_RANGE; } else { - $err_zero_metric = $ERROR_ZERO_METRIC; + if (! exists $ENV{ACCT_FILTER}) { + $err_zero_metric = $ERROR_ZERO_METRIC; + } } } else { $err_acct_mismatch = $ERROR_ACCT_MISMATCH; @@ -592,7 +610,8 @@ sub checkUnknown() $val = sprintf($R->{FMT}, $val); $rate = sprintf($R->{FMT},($val / $total) * 100); - if (($val > $R->{'P_RANGE'}) && ($rate > $R->{'P_RATE'})) { + if ((! exists $ENV{ACCT_FILTER}) && + ($val > $R->{'P_RANGE'}) && ($rate > $R->{'P_RATE'})) { &set_retVal($ERROR_HIGH_UNKNOWN); &openFsingleScr(); $fmt = "#%-8s %10s %10s %s\n"; diff --git a/gprofng/testsuite/lib/display-lib.exp b/gprofng/testsuite/lib/display-lib.exp index d094279d6e6..0ad81b09bf0 100644 --- a/gprofng/testsuite/lib/display-lib.exp +++ b/gprofng/testsuite/lib/display-lib.exp @@ -50,7 +50,7 @@ proc run_native_host_cmd { command } { # display options, collect flags, app options? Do we want these to be # set on a per-app basis? (If so, they should probably be driven by a # file in the test dir.) -proc run_display_test { dir cflags gprofflags } { +proc run_display_test { dir cflags gprofflags tflags } { global srcdir MAKE CC CFLAGS LDFLAGS LIBS BUILDDIR set stripped [string map {" " ""} $dir] set testdir [string map {" " ""} "$dir.$cflags,$gprofflags"] @@ -58,7 +58,7 @@ proc run_display_test { dir cflags gprofflags } { set tdir "tmpdir/$testdir" send_log "create dir: $tdir\n" set output [run_native_host_cmd "mkdir -p $tdir"] - set gprofng $BUILDDIR/src/gprofng + set gprofng $::env(GPROFNG) set fd [open "$tdir/rules.txt" "w"] switch -regexp -- $testdir { @@ -80,6 +80,7 @@ proc run_display_test { dir cflags gprofflags } { set make_args "-f $sdir/Makefile srcdir=\"$sdir\" builddir=\"$BUILDDIR\" \ VPATH=\"$dir\" CC=\"$CC\" CFLAGS=\"$cflags\" LDFLAGS=\"$LDFLAGS\" \ + TARGET_FLAGS=\"$tflags\" \ DISPLAY_FLAGS=\"$DISPLAY_FLAGS\" \ COLLECT_FLAGS=\"$gprofflags\" GPROFNG=\"$gprofng\" MAKE=\"$MAKE\"" set output [run_native_host_cmd "cd $tdir && $MAKE $make_args all"]