From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2069.outbound.protection.outlook.com [40.107.94.69]) by sourceware.org (Postfix) with ESMTPS id 0FCAE3857C71 for ; Mon, 31 Jul 2023 14:31:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0FCAE3857C71 Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OvRu/Idki5/pxaXAGAAot95rz0Nm093/PVduSrtPySSsGnXuHRtMrFnJT+H3jL0R/GJhFOPM8UyfvI9x4ENrX5lkL5pzmHSmvUQAk5p3FJ6P/JLncH0OXbcyFcObwTuZA55EhknygjaxwKGotLmu6pN1TZ1oUrv0SVKpKv5KpHTlj5l5l8NDV2EilD1j+3DBrSgd3LH5uCfOFMc7vcOid/8MtVsEwbUK2XgLO7xNCytQUo0aI2nDYEpziWzY/dm6eqO6fm0SXHQs2Nve7PdyQJ3Ccz6GiIlieHzeN1AWPlYEdlMbQHSBFC06Ph1Mi7Fdhq12aosQwH/RQxJ7eEv2fw== 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=foMICnD2ltR+LrsXMGvh5+WcA2AgFqsJfEmCGZp32+k=; b=VW3luih2Bn+7PUYEY3Q9ilg3q2g1qMTV59/ZAFRK+MtB+qndZEE6VhpgHYbZj7kpakN+ppCOzt7pkoTBteyNPPdTojD3Q2ehgutAF4RpsCs1Lt10MbpIUr2cpFEkcV+Ato844IUDa61pviFKIxLQ/GB2kiAgvFb2rdTq8MRkXLyoe6FnhplDWfwCKyTrNfUmOHMT4VHF0tIZadYVbHuqgnk/QddKLAGnFWAYg0W3IzntNf67a2t6dcYghRtu+ZbZPYUXo1OgqYdmW7E7mp+TooCifTG11mxc+yGGi/CyVXWuEdAehnNwootWIrzioqAmlm+nhksduWAZEh9WFdMGAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=foMICnD2ltR+LrsXMGvh5+WcA2AgFqsJfEmCGZp32+k=; b=UFVXH3GBgHPvTfgU+HI7AN0KnxkdSnFcpX6jGBh5eABooLf3onxTQIbkporHtDvCq00ptvgOj4TT+Ap4E5aQTXc3FikBOVk5oOMs7Q1Y8TjHpdy6kumay1slhEi83EJzkqmcbTLPLrAu3s2RoTPImp/yZewFSUlu2wjADDCMQGo= Received: from SN7PR04CA0082.namprd04.prod.outlook.com (2603:10b6:806:121::27) by PH7PR12MB9203.namprd12.prod.outlook.com (2603:10b6:510:2f2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.41; Mon, 31 Jul 2023 14:31:00 +0000 Received: from SA2PEPF00001504.namprd04.prod.outlook.com (2603:10b6:806:121:cafe::ae) by SN7PR04CA0082.outlook.office365.com (2603:10b6:806:121::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44 via Frontend Transport; Mon, 31 Jul 2023 14:31:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SA2PEPF00001504.mail.protection.outlook.com (10.167.242.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6631.22 via Frontend Transport; Mon, 31 Jul 2023 14:31:00 +0000 Received: from khazad-dum.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 31 Jul 2023 09:30:46 -0500 From: Lancelot SIX To: CC: , Lancelot Six , Pedro Alves Subject: [pushed v2 1/2] gdb/testsuite/rocm: Add the hip_devices_support_debug_multi_process proc Date: Mon, 31 Jul 2023 15:30:30 +0100 Message-ID: <20230731143031.313937-2-lancelot.six@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230731143031.313937-1-lancelot.six@amd.com> References: <20230731143031.313937-1-lancelot.six@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001504:EE_|PH7PR12MB9203:EE_ X-MS-Office365-Filtering-Correlation-Id: 8f410186-1039-4d2c-c9e8-08db91d2c2db X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bCBlbcev82wodqqRk8zYPve4hFY4RFKKHN3kSeM2ucfd5J0SjW+tlmhPKjrtvF+x/eeCOJNdzTJE1wPCdMsX0SqGvosvbIcxXn9frUqbxhBAxmnDRbOJKEW3/jqhns0b+RJHsNYOUbKV0Im02vIz4PajRfA5Gt9RWUjqYkVkRYzN92nNxIlClvJi3N67tP19Yj56hWg38P+qg7MJmOLptIT0a6JJsDAzt5IQs3D94tN/G54xMshCjAkwCqlG+M6KEbNArMtcC17DDCrc6OtvBC+nVMFp+XZFWxNgGLw34wIQhhc98cxzuFw5vcV4fDG3QqpQgK3k9332QLpx4+lVCL3AUB8PU88EawStFYqJzacoZSPgGhbh+lR3KIbOeEGnnFMDz+RS8DxkV9aK1apHTn21h12nC4HXK4rTkk17e6Ilg26tO9YG7PZj0rk8f2BjCYx8KvFnst44uNce+vwoHQtaj3jUAmx968neYgezZldkF4SwgtivhZjzJsb//Rb2KnH5z+7Nv2ck6eI8+pb95KDmiEmQvU/M+pYEB4H2AoI6HU5paamQ6PbpACxNsV1NxVjna8lUbwolzQV71o92VLo5T2ogJ+k7pHcp9P6rmhREo5e1tlqSaQiJuSxv8Rzw9XIB3DSS0g9HFaYUJlUHDCwJUPC97S11Aj1utnfGnoxdtWxPVWm2SDmep5ZUx7odRynRn0sRwV9iKrmVxZ+vngpYVR4TZY56TGS6+IuNIywsJ0WZYj2lpMHY9yo1QZZ1kqBdyOoCsjkr17Xfd5pBtA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(136003)(396003)(346002)(376002)(82310400008)(451199021)(36840700001)(46966006)(40470700004)(47076005)(36860700001)(7696005)(36756003)(16526019)(40460700003)(40480700001)(2616005)(26005)(1076003)(83380400001)(186003)(336012)(426003)(70206006)(70586007)(54906003)(41300700001)(81166007)(356005)(82740400003)(86362001)(316002)(4326008)(5660300002)(6916009)(8676002)(8936002)(2906002)(6666004)(478600001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2023 14:31:00.0619 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8f410186-1039-4d2c-c9e8-08db91d2c2db X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001504.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9203 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 List-Id: From: Lancelot Six It is not possible to debug multiple processes simultaneously on all generations of AMDGPU devices. As some tests will need to debug multiple inferiors using AMDGPU devices, we need to ensure that all devices available have the required capability. Failing to do so would result in GDB not being able to debug all inferiors properly. Add the hip_devices_support_debug_multi_process helper function used to ensure that all devices available can debug multiple processes. Approved-By: Pedro Alves --- gdb/testsuite/lib/rocm.exp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gdb/testsuite/lib/rocm.exp b/gdb/testsuite/lib/rocm.exp index 389d73bcaa5..98a3b308228 100644 --- a/gdb/testsuite/lib/rocm.exp +++ b/gdb/testsuite/lib/rocm.exp @@ -166,3 +166,23 @@ proc with_rocm_gpu_lock { body } { return -code $code $result } } + +# Return true if all the devices support debugging multiple processes +# using the GPU. + +proc hip_devices_support_debug_multi_process {} { + set unsupported_targets \ + {gfx900 gfx906 gfx908 gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032} + + set targets [hcc_amdgpu_targets] + if { [llength $targets] == 0 } { + return 0 + } + + foreach target $targets { + if { [lsearch -exact $unsupported_targets $target] != -1 } { + return 0 + } + } + return 1 +} -- 2.34.1