From patchwork Tue Mar 18 11:00:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Six, Lancelot" X-Patchwork-Id: 108291 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 0B8413858415 for ; Tue, 18 Mar 2025 11:01:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B8413858415 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=XXYJTiyt X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2084.outbound.protection.outlook.com [40.107.93.84]) by sourceware.org (Postfix) with ESMTPS id 5718E3858D3C for ; Tue, 18 Mar 2025 11:00:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5718E3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5718E3858D3C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.93.84 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1742295630; cv=pass; b=pxy6Lff6/cQP0RlkNSU3ScCwh+VgArMumXUbUGLMo9lXIlOpPmInL6rEFaJ9Pw89BlGLIJ0ouobTs6EorCdIzNyBe9k8AVlp5sF3itoosKLDdX6SEChSJz1GraPs90Hjmjw8qZNuSHA/yTeeB2vmxFTsBfUDqPyGE6ouXq/Hm9k= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1742295630; c=relaxed/simple; bh=HF40MI7UlSCSb66skbPMbbY5/0dTWTSxZ+LFh573Hc8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VpH9LS0DnIRzoUFtDTtOSNM0tpkOVhT6114tPnxqqls/ZYbR8er145asR/ghKf7Kap7TejgkczbyriMip5Ha4hwbqmfXUNDuEPPZVmrRkgih79gBVlI22eU30oZmsdeX52KATNifuOaEBO9kA+sZuW/YkkBVCADp7PMeTGdnZtc= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5718E3858D3C ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rB1O9LVqFupfxp5B2WK4XFlme7h2ypZvPuI6C4kzXNKxcNlTfRpCnDV2xEW6Oq9BMS02P+uXqu1bao+qSw8uy3TrNbjUwrnyKGpoUF5VFtvpdxAMjLdKR1WocAcq+ZKq07NO4GLMpSDHqZds73TW72XqerBDawj0V8R85nHHHBRHFxHW2Us06dz3DzwG69qJdKcHB+pqm97h455uVMiDqdvEUGvKHKzCr/d8Z1rDn14gEAqKs8e5hmsKzLQffehy4tkAzEE70WsY7tUE0Jlt+KX+PKwiJGEj8H4tB8T9s/a23fbhnhxR9tt81+s70+AZ0P+AUUXUtyba+LLUDRY/yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=hYVqJzDQtdg7gCvQkE1W/3dR5IOGKdY5bmSAqdfa8mg=; b=yevsCJQeIFZKHsujoovdw95HsdpdURa7+BTllmPyVbNLCFQ5ykuAMJKsVweMR0OVhI85Oein7jQ5v9JQ9ftxyqGgyyDP5PcxO2X6cEjnLCcrbPKIky14SlKlSQSh+m2qwZsGw2BMHUj0zx2Go/6JLA+Z35cwV/+OmFsCXZd6CFfG9XRs80VUAuIB/nXj/Hl6nIdu9sQ7xQRT6IfzQBVCACPQqplkBi9y7pwvv46RSaEDbpLEuwl9vYFYVBsNxIHTiApWaNwaRD75vPrF5TDGcr36NIga9STKqWcm+Sgscwu54gv9tRbF4WgujTyk49mUlvIawX35rjUQOdiyWhvZEQ== 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 (0) 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=hYVqJzDQtdg7gCvQkE1W/3dR5IOGKdY5bmSAqdfa8mg=; b=XXYJTiytiOP8v9x4z5cXTzSiGK2tBC1ywWLuXcaStWF/vOeLr10vx5dp4TtHsFsPHWdUNYTkyVfNP3jHMjuxWD9Ty6HZYhRJMdPIkxaFWhqBgnU8rPh5SXIQwUsfij8EG23q5FLIuhKJbdPoXcmKvxVr6OGUlocbleqedynuHII= Received: from SA9PR13CA0152.namprd13.prod.outlook.com (2603:10b6:806:28::7) by CY8PR12MB8299.namprd12.prod.outlook.com (2603:10b6:930:6c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.33; Tue, 18 Mar 2025 11:00:25 +0000 Received: from SA2PEPF000015C9.namprd03.prod.outlook.com (2603:10b6:806:28:cafe::fb) by SA9PR13CA0152.outlook.office365.com (2603:10b6:806:28::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8534.32 via Frontend Transport; Tue, 18 Mar 2025 11:00:25 +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 SA2PEPF000015C9.mail.protection.outlook.com (10.167.241.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8534.20 via Frontend Transport; Tue, 18 Mar 2025 11:00:24 +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.39; Tue, 18 Mar 2025 06:00:23 -0500 From: Lancelot SIX To: CC: Lancelot SIX Subject: [PATCH] gdb/testsuite/rocm: Dynamically determine if precise-memory is supported Date: Tue, 18 Mar 2025 11:00:10 +0000 Message-ID: <20250318110011.1638240-1-lancelot.six@amd.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015C9:EE_|CY8PR12MB8299:EE_ X-MS-Office365-Filtering-Correlation-Id: e3bcc34c-ff5a-4dfa-4a3e-08dd660c15f1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|36860700013|376014; X-Microsoft-Antispam-Message-Info: NwLEN/cJGtmi7CBA7PBMJ2g5+c6lv97yw1afqiaypsMWWfyE8AXPSTCC8LMlw0Q9yXP9hyToW0YeirYChzJE+NjHPaY1fvabeNJwJQoy3fznQuuuJQr7tNf+tioNzH1ybaAU53aUKWIqlOvljipqYbtp5TGYv39HnN7pgQEQkWhaJOb17EGMCXoNq4d49QIM44ObzF+t6gQNSakLkOjzFswcBt6EKHb+KbVDB1WLGdgfynlFX0sUQ68OkVmK0gFVliTnUpHSDOHuGKIr68XmER+LqyEgg9N20vj2T6e0ESgYRCbzdqNePVwdGPkRUNn4j5tPXl2aogN+vuBpIIiI408LBnxfITfipJFgXEReLOsLgQe2JDa5mVZroBh2Atr/MhPzeM8i6rdfiil2vHaoCUAz1D+sYQ7A/o5l85GOteoK93mRJ9+qWS7TR6tV5gQzyLKVT1U+Hy4qNiiz1NnlTgy0N0K8OtsdH5/Ht5cbgqLaZhyZ4HeuKGldHcAlvUOjg90NdneOaF5mLSNdn/BBei0ezpiWGySGFYXRAEFBZY/9qJUNVwU4O1dOrEkHqyADBiFQMCOiHj1VWNu4pQ5ppbd9GVbFfD+hooeLCjLIPWs2Mgm1N35p5RfLek7tw32XMXtH3CaGcVJnmwopIweTA1B2hX1RN6khN2O8GuOgcDI7+r2iq/EyLMENCbKFurpj3AwkGIvPlzCni7kFAbd85FEa35PzKIWw2y5FpF5WwgTMfk3UEJdw87uiQ/3pstcdW5xGFNL5EP2D7DYanApXESB/VIt03e944k8vEBVu3vNu6kN+hJR3QOenO+IJtKGRDDH63h18bSXgyD3nkOfS+NK3Zxjw1apsLiDsoXTM6j9myvN9ebuPl33sql8ZuROwMIZV18Y/kV+10sR6sK9Gx8c/HF/SnijDm+p91BRWjApDiF+veaXa9BvLSCt4roQgy/iLj3vav4cJFWy7YMsXomeQbDpYkh80LCP3JREGzJIv0q331jMKLRs8GX03jWRdENICsPic0kwuFTdAHi2IQVmZUFJwxEba6+90kp/FMd21f2kOk1+FYxq4tiA0yfbQAlaBRIVpDhx5k8r5MrpuYuXB+L0gd+k3W9JMH76A7/Gb0vn0YL7OyEYOFr0tWKAyxLQXut2ENqr9d5f94XuTFt/4X0DQoaBDJJXL3QVwRMDm4enOutQ/9TKX81gfL7YJRMnekli1s3+O1V0Qo9TRR4/q3qycnPis4Bs+RpAuQvzGE+yQFSkIJCU/qIASwgH46jEI8Mn3PJ9jxnRKfWApFGWFDm93qau3m4GzQPt1I513pVOg0mVWrloSzXqB1FDYDbWTyeyMmTPCGy0shBq20mJk6xLvt2AD0guGP+CNefDGE4L93pysuCn2Rp1sMU41YthTGoMPvkyqkR6vLqBVzCSv78SrP2eUh3e56t4g+IY= 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:(13230040)(82310400026)(1800799024)(36860700013)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2025 11:00:24.9628 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e3bcc34c-ff5a-4dfa-4a3e-08dd660c15f1 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: SA2PEPF000015C9.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8299 X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, LOCAL_AUTHENTICATION_FAIL_SPF, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org Currently, in order to know if precise-memory is supported on the system, we compare the available GPUs against the list of devices known to not support this feature. This patch changes it and instead probes for the device capabilities as advertised by the driver, and checks if all devices support precise memory. This is to accommodate for pending change in the driver https://lists.freedesktop.org/archives/amd-gfx/2025-March/121355.html Tested on gfx1030 and gfx1100. Change-Id: I9290c677c01015dfb509ca45895d8a99165b4b27 --- gdb/testsuite/lib/rocm.exp | 42 +++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 10 deletions(-) base-commit: a7e5d97c123b5164460a604a154a239fbcfadd86 diff --git a/gdb/testsuite/lib/rocm.exp b/gdb/testsuite/lib/rocm.exp index 3eb51dbb52f..ca581c4772f 100644 --- a/gdb/testsuite/lib/rocm.exp +++ b/gdb/testsuite/lib/rocm.exp @@ -177,21 +177,43 @@ proc hip_devices_support_debug_multi_process {} { return 1 } -# Return true if all the devices on the host support precise memory. +# Helper function which returns if all ROCm devices in the system have +# the CAP capabilities. Capabilities are defined in +# /usr/include/linux/kfd_sysfs.h. -proc hip_devices_support_precise_memory {} { - set unsupported_targets \ - {gfx900 gfx906 gfx908 gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032} +proc hip_devices_have_cap {cap} { + set prop_files \ + [glob /sys/devices/virtual/kfd/kfd/topology/nodes/*/properties] - set targets [find_amdgpu_devices] - if { [llength $targets] == 0 } { + if {[llength $prop_files] == 0} { return 0 } - foreach target $targets { - if { [lsearch -exact $unsupported_targets $target] != -1 } { - return 0 + set gpu_with_support 0 + foreach f $prop_files { + set fd [open $f] + while { [gets $fd line] >= 0 } { + set x [split $line " "] + set prop_name [lindex $x 0] + set val [lindex $x 1] + if {$prop_name eq "capability"} { + if {[expr $val & $cap]} { + incr gpu_with_support + } + } } + close $fd } - return 1 + + return [expr [llength prop_files] == $gpu_with_support] +} + +# Return true if all the devices on the host support precise memory. + +proc hip_devices_support_precise_memory {} { + # From /usr/include/linux/kfd_sysfs.h + set HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED 0x00040000 + + return [hip_devices_have_cap \ + $HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED] } From patchwork Fri Mar 21 14:46:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Six, Lancelot" X-Patchwork-Id: 108834 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 5D9F93857359 for ; Fri, 21 Mar 2025 15:31:40 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2061.outbound.protection.outlook.com [40.107.95.61]) by sourceware.org (Postfix) with ESMTPS id 7804A3858D35 for ; Fri, 21 Mar 2025 14:46:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7804A3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7804A3858D35 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.95.61 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1742568402; cv=pass; b=OJczeJ2JdP22yCH/fjDIuOuNt53rvdgn7hr5s/D4PsXJrm5ZyCCwLEQ0ztJTz5bwv+NqwHLC26tHxM+hm/t7wXs48HBsRhADLmoLqnwJmZJHBroW4o8rfHpJrG11eD3wd1wAkp72cyM2+70DCcAG78wwqWZY/LfoOfO7snH4KCM= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1742568402; c=relaxed/simple; bh=B+v/oJoKfVyESMcMtUN29ivJB/aWch8xkOVSBcrkgH8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=YrzGNJ4KmZcQUVR4a3xRYIxcWV9aIduVwtk/rwCfDCYCoyLoowpCk1bkJ5t/aSmEnB3h+tMYO4CXYeA+JazVrfG7b4WAyjho2RJv5koksOPppG1iqpnbuqhc9PVsRo3pmtdgqxs4DPcm863QFHPoTKVADO8zIXc1mpkjCtqCGMU= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7804A3858D35 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=u9a1U5LE ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kVvdzfSCoZ3EKJwi+ja5em80vMSVE/FhE0+aMEYS7TNhfxGK0BF/j3PIy7aVHhSr8xD+p07iLBGgoVy9WfFNby6winpC4q/MSSZGZrPuCrqjVI8jcZBtNeM6HoRM7YlvRCkNyuUsf6TusGH6Q8XH0pstKheuF4vuf3xufD7iF4dMU9G7SlplCKnpTdl9eMy7qQKpbK11uqeg/SKb7QhjumslL7IjyG6HchdeHruzSkubTIX5Yg297oQz/dbUvxvwlbpmULXJULTpCDI65fOGVxY9Vl941gQldg+DwrveZmzEpCNr7/+h7wiQDCTZNcU4R8Z85CE7RFOV3FTzHHAEBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=FxgjMdn2pWPnoE9ZxzP9bmZEA2cc54iTtSVsWAlCzG0=; b=JIEwSRfbWGR/VnB1dQseaEYxyjRVzP2LgsDwovRzBX02ViHnwI9nM6VJYkAdaLDJT4Z1OA4hjdYdt16LBwTV90sCOCKbN6VcDAS2aygGx2xlD2XIe0N1fDq4+6W+h0KzkEAguzS9kuYKzRKXwm2bDRMsP17tAkwFsK+jSD7U8j+fRMjL6V4DyKsuWiNDwvwzjG96ZJ9SN9VEZNZ7HG0+Y8aRtAco/kAjXDsCcTP2PJbzxrWknBZXl3GrRnBFZlAMHU/xBTecrnxzhDlIQDXP43Sd1m7RGOn+7UcuybBzs4RiBD20bXCzhM6XFfggwrv6BEjSJOf/4GPIRzdOnUQPnw== 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 (0) 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=FxgjMdn2pWPnoE9ZxzP9bmZEA2cc54iTtSVsWAlCzG0=; b=u9a1U5LEjxYJwWWovZjJ7FcUldf4rNXD+SalAd3dKAfjv4epO2F/U0pAF47pB4SVZAVMiyGcvGyF9GhTEv+VF9GqWW8M1JMrLs4iHcCpIwoR7E7uwPAolulmo99YzzqmDyDrMvuGYV++LwbjBycdQc3tg4kxKamQVGQ24SQzsLo= Received: from MN2PR17CA0002.namprd17.prod.outlook.com (2603:10b6:208:15e::15) by CY5PR12MB6324.namprd12.prod.outlook.com (2603:10b6:930:f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.34; Fri, 21 Mar 2025 14:46:35 +0000 Received: from BL6PEPF00022573.namprd02.prod.outlook.com (2603:10b6:208:15e:cafe::92) by MN2PR17CA0002.outlook.office365.com (2603:10b6:208:15e::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8534.33 via Frontend Transport; Fri, 21 Mar 2025 14:46:33 +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 BL6PEPF00022573.mail.protection.outlook.com (10.167.249.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8534.20 via Frontend Transport; Fri, 21 Mar 2025 14:46:33 +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.39; Fri, 21 Mar 2025 09:46:31 -0500 From: Lancelot SIX To: CC: Lancelot SIX Subject: [PATCH v2 2/3] gdb/testsuite/lib/rocm: Drop hip_devices_support_precise_memory Date: Fri, 21 Mar 2025 14:46:17 +0000 Message-ID: <20250321144618.363628-3-lancelot.six@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250321144618.363628-1-lancelot.six@amd.com> References: <20250318110011.1638240-1-lancelot.six@amd.com> <20250321144618.363628-1-lancelot.six@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00022573:EE_|CY5PR12MB6324:EE_ X-MS-Office365-Filtering-Correlation-Id: d2f015ba-af8d-433f-35b3-08dd68872ce0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: vhMk1ZUCTAfk0Y0Jji48P7/zYGvTanMR6wxdZDOSh4Xwx6GNab1liii+9VoTc0VWQwROTpAoP2y7PHb08XsITy1fiTP4egTezjbG64Id7s8MSK86w35sQLLzHGe4wtRhVXbGTEMG2a8IzJsWWtLf81wj/Fa9KecQ63QOK98ptfHiKhNwLa6mYPDfRniPsAyy252On+0UzSccfJgNfWRc0g1Kr2engpgVkfdNptewPYtch/wQCTaTdoGqQF9xcf/bnFGcYEn5TQyuG0Mkd4IL5u3Zc+Mk0O86Dc1GOuHTuIJRnv6BQPwuesX7W1jmqEwOiaKMO9geegou4b4VDUC+V0bO1D++b7oIjw7lhpFCWTuNN5KQtpESR8Fv//zdz+qEivlVJ6XSU3ZMWAs7XOrmx9YvBlFLLk/rdaXUfpOBhIkj5ZH1lA4a/0E2ntNwh98o1a3UusDWNIW6Ta8tI1ujcPW7/JoBH8/zKtBKInAkixSuEAM8+/zPWjIqsz+uaSrRzyrcB+NizLrNgTGdixE4wweSIEKyhY9xVUEkSCY9X9Pc13f2AAkHtK4f2g3NAlyDHP90qlegqLzlU5+1kIgropg3KhEOL5Zy5sMbtcCbRDNnRsX3+5xwqID2LQ8w03AEAgucuCe+eBZYj3MJDLlHb5BSrC3+pGltOEsofsYnEypzNXdliAWGio5isv+mhgGbEwCBd2PQcaEPbrkPGo8cgJWJ1EEaERHclQs3YnZBdmejHmyn4vML4b4e5oiEkp6/v8y20AmZckx4ZrFaYB/kAphArdOJAkoBn1yq10Rct2dxAzRFrKn3TofWY8S4B/DzRtvhQ70V++pRSZekl1WVaPjIdFIqvZ1ghYVbR4hR36LQU7e/19FUVEV1EUmEy1llO0JmrxnYbtHli1lnQw6pcQ/wkI6jEqOaACr6VAp6MHfO5r3MNvWJPdUScyCimmBESrz5j7RvCkQCH3ZrFz1DLaf+22mXxAQX+OvcLNCsymHQ+KZyiqJr9iG+EkJ5zFMG4ZkmSky/ekcqOuqjz7E14RKNLmrx6LL83T/homIA7LE14dE7Es3o5qmn0F/WiqL59noVDPRQrk21WKqF4wF7VoSUHbCOgtVL01No5uigTNtvK5vWdJBbj1bdEWOvg8T8CPkajGp6UuzylErh11jeerMHEiag/kNv1db1Fft9YI2jrATIjt+BHKwOKB2YWpPsC4k4EcdlH+ZuoOhCw5/G8Z2ejX9sfZ462LCkZPOylsFRK5r0Hs+Pz3tiNnwaiTSHPYjVfcNs9IKIf2wRK9rQt+PgwOYFJIVvgFAMtrertzlO6vraiNV8DGpOr/JwDitUENmtwLUuH3lIWNZY+1u/5+NJaHDPgBlpl/8iYrcpFxVEcdq4lBr56Xy9UbbwEQ0Kxc9ZqHc9ekVH0whqpuUE1avB2PF71fiF5GcE3QUKgLJaqIwpkOsY6SFGEiPDUUuwnN6yP7RcMPiEDm4LJiiTIBGuQ5y7KlThFLXnKzZgXTg= 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:(13230040)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2025 14:46:33.8930 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d2f015ba-af8d-433f-35b3-08dd68872ce0 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: BL6PEPF00022573.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6324 X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, LOCAL_AUTHENTICATION_FAIL_SPF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org Remove hip_devices_support_precise_memory as this is not used anymore. Change-Id: If5e19cf81f8b8778ee11b27d99b8488562804967 --- gdb/testsuite/lib/rocm.exp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/gdb/testsuite/lib/rocm.exp b/gdb/testsuite/lib/rocm.exp index 3eb51dbb52f..5164f1e1c88 100644 --- a/gdb/testsuite/lib/rocm.exp +++ b/gdb/testsuite/lib/rocm.exp @@ -176,22 +176,3 @@ proc hip_devices_support_debug_multi_process {} { } return 1 } - -# Return true if all the devices on the host support precise memory. - -proc hip_devices_support_precise_memory {} { - set unsupported_targets \ - {gfx900 gfx906 gfx908 gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032} - - set targets [find_amdgpu_devices] - if { [llength $targets] == 0 } { - return 0 - } - - foreach target $targets { - if { [lsearch -exact $unsupported_targets $target] != -1 } { - return 0 - } - } - return 1 -} From patchwork Fri Mar 21 14:46:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Six, Lancelot" X-Patchwork-Id: 108833 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 97B69385AC27 for ; Fri, 21 Mar 2025 15:31:23 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20602.outbound.protection.outlook.com [IPv6:2a01:111:f403:2418::602]) by sourceware.org (Postfix) with ESMTPS id B8DD7385842C for ; Fri, 21 Mar 2025 14:46:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B8DD7385842C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B8DD7385842C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2418::602 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1742568398; cv=pass; b=Yg06bZLTA+gV5++EEIA3Ft7N0MK3juRm20pivCqm0jFn0dKq07jzsb4Fsvek9Ef/rudL29lbNlbvZ8M9PqYNrYDfVbAlLdsXfbS+YxFxmN8LSs/NqNlFV/MYS40bdH4mKgl0dj8ZN7wAed0RuPmDhWwxYEFHAD3q39Mcc0xxovQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1742568398; c=relaxed/simple; bh=tn7ckEEPJd8Zyn3s5bR+Ej+kKSVKjmIAeqP4pDbfd3Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RiK4H1VR/A41sPAQ/JJWCqWoxihv9qOaCWY5QwtyUjkf7LJY+p1XaydnnyxafOycbUSOp4Rbq0E1Og+e3UxbRHtcgMxroaKyskj7wqg44Pyrx2fVpQOitrXL7tIWvpaCFizAoZ+AKMBVdBSaWPQxtqt2zYZZX3dmMxymBLgZ2lc= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B8DD7385842C Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=KhLd5Ahp ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VqoqieR2BJGn3cXvsWRZZ++AAWbOeVDs9R5JU4Chu2/OBwn27XnZhLWb/pPZUsCHRpFaRXqVd6tGv1ty8MZLIE7Q/2HNGe5MftqLvX9SV631gu1JW9bXbtgvlcLogdsSllpZSxpR64MvYOY9wZ1h99YT+fRUQ9WYP1VTXf3rwXPFC/trJnF4h2jRty8W5CZLk41W/7yQX7cAVSySLjkG9dHlATT7jEeqgkg2nYUoFeAPO/ZuIJ5+fcQCDxpRl9OBj00Dee0SyV7Tn7g1Yhm1yJovZMHoZYZK6KKBd+MMfchzy+xcl5wbPxKR3Izzj7e3lmz7suVn2/fSGsXKbChZHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=UTtyzVGpwJZRNSJPib6iW+I9ICFhRiUx7wW/AUhoj3k=; b=ipoS9jP2Yi0BGG46lBVoGtpo/+1aGlAXA2e5GlhiYRXLUGh+GBXihgvuHr5aY6k+4Ve9O+qgJ9tuwbcuOk/cL4UMHSjwbEM3N6TxX3BN1zS9HND8oZVDNixMPRa9G7OKYUPicZdEIgz7uuy4P1QzTgRAs0sQ8TLGT3Weu11d4YRAt6NcooDYNfzHPmA3EFCwaI6c/QIXp6feZFGZa3dcBytPevaRDdHY8NfDaURIpMXllwb5GDprkL8iwe1wrD8MAoDhR+HQ4MLSEcLN7kn9Mu0JXAzvqPZ3JGIML7U5ah+D+yCi9MisgtJGLnR1aiTgP44RQgMy3Y5RBousD43Rkw== 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 (0) 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=UTtyzVGpwJZRNSJPib6iW+I9ICFhRiUx7wW/AUhoj3k=; b=KhLd5Ahp4gaXsJExKnitEugi9z5Hr369K/POsOnIdqbR6XowufQLyIzVYgBjnLnd2F8GY5tp3BbUgtJfQ4LhIwv4J+e9JfOzr4xu/yCi1ZX8UyeiI7MzTqSxzvsqOBHcBr5AEbHSThDJOYFFc+OAl1gED7xyOGwhwWlLvohLjzA= Received: from MN2PR17CA0002.namprd17.prod.outlook.com (2603:10b6:208:15e::15) by IA0PPFDC28CEE69.namprd12.prod.outlook.com (2603:10b6:20f:fc04::be8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.34; Fri, 21 Mar 2025 14:46:35 +0000 Received: from BL6PEPF00022573.namprd02.prod.outlook.com (2603:10b6:208:15e:cafe::e6) by MN2PR17CA0002.outlook.office365.com (2603:10b6:208:15e::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8534.33 via Frontend Transport; Fri, 21 Mar 2025 14:46:35 +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 BL6PEPF00022573.mail.protection.outlook.com (10.167.249.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8534.20 via Frontend Transport; Fri, 21 Mar 2025 14:46:35 +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.39; Fri, 21 Mar 2025 09:46:32 -0500 From: Lancelot SIX To: CC: Lancelot SIX Subject: [PATCH v2 3/3] gdb/testsuite: Test the effect of amdgpu-precise memory Date: Fri, 21 Mar 2025 14:46:18 +0000 Message-ID: <20250321144618.363628-4-lancelot.six@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250321144618.363628-1-lancelot.six@amd.com> References: <20250318110011.1638240-1-lancelot.six@amd.com> <20250321144618.363628-1-lancelot.six@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00022573:EE_|IA0PPFDC28CEE69:EE_ X-MS-Office365-Filtering-Correlation-Id: 318cc0ab-7026-4de6-b455-08dd68872de1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|36860700013|376014|13003099007; X-Microsoft-Antispam-Message-Info: OsRDC6CsxyMYpb4WkBqJ1gCSYBwtGBVxAXTuxZFzNEzHULq6rXT4mMJ0JnetZnXWGq29RKnF5eZUB4FsWvlHzGs6UbScNybTnMXgs6vcwmrHNUKfMe7e7QV9YJj2degFCrMMDfLKWqLy/njx+s8w6NXx9cySjDoCbZYjs0XaxR7+RyqbBQAKP+9xr+mGITNa7CYEZJXsszosRhG7mSIsoYm140mrUmEsD9jJ3XEPuVJJQ08QI0wkbbTw84xC0957shFzp55mOWmq5EslCb3fB/BVNuWzsFF+qRditAZBqv7Tuwt+FTEHCHcquhhgwlOdoPTtcqfAIWxXxerf+0vuYQxj2Geuy1PqZrSnpZS3f2gj0mybOacHZzbtAGrecuweJhKZz+tz4PRyN2/4rWtf9O422hZNFMUneMukeQC6LBulG+dK9vZdhRe20+nVoKRAdPY2ljHeTyilYIyBhYmbP33eHw7UgY9mJ7cMy2kW6DrdD4N5ekJRKU796zT1H1z8zB+2old2vB9vHq1VYp/6VwDsY+R2jHAvtjkrpb1Fip4im5KYbk1O8JU7kz4y5O2Sndxvx1FFFd3tqLOBdLMK2fjvOpOhAt/9ngF/LfQe+3OyPKzDlH1Oxr9TetI6gwTJOS1ZUcdpD/ka5apuFpJ9mnEuXz8daP2O9JP+XCdcfyAZ8hfZWdTBQ6Qoj5tK8X6bWPNvX4MiD/7vSt1WFq68bW73AWz/xr+Gh8iaKuAfEuWbNYG5dFlQWa55tRvst8A2lZNqIQ0FQ6VQ1/ZkhO9Sv74ppocz4YRqsP4PKfJP91dWhuv6QB9pdLRY2hv4FcKu4ZpUmeKzF76VqJ3lONkpTm6kPKEQ7Faw1WDEzxGrJWUt9/pHAr2lObvv9QEs9IcLJLgtPcmobNbMDRPNNsMIaswvAb/Vo5bHZDAlvFMabzeGBHvP5K6tPfe0l3OWMUjGHxfMysaX18u1JUyEFnxsStrjqyV0RSbDduk2Usta5ywa6PNGZhvoWgQVu8yr8C7sme/e8VHfmCGy6qXc039vSAqFf9oS5zeyi066jM75JnewTVUYWIlS9M3tw3JUZfw1NLJsErMzFkFqXu4iOwArarlnRmR2RE2XEeALFpxXvIu3Z0SP/a20oJniNRYA6GBdxFRBIOM0CCjhjCKDjQ8hzeHwcey3Bg+f85s4bteptWpMBAO9f1pipra2VLMVzGjZBj+LvGvNbI5WwT7Srj/zau6kzsqF27q2qem7zqn7OMC1k5bRVrkcCGh7oAlFn/Fv5Egxh9BnIEFOZc+Zi5O7vZ8tCVSuUW/ycZT6/t0QfU6o+0os1ZGJCSEPR2PYw3okc+50sJuX/TcXLij9ztOtEh8bPVaZbrVF3ETxA6LBdbWu4GwR8TcxLIb9KTmWE96qKwdOIiAkG/IuROpTZUSo+lbYaXs7U8znFV8RgEtB1Y8= 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:(13230040)(1800799024)(82310400026)(36860700013)(376014)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2025 14:46:35.5649 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 318cc0ab-7026-4de6-b455-08dd68872de1 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: BL6PEPF00022573.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PPFDC28CEE69 X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, LOCAL_AUTHENTICATION_FAIL_SPF, SPF_HELO_PASS, SPF_NONE, TXREP 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org The gdb.rocm/precise-memory.exp test currently checks that the "amdgpu precise-memory" setting can be set. It does not test that this setting has any meaningful effect. This patch extends this test to ensure that precise-memory has the expected behaviour. Change-Id: I58f72a51a566f04fc89114b94ee656c2e7ac35bb --- gdb/testsuite/gdb.rocm/precise-memory.cpp | 12 +++++++++++- gdb/testsuite/gdb.rocm/precise-memory.exp | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.rocm/precise-memory.cpp b/gdb/testsuite/gdb.rocm/precise-memory.cpp index 769b58a72b5..7a8c37eeb57 100644 --- a/gdb/testsuite/gdb.rocm/precise-memory.cpp +++ b/gdb/testsuite/gdb.rocm/precise-memory.cpp @@ -31,7 +31,17 @@ __global__ void kernel () { - __builtin_amdgcn_s_sleep (1); + + /* Simple kernel which loads from address 0 to trigger a pagefault. + When precise memory is not enabled, it is expected that the memory fault + is reported after the s_nop instruction. With precise-memory, the + exception should be reported on the s_nop. */ + asm volatile ("s_mov_b64 [s10, s11], 0\n" + "s_load_dword s12, [s10, s11]\n" + "s_nop 0" + : + : + : "s10", "s11", "s12"); } int diff --git a/gdb/testsuite/gdb.rocm/precise-memory.exp b/gdb/testsuite/gdb.rocm/precise-memory.exp index 732cbe3f2e7..9856a62504d 100644 --- a/gdb/testsuite/gdb.rocm/precise-memory.exp +++ b/gdb/testsuite/gdb.rocm/precise-memory.exp @@ -54,6 +54,25 @@ proc do_test { } { gdb_test "show amdgpu precise-memory" \ "AMDGPU precise memory access reporting is on \\(currently ${cli_effective_value}\\)." \ "show precise-memory setting in CLI after" + + if { $cli_effective_value eq "disabled" } { + return + } + + # Get to the begining of the GPU kernel without precise memory enabled. + with_test_prefix "goto gpu code" { + gdb_test_no_output "set amdgpu precise-memory off" + gdb_breakpoint "kernel" allow-pending + gdb_test "continue" "Thread ${::decimal}.* hit Breakpoint .*" + gdb_test_no_output "set amdgpu precise-memory on" + } + + # If precise-memory is available, run until a SIGSEGV is reported. At + # that point, the PC should point to the s_nop instruction (the one + # following the one which caused the memory violation). + gdb_test "continue" "Thread ${::decimal}\[^\r\n\]* received signal SIGSEGV, Segmentation fault.*" + + gdb_test "x/i \$pc" "=> ${::hex} <_Z6kernelv\\+${::decimal}>:\[ \t\]+s_nop\[ \t\]+0" } }