From patchwork Tue Jan 9 18:31:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Mezentsev X-Patchwork-Id: 186508 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp304568dyi; Tue, 9 Jan 2024 10:31:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFb9KU2mV4Kw+oDoqYuepYMXiyJN1m9XdTZufW9V2QUl2iWoX4kEP41trgJmVV0hdBIdY83 X-Received: by 2002:a05:620a:1351:b0:783:2b94:8eb5 with SMTP id c17-20020a05620a135100b007832b948eb5mr1561435qkl.144.1704825097156; Tue, 09 Jan 2024 10:31:37 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1704825097; cv=pass; d=google.com; s=arc-20160816; b=f69GDqBZK5T+pSKBq1MwQteR23pDefj/o4bKqAYUz0z5gNnmzJzbLCtOYIhdCVHFmY TR7wbezdKuwTwSHbQ/WLAZo/73UzXXPJgVnZ4dNdk8Ps1di6ccv/oOhs82773vqGdnj4 B8tL+8Sk+kWu3zkagq18zXcw/hHDkjPBhRSe+UoazaXfc2U7aAw37M51S1ql1gGW6mbG H1wNZRlMPuJLiG3rli2xQKAgia8iAmgWxjXZn3B3Q+8eh4S8wGYWc8Os9PSz4oaOPhRq lV8OlR0LaCh/rSvT3/Zvj8VUnNjXkfSgfRvk0fWKhl0MiDbl0Og8R/FfqDM0BRDaT+Q/ Qr7A== 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 :content-transfer-encoding:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=ZeGN0YCOHqepuOhIwOW79eE11DHtjr9OSmdtVSgAsRU=; fh=rGgRskdXqkw/EDUeDqnE3q/qQuWE7ZzID6eKNBELT+8=; b=kPq2YKNxZlGvAkwwOOQEPz333HM8M7exji2LOunpH/OjMXBmIrLWqV2FxlxqWA6KOu p7MSkM1MgowlJBY2fslAxMJHuDcWGP0fGkR72RIds249X4zNmlcwHTUrSki4AK0N2nkB zIsNPR6t3MP7eV0JLf/y06VLIPmJVeTipZpGrqL+hpYHSBvJc/VWsKeZjNArI6zM7JFb mcBwAxADgsmLVc/2ICZa3ISLbwM5qyXRxpmfTf272faHop5fzL7/wcGEgQ0IwAsmNZ3E s51F4xRYIi7r4Su6Wc0h2YIWMLLnh6yvztI1KHuSV3ylInT2K8W2WdkOcIOtxkMYTmvL 0QvA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=eaeRnvjl; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=PCK+MMUm; arc=pass (i=2); 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=oracle.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id sq20-20020a05620a4ad400b0078151aaae56si2561748qkn.223.2024.01.09.10.31.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 10:31:37 -0800 (PST) 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=@oracle.com header.s=corp-2023-11-20 header.b=eaeRnvjl; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=PCK+MMUm; arc=pass (i=2); 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=oracle.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9159E385841C for ; Tue, 9 Jan 2024 18:31:36 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 77A0A385842B for ; Tue, 9 Jan 2024 18:31:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 77A0A385842B 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 77A0A385842B 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=1704825087; cv=pass; b=moz/LYD2cvAniw4FkxFW8x5AbyYAEi390JzR6tq5eb8vDpkzO2uiIliM0mLXyDtZr0qEc4cGTMhwzci5KM9yLfd4qb635+BqH2XWWD5947VB6ps19X23N+qhKh1pPkX6YkqvIWVvL7i2ZB5bDgDJ9o773KfOG+gayIx3G6jnWhY= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1704825087; c=relaxed/simple; bh=ql3wwr2YI1UDmTjiTlVWbbFHyBgnjNeSAOtA2sL7MHc=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=wr+0iaYWHooJh7Spjl75RgdpH2jI125iWaSxJL3Ag6autwPfpuwV68VW9ShK/s3w1E4A7os6Nm15b/lf5V2PaYKlk23ajjvpARdzTfWef2Ff+VyGtjBVpqND5Ymn8iN70CKQi636wPpsw5L57QZbD7a8+z7CwkKy3mj/I7O863E= 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 409IEvYo008033 for ; Tue, 9 Jan 2024 18:31:19 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=ZeGN0YCOHqepuOhIwOW79eE11DHtjr9OSmdtVSgAsRU=; b=eaeRnvjlsT9xEbBY/+l4IcTHpX6AHiUWXot2iDTYQrclfp0BxtObkFaMNm6+0UY08a9m +tjV5MJEDc3bvm+tsnNvM/zZHke5hBf/dEc6JF0JD0zBL3V3SEAEKW6XbwAj8OrWCYFq 0qZVo+o98W4ADeHiBsAMlF1aJgh3DTEc3ZZ/QZRrLHwMTL4gpnFzMH3/dUc76S5bRGWt 0Pjuirin7WLQfBPEa4tVkvA4Ym+fir5MaEkN2eQ8sBXz1KgphJUgiYO1EPGi9uBWs7Dz WTVZsFufxLA/ujsbe0LDXzk1GNzWF/OMdLWaPWcjnsVz2nNACxBSutlqbRg8zlmy1Twk fA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vh9r98bhx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 09 Jan 2024 18:31:19 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 409I5gt6030111 for ; Tue, 9 Jan 2024 18:31:18 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3vfutme4jk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 09 Jan 2024 18:31:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G3yzT835cltIUqjAvgWbLkw6Lwn5s2P9bQh0xP4elsgEQ82j1328XZZUmstwI81JZLrI+ixlIcKu6bOB1eiv0gkLHXVPy5jyogt1uXzDcf2c7OgtcCUBhrUb7psINqN/qnOfftnVyuqTNk6pY0TRQFZu9bo0HsAMeR3CwZj8KVlsNhux0H4tFy5j7hT4FbeQWOnlx/60GqilZIeOkHdFgQd8bWguU8e9UKhL1+vmfG/1E5t9WRc+6mA/PPCvUnBHPADl8CBZm2xixAybQrpAsTS6JnuEBpWTDa67RUHFJARlij04L2q8JRFiytQ0CdElxzSikRyAkyCdjk8MrpNe5g== 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=ZeGN0YCOHqepuOhIwOW79eE11DHtjr9OSmdtVSgAsRU=; b=IRjRCnqtC6MXal4pje8K3Q2OSxWqQQYzhBgkxzPzu50A7HXc7fkEtNsGyl1TZiaz9LTsMGq7d/HGTM4sUUHaA5uMQihAhn2FXZ1ixp36hA4XE4TEqKOKMj8TZr4DxBIzSSTTobzVSoi4S2OPJHx+66ES01xcV3WvX2LRvtYEBxDhVsxT+RqUWDiz+CogkSKucWykvODiXaJgpdIJtoizkfrDVXrQpQE1/fpUvl7rdbgFqxCsGFZLGN/Tlzpf9wLzRQLGHrQWbmq41BbGQ4hTizIOj3/GUj2lTRiCM7AH2QR23jIPSLT3KGVQhSZSRzZg0XTzig0OswaiMSRCQchd3g== 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=ZeGN0YCOHqepuOhIwOW79eE11DHtjr9OSmdtVSgAsRU=; b=PCK+MMUmmnYHQHGvKtUaS+5poxFXavRd5Iwq78NDxec7/BjAoJqlHZWs94jLPalPbm7rE3ahGRb0p/ae42Ycxu5/rSAlAu9s/ME0mUhLEolkxuF2lO24VJTee1ZGbIIMb4uzit/+hO6XPqVzEFidj8r+uPetOsUOpgs0LHA4c90= Received: from SA2PR10MB4636.namprd10.prod.outlook.com (2603:10b6:806:11e::10) by MN2PR10MB4336.namprd10.prod.outlook.com (2603:10b6:208:15f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.23; Tue, 9 Jan 2024 18:31:14 +0000 Received: from SA2PR10MB4636.namprd10.prod.outlook.com ([fe80::5b9b:a8a:21f6:a505]) by SA2PR10MB4636.namprd10.prod.outlook.com ([fe80::5b9b:a8a:21f6:a505%3]) with mapi id 15.20.7159.020; Tue, 9 Jan 2024 18:31:14 +0000 From: vladimir.mezentsev@oracle.com To: binutils@sourceware.org Cc: Vladimir Mezentsev Subject: [PATCH] gprofng: add an examples directory Date: Tue, 9 Jan 2024 10:31:08 -0800 Message-Id: <20240109183108.1044974-1-vladimir.mezentsev@oracle.com> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: PH0PR07CA0056.namprd07.prod.outlook.com (2603:10b6:510:e::31) To SA2PR10MB4636.namprd10.prod.outlook.com (2603:10b6:806:11e::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PR10MB4636:EE_|MN2PR10MB4336:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ca94fe3-d490-41a4-84b4-08dc11412930 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2t+fliFYmmbO4oRyTLJOnFws3m39A1o7JPRvsJo3r+lDR0/1PoGl8fuONllQM2Bf2xJdGYZ8NteX/Yjj5ZnjT7tFlK6dsXh8dtTSk1ditUf74zzDrEKoZRvawK0TYJMMrx16Y9aiLYETqe0SFD1zWSeV0RLEjekvu+p4tGTDgHXzGyvnKFqsN0x/qDwNBrqYcM3xXx/yozURNotaHsnhhK/QIgK7gaTsku2s8a0mdmzQFWEc5l/W4iZQ/nXvY4mfC+GMXueu7KBZVW2Fu4tVrgEhhsmy18iTKQr3fo+FCLapgCoa/wRoAa4g4TWccalORq+0lkXB/1YogIc83I4UJVkzlr0WK4KPrS082GhhWTwk4vxUF4uY/EW+5uKa3tO83DN4zayjeBZzj/tR8x+YZqhY7IrniObFFEN8gor4+fXSSJ1hmwZDfdE93CzrDmzwc6LAo2sFtx9Ozq1X5yZh6Qf9lBHQjOnuN57RkdItlRU1jJ30YBcgXdEYB5mBvkkBDZs5r57wN7awdWJ7fJFwO2Nkes6XbaHTmD4idiXDQHTAc5KE8fWePr7pBejmRxKNSFk4zk92Bov3gxuXHFtjAJCY2qngBQu0Lg8Aa4BaG46P3ahV+mI+XmaBCLL/NUvw4t0VBuZWJ39XKliWJvRmMw== 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)(396003)(366004)(346002)(376002)(136003)(39860400002)(230922051799003)(230173577357003)(230273577357003)(451199024)(1800799012)(64100799003)(186009)(2906002)(38100700002)(30864003)(5660300002)(86362001)(41300700001)(2616005)(316002)(36756003)(8676002)(8936002)(6486002)(9686003)(6512007)(107886003)(66946007)(66556008)(6916009)(66476007)(1076003)(478600001)(6506007)(83380400001)(6666004)(4326008)(2004002)(579004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PU+sFBfc4x+fe3aidgy6KoSg10XAZhEj0IYxfz5m3IG52Zp4fVgbtXh8bMpO+c6YIHGcgy4uJ+MVNTLG5WPjaZk+q8kKpEnKRSYc9EV8RfqpBDpOym7QSVJZdX6DZX38x8Cp8G3Z2ax25UuZo3kI+mmAFAkwyCQvVi3IOYMQVfCulSjjeOMDqsAnC5QuEJvPu2GtcAGYAIE+q1aDQOQQ+ZBD0/AHoyyaIqZQyLB4mnS/cWbmFBz45ZHY1inkOMRyv/Q2PO28U1i9fSSOWJQOouP3mO7EUimgtjoeLxN/VxC/6MLnP95YdgddtB0d57+CohY0jVKVOD6QDZw8u3aJNx/pMQhm81nHcsU6AvpR4t0TmjhOCA82dGjA3jKHRGeMg4VppegOd7+ocAjEtKKEeUyxpDV9aFxApBvviXRq6TofrO9bFR7UYocAcoGazXKmOEwMZnSqAjzolprajurmaSz0S0XJvGLDDr0RTE5YevAcLptEIwGq1kFTaHEK5gBDQJb7H0T6XYxu4c7SR2nRqIQ7ZFKDeMluSGeobf4+i58hHMiEDk5+ddzh0u8P2/rdhTlyDortkC5PYgiOOALsGSNvfI0irUvxjmQe9TBwdaQpPD1c8KgukdCyYH2+fhubDlCmAt0ToHqNDXrTURQNyp8Ed0ZwFQaIAGhg0F0CBenMJU63RqcTpVlxr5K2aaNsBwcDRErhxdtShW52AXWOhfL1iiRMijrThOddmCugNusUyXraH/g6vpG5XvrmoHW4vDFRJnMREle1Ygy5CRRnKbAO4UBTnENuI038f7wQNZs02QndCY3CGOpPEjqQhB5g16QWkUO8ToyxqPm0EfswH+2yXq23jv+mSecCx19Zi4talunQ4E/I9flTrV1aASY4sPWLebToTZbDe4vZbIWZ3ybm08rvGFWzi5of+lti765SZhpxuJLZS2S+HFnN5j007eBg4C5TyYdNp8PwZBwttxMTvjQzhLcON6Fxz3XOQiRSu7I9VuOrsaNL/VBzPw6OCQNuVc5GgSn+zUMwIcHcTLK3rT48W0Y03QlywFQw8i3WdvZBYhbA8eATVkW2cFzqqCnP7L9MvMedNIy5wjmBv63WF3s9NbLKX/o+TPx7Lq7my99JvKobRVEtqurg0PCFGlFYxx1T1uc1Y5Nd+tphYOB/ulkpjBPVJrWAvJVK4aq+UVvXRdWMIXqO/Yw98iJHqN7JPKjwH6cb8XqYO0gYIwjMZXIgpOgTAHnKoNDfUeQFtu9ZRogBgTyK311R7s3uHRlJILokrjDC5Kl9ChiPgUyCQERiMG13iZFiBHCQT7WGBnQiVb4U1Ua0ZDnmfog6WC/xI7eW5HQM9G4rffC6kljKJnhEqIow392MgI5v3kPKLIU6t+wT0ZPvMCYmgsS1VVJT2sIfIxzkywgN7VqO10M4UeTHnw1W4LnBRCXo8cGuF0Ve2Xh8tC1PwR3KKI1fH7fUwz/JVJX3s+WUHO12zG6XTYSftiKYs05/7wwSe438EOkMmN2xiwFyE0l3HmcRxPiwNooekHYhVMr+k5JC/u5vUbpD9BGDB6qAp+8u9X5vx5kN4DMSASPs75F6VX74txa9XPTYYk3Fd1As+re3s2k7jzcv4qzcUDWFvJkwUub5nqU1R3ncc8OtnmhdVz/o X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: hYU1rOJn5JOy75v7XDBQJH3KpieOXVlsT0HMvjHr5OIH+NneE+dC6ubTh6MSHzdV35+zDopCSVsf729ltre68IhZ7Bi+y/9lmzIqaoiXJ8eSRHy1Fr4DJr7Y+7sJxdFWBBSOofTSd4kg1WAhInNxVYJlI/JQIsB5MJK5mDJFahqSSsvtaP4eqDXt5ipkN98y8LwYcv3TnwaeVoslGSy+jqtdQz6dnqhO+vZrEhp/vdWTaG4m82lym2tZ5fU94dqsO98huRG48Vwi1CCE24zv1ObP6RpsGjlR0+cos80ZpsRJ/8NQWu2iA/N7v5TWLssZs8S7Y9RzSc4dsJhm6P4DwRrpjucKgQ483Ur0vLBCffP4IpmG70LBzyWRiR6i3fcb4V8zFEsw+VWv1r6HnBePB4ShCyJtBKPgQZdMCYhSW0NyXxlBTDXANCidYzDpO5quA3AsUOFPykq1g2FXvxbAJqDjQ2T/de8R7m3qvCMljXlE7bGKqHIdmfNoJlt6DBTR2nRbxLJfjK9+6+ZQ1SVwVb7m6cf1PMGVVOL7uQAG5jVqYR81ZJLY0R8t0NNNrcwXVCQUlg2rLE20S5ztNqsDeCA+o/r8alIw01hWItqOp58= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ca94fe3-d490-41a4-84b4-08dc11412930 X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4636.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2024 18:31:14.3308 (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: AFk6Sfp4wADb+QHGjPfWp28IMoOwOlBhmtLnEArjGXm1w3AJTK8Gz4xhgPTrBRDm5G8HGeBxSrr5oknq0SP0k1ti56okHCRFN8MDDnbG/ro= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4336 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=2024-01-09_09,2024-01-09_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 adultscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401090149 X-Proofpoint-ORIG-GUID: 3mPOE2HV3bE00bctv6OfI6V4hzQJm9pn X-Proofpoint-GUID: 3mPOE2HV3bE00bctv6OfI6V4hzQJm9pn X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, KAM_SHORT, RCVD_IN_DNSWL_NONE, 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.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787638681099850859 X-GMAIL-MSGID: 1787638681099850859 From: Vladimir Mezentsev This directory contains example programs for the user to experiment with. Initially there is one application written in C. The plan is to include more examples, also in other langauges, over time. In addition to the sources and a make file, a sample script how to make a profile is included. There is also a README.md file. gprofng/ChangeLog 2024-01-08 Ruud van der Pas * examples: Top level directory. * examples/mxv-pthreads: Example program written in C. --- gprofng/examples/mxv-pthreads/README.md | 158 ++++++++ .../mxv-pthreads/experiments/profile.sh | 79 ++++ gprofng/examples/mxv-pthreads/src/Makefile | 70 ++++ gprofng/examples/mxv-pthreads/src/main.c | 374 ++++++++++++++++++ .../examples/mxv-pthreads/src/manage_data.c | 148 +++++++ gprofng/examples/mxv-pthreads/src/mxv.c | 78 ++++ gprofng/examples/mxv-pthreads/src/mydefs.h | 117 ++++++ gprofng/examples/mxv-pthreads/src/workload.c | 91 +++++ 8 files changed, 1115 insertions(+) create mode 100644 gprofng/examples/mxv-pthreads/README.md create mode 100755 gprofng/examples/mxv-pthreads/experiments/profile.sh create mode 100644 gprofng/examples/mxv-pthreads/src/Makefile create mode 100644 gprofng/examples/mxv-pthreads/src/main.c create mode 100644 gprofng/examples/mxv-pthreads/src/manage_data.c create mode 100644 gprofng/examples/mxv-pthreads/src/mxv.c create mode 100644 gprofng/examples/mxv-pthreads/src/mydefs.h create mode 100644 gprofng/examples/mxv-pthreads/src/workload.c diff --git a/gprofng/examples/mxv-pthreads/README.md b/gprofng/examples/mxv-pthreads/README.md new file mode 100644 index 00000000000..28450a6e2a8 --- /dev/null +++ b/gprofng/examples/mxv-pthreads/README.md @@ -0,0 +1,158 @@ +# README for the matrix-vector multiplication demo code + +## Synopsis + +This program implements the multiplication of a matrix and a vector. It is +written in C and has been parallelized using the Pthreads parallel programming +model. Each thread gets assigned a contiguous set of rows of the matrix to +work on and the results are stored in the output vector. + +The code initializes the data, executes the matrix-vector multiplication, and +checks the correctness of the results. In case of an error, a message to this +extent is printed and the program aborts. Otherwise it prints a one line +message on the screen. + +## About this code + +This is a standalone code, not a library. It is meant as a simple example to +experiment with gprofng. + +## Directory structure + +There are four directories: + +1. `bindir` - after the build, it contains the executable. + +2. `experiments` - after the installation, it contains the executable and +also has an example profiling script called `profile.sh`. + +3. `objects` - after the build, it contains the object files. + +4. `src` - contains the source code and the make file to build, install, +and check correct functioning of the executable. + +## Code internals + +This is the main execution flow: + +* Parse the user options. +* Compute the internal settings for the algorithm. +* Initialize the data and compute the reference results needed for the correctness +check. +* Create and execute the threads. Each thread performs the matrix-vector +multiplication on a pre-determined set of rows. +* Verify the results are correct. +* Print statistics and release the allocated memory. + +## Installation + +The Makefile in the `src` subdirectory can be used to build, install and check the +code. + +Use `make` at the command line to (re)build the executable called `mxv-pthreads`. It will be +stored in the directory `bindir`: + +``` +$ make +gcc -o ../objects/main.o -c -g -O -Wall -Werror=undef -Wstrict-prototypes main.c +gcc -o ../objects/manage_data.o -c -g -O -Wall -Werror=undef -Wstrict-prototypes manage_data.c +gcc -o ../objects/workload.o -c -g -O -Wall -Werror=undef -Wstrict-prototypes workload.c +gcc -o ../objects/mxv.o -c -g -O -Wall -Werror=undef -Wstrict-prototypes mxv.c +gcc -o ../bindir/mxv-pthreads ../objects/main.o ../objects/manage_data.o ../objects/workload.o ../objects/mxv.o -lm -lpthread +ldd ../bindir/mxv-pthreads + linux-vdso.so.1 (0x0000ffff9ea8b000) + libm.so.6 => /lib64/libm.so.6 (0x0000ffff9e9ad000) + libc.so.6 => /lib64/libc.so.6 (0x0000ffff9e7ff000) + /lib/ld-linux-aarch64.so.1 (0x0000ffff9ea4e000) +$ +``` +The `make install` command installs the executable in directory `experiments`. + +``` +$ make install +Installed mxv-pthreads in ../experiments +$ +``` +The `make check` command may be used to verify the program works as expected: + +``` +$ make check +Running mxv-pthreads in ../experiments +mxv: error check passed - rows = 1000 columns = 1500 threads = 2 +$ +``` +The `make clean` comand removes the object files from the `objects` directory +and the executable from the `bindir` directory. + +The `make veryclean` command implies `make clean`, but also removes the +executable from directory `experiments`. + +## Usage + +The code takes several options, but all have a default value. If the code is +executed without any options, these defaults will be used. To get an overview of +all the options supported, and the defaults, use the `-h` option: + +``` +$ ./mxv-pthreads -h +Usage: ./mxv-pthreads [-m ] [-n ] [-t & LOG +``` + +## Additional comments + +* The reason that compiler based inlining is disabled is to make the call tree +look more interesting. For the same reason, the core multiplication function +`mxv_core` has inlining disabled through the `void __attribute__ ((noinline))` +attribute. Of course you're free to change this. It certainly does not affect +the workings of the code. + +* This distribution includes a script called `profile.sh`. It is in the +`experiments` directory and meant as an example for (new) users of gprofng. +It can be used to produce profiles at the command line. It is also suitable +as a starting point to develop your own profiling script(s). diff --git a/gprofng/examples/mxv-pthreads/experiments/profile.sh b/gprofng/examples/mxv-pthreads/experiments/profile.sh new file mode 100755 index 00000000000..f8812a29abf --- /dev/null +++ b/gprofng/examples/mxv-pthreads/experiments/profile.sh @@ -0,0 +1,79 @@ +# +# Copyright (C) 2021-2023 Free Software Foundation, Inc. +# +# This file 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 of the License, 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; see the file COPYING3. If not see +# . +# +#------------------------------------------------------------------------------ +# This script demonstrates how to use gprofng. +# +# After the experiment data has been generated, several views into the data +# are shown. +#------------------------------------------------------------------------------ + +#------------------------------------------------------------------------------ +# Define the executable, algorithm parameters and gprofng settings. +#------------------------------------------------------------------------------ +exe=../experiments/mxv-pthreads +rows=4000 +columns=2000 +threads=2 +exp_directory=experiment.$threads.thr.er + +#------------------------------------------------------------------------------ +# Check if gprofng has been installed and can be executed. +#------------------------------------------------------------------------------ +which gprofng > /dev/null 2>&1 +if (test $? -eq 0) then + echo "" + echo "Version information of the gprofng release used:" + echo "" + gprofng --version + echo "" +else + echo "Error: gprofng cannot be found - if it was installed, check your path" + exit +fi + +#------------------------------------------------------------------------------ +# Check if the executable is present. +#------------------------------------------------------------------------------ +if (! test -x $exe) then + echo "Error: executable $exe not found - check the make install command" + exit +fi + +echo "-------------- Collect the experiment data -----------------------------" +gprofng collect app -O $exp_directory $exe -m $rows -n $columns -t $threads + +#------------------------------------------------------------------------------ +# Make sure that the collect experiment succeeded and created an experiment +# directory with the performance data. +#------------------------------------------------------------------------------ +if (! test -d $exp_directory) then + echo "Error: experiment directory $exp_directory not found" + exit +fi + +echo "-------------- Show the function overview -----------------------------" +gprofng display text -functions $exp_directory + +echo "-------------- Show the function overview limit to the top 5 -----------" +gprofng display text -limit 5 -functions $exp_directory + +echo "-------------- Show the source listing of mxv_core ---------------------" +gprofng display text -metrics e.totalcpu -source mxv_core $exp_directory + +echo "-------------- Show the disassembly listing of mxv_core ----------------" +gprofng display text -metrics e.totalcpu -disasm mxv_core $exp_directory diff --git a/gprofng/examples/mxv-pthreads/src/Makefile b/gprofng/examples/mxv-pthreads/src/Makefile new file mode 100644 index 00000000000..ef1c55aa77e --- /dev/null +++ b/gprofng/examples/mxv-pthreads/src/Makefile @@ -0,0 +1,70 @@ +# +# Copyright (C) 2021-2023 Free Software Foundation, Inc. +# +# This file 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 of the License, 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; see the file COPYING3. If not see +# . + +CC = gcc +WARNINGS = -Wall -Werror=undef -Wstrict-prototypes +OPT = -g -O +CFLAGS = $(OPT) $(WARNINGS) +LDFLAGS = +LIBS = -lm -lpthread +OBJDIR = ../objects +BINDIR = ../bindir +EXPDIR = ../experiments + +EXE = mxv-pthreads +OBJECTS = $(OBJDIR)/main.o $(OBJDIR)/manage_data.o $(OBJDIR)/workload.o $(OBJDIR)/mxv.o + +default: $(BINDIR)/$(EXE) + +$(BINDIR)/$(EXE): $(OBJECTS) + @mkdir -p $(BINDIR) + $(CC) -o $(BINDIR)/$(EXE) $(LDFLAGS) $(OBJECTS) $(LIBS) + ldd $(BINDIR)/$(EXE) + +$(OBJDIR)/main.o: main.c + @mkdir -p $(OBJDIR) + $(CC) -o $(OBJDIR)/main.o -c $(CFLAGS) main.c +$(OBJDIR)/manage_data.o: manage_data.c + @mkdir -p $(OBJDIR) + $(CC) -o $(OBJDIR)/manage_data.o -c $(CFLAGS) manage_data.c +$(OBJDIR)/workload.o: workload.c + @mkdir -p $(OBJDIR) + $(CC) -o $(OBJDIR)/workload.o -c $(CFLAGS) workload.c +$(OBJDIR)/mxv.o: mxv.c + @mkdir -p $(OBJDIR) + $(CC) -o $(OBJDIR)/mxv.o -c $(CFLAGS) mxv.c + +$(OBJECTS): mydefs.h + +.c.o: + $(CC) -c -o $@ $(CFLAGS) $< + +check: + @echo "Running $(EXE) in $(EXPDIR)" + @./$(EXPDIR)/$(EXE) -m 1000 -n 1500 -t 2 + +install: $(BINDIR)/$(EXE) + @/bin/cp $(BINDIR)/$(EXE) $(EXPDIR) + @echo "Installed $(EXE) in $(EXPDIR)" + +clean: + @/bin/rm -f $(BINDIR)/$(EXE) + @/bin/rm -f $(OBJECTS) + +veryclean: + @make clean + @/bin/rm -f $(EXPDIR)/$(EXE) diff --git a/gprofng/examples/mxv-pthreads/src/main.c b/gprofng/examples/mxv-pthreads/src/main.c new file mode 100644 index 00000000000..625c60484d1 --- /dev/null +++ b/gprofng/examples/mxv-pthreads/src/main.c @@ -0,0 +1,374 @@ +/* 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 program implements the multiplication of an m by n matrix with a vector +* of length n. The Posix Threads parallel programming model is used to +* parallelize the core matrix-vector multiplication algorithm. +* ----------------------------------------------------------------------------- +*/ + +#include "mydefs.h" + +int main (int argc, char **argv) +{ + bool verbose = false; + + thread_data *thread_data_arguments; + pthread_t *pthread_ids; + + int64_t remainder_rows; + int64_t rows_per_thread; + int64_t active_threads; + + int64_t number_of_rows; + int64_t number_of_columns; + int64_t number_of_threads; + int64_t repeat_count; + + double **A; + double *b; + double *c; + double *ref; + + int64_t errors; + +/* +* ----------------------------------------------------------------------------- +* Start the ball rolling - Get the user options and parse them. +* ----------------------------------------------------------------------------- +*/ + (void) get_user_options ( + argc, + argv, + &number_of_rows, + &number_of_columns, + &repeat_count, + &number_of_threads, + &verbose); + + if (verbose) printf ("Verbose mode enabled\n"); + +/* +* ----------------------------------------------------------------------------- +* Allocate storage for all data structures. +* ----------------------------------------------------------------------------- +*/ + (void) allocate_data ( + number_of_threads, number_of_rows, + number_of_columns, &A, &b, &c, &ref, + &thread_data_arguments, &pthread_ids); + + if (verbose) printf ("Allocated data structures\n"); + +/* +* ----------------------------------------------------------------------------- +* Initialize the data. +* ----------------------------------------------------------------------------- +*/ + (void) init_data (number_of_rows, number_of_columns, A, b, c, ref); + + if (verbose) printf ("Initialized matrix and vectors\n"); + +/* +* ----------------------------------------------------------------------------- +* Determine the main workload settings. +* ----------------------------------------------------------------------------- +*/ + (void) get_workload_stats ( + number_of_threads, number_of_rows, + number_of_columns, &rows_per_thread, + &remainder_rows, &active_threads); + + if (verbose) printf ("Defined workload distribution\n"); + + for (int64_t TID=active_threads; TID threads, with the number of threads specified on the commandline, +* or the default if the -t option was not used. +* +* Per the pthread_create () call, the threads start executing right away. +* ----------------------------------------------------------------------------- +*/ + for (int TID=0; TID] " \ + "[-n ] " \ + "[-t SMALL) + { + relerr = fabs ((c[i]-ref[i])/ref[i]); + } + else + { + relerr = fabs ((c[i]-ref[i])); + } + if (relerr <= TOL) + { + marker[i] = ' '; + } + else + { + errors++; + marker[i] = '*'; + } + } + if (errors > 0) + { + printf ("Found %ld differences in results for m = %ld n = %ld:\n", + errors,m,n); + for (int64_t i=0; ido_work; + int64_t repeat_count = local_data->repeat_count; + int64_t row_index_start = local_data->row_index_start; + int64_t row_index_end = local_data->row_index_end; + int64_t m = local_data->m; + int64_t n = local_data->n; + double *b = local_data->b; + double *c = local_data->c; + double **A = local_data->A; + + if (do_work) + { + for (int64_t r=0; r +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct thread_arguments_data { + int thread_id; + bool verbose; + bool do_work; + int64_t repeat_count; + int64_t row_index_start; + int64_t row_index_end; + int64_t m; + int64_t n; + double *b; + double *c; + double **A; +}; + +typedef struct thread_arguments_data thread_data; + +void *driver_mxv (void *thread_arguments); + +void __attribute__ ((noinline)) mxv_core (int64_t row_index_start, + int64_t row_index_end, + int64_t m, + int64_t n, + double **restrict A, + double *restrict b, + double *restrict c); + +int get_user_options (int argc, + char *argv[], + int64_t *number_of_rows, + int64_t *number_of_columns, + int64_t *repeat_count, + int64_t *number_of_threads, + bool *verbose); + +void init_data (int64_t m, + int64_t n, + double **restrict A, + double *restrict b, + double *restrict c, + double *restrict ref); + +void allocate_data (int active_threads, + int64_t number_of_rows, + int64_t number_of_columns, + double ***A, + double **b, + double **c, + double **ref, + thread_data **thread_data_arguments, + pthread_t **pthread_ids); + +int64_t check_results (int64_t m, + int64_t n, + double *c, + double *ref); + +void get_workload_stats (int64_t number_of_threads, + int64_t number_of_rows, + int64_t number_of_columns, + int64_t *rows_per_thread, + int64_t *remainder_rows, + int64_t *active_threads); + +void determine_work_per_thread (int64_t TID, + int64_t rows_per_thread, + int64_t remainder_rows, + int64_t *row_index_start, + int64_t *row_index_end); + +void mxv (int64_t m, + int64_t n, + double **restrict A, + double *restrict b, + double *restrict c); + +void print_all_results (int64_t number_of_rows, + int64_t number_of_columns, + int64_t number_of_threads, + int64_t errors); + +extern bool verbose; + +#endif diff --git a/gprofng/examples/mxv-pthreads/src/workload.c b/gprofng/examples/mxv-pthreads/src/workload.c new file mode 100644 index 00000000000..fca0e8115e2 --- /dev/null +++ b/gprofng/examples/mxv-pthreads/src/workload.c @@ -0,0 +1,91 @@ +/* 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 "mydefs.h" + +/* +* ----------------------------------------------------------------------------- +* This function determines the number of rows each thread will be working on +* and also how many threads will be active. +* ----------------------------------------------------------------------------- +*/ +void get_workload_stats (int64_t number_of_threads, + int64_t number_of_rows, + int64_t number_of_columns, + int64_t *rows_per_thread, + int64_t *remainder_rows, + int64_t *active_threads) +{ + if (number_of_threads <= number_of_rows) + { + *remainder_rows = number_of_rows%number_of_threads; + *rows_per_thread = (number_of_rows - (*remainder_rows))/number_of_threads; + } + else + { + *remainder_rows = 0; + *rows_per_thread = 1; + } + + *active_threads = number_of_threads < number_of_rows + ? number_of_threads : number_of_rows; + + if (verbose) + { + printf ("Rows per thread = %ld remainder = %ld\n", + *rows_per_thread, *remainder_rows); + printf ("Number of active threads = %ld\n", *active_threads); + } +} + +/* +* ----------------------------------------------------------------------------- +* This function determines which rows each thread will be working on. +* ----------------------------------------------------------------------------- +*/ +void determine_work_per_thread (int64_t TID, int64_t rows_per_thread, + int64_t remainder_rows, + int64_t *row_index_start, + int64_t *row_index_end) +{ + int64_t chunk_per_thread; + + if (TID < remainder_rows) + { + chunk_per_thread = rows_per_thread + 1; + *row_index_start = TID * chunk_per_thread; + *row_index_end = (TID + 1) * chunk_per_thread - 1; + } + else + { + chunk_per_thread = rows_per_thread; + *row_index_start = remainder_rows * (rows_per_thread + 1) + + (TID - remainder_rows) * chunk_per_thread; + *row_index_end = remainder_rows * (rows_per_thread + 1) + + (TID - remainder_rows) * chunk_per_thread + + chunk_per_thread - 1; + } + + if (verbose) + { + printf ("TID = %ld row_index_start = %ld row_index_end = %ld\n", + TID, *row_index_start, *row_index_end); + } +}