Message ID | 20240923151541.616723-2-guinevere@redhat.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> 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 153E0385C6C7 for <patchwork@sourceware.org>; Mon, 23 Sep 2024 15:16:53 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id CD4DA3858D26 for <gdb-patches@sourceware.org>; Mon, 23 Sep 2024 15:16:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD4DA3858D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CD4DA3858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727104587; cv=none; b=NT350Fs146CTkrrmUftpdixf2vY05VXk6Djwlb32gfFqMhrUIYDVFkDSUH62BKN9Z+TJwDMIZfdpsm6BrY9uilfKRaN7C4Ujz6isBn2qGXzTPYCJh297Iio3mG463jJVj8X8BFUwbmiRj9PgJKPgX2djHaWklKsLhsXy5sblB1w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727104587; c=relaxed/simple; bh=j2bJAjSAh8v0YldMe58tlnCKAWRdNvl1Olwzod+duVY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jRa3Rl3JzgFCmcBtnP0aFA6GOrRD1klrFmXh63hu7Py5UEgg3MEeW5cIDL3Aj1TjdhUERo/tSGWcIcPhdCVTfj/CL9sXJ/zOExfsanZ6fEQ8YUTHny4d2FLYARbMl3+sYUjOgSJqhku67KHGFOiWRbt3SiEySuZ6VuWulpWRiCc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727104585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aCXql+W43MjG14iKF2mYW65eMT4PB//h0SJrGLoQHWI=; b=I8NzeNnmWxOPkBF68HHEudpvm6Wbz6LjOKSE2dsGx5x1731TPCv349nWe6Rd1qSC2eR+jG 8xr4EONpAAzo7CBf/3f3M3BTwiJv1x7IY7vVMaUX9Es0NpOSrpGrdmyUUXbjznzH7LOvtv EZ4I7d2zzZkN/Q0NefrGOcle/n3CZpI= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-632-y1yL8m1RMfW3iyjHEnmHFw-1; Mon, 23 Sep 2024 11:16:24 -0400 X-MC-Unique: y1yL8m1RMfW3iyjHEnmHFw-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (unknown [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 124B3196C42B for <gdb-patches@sourceware.org>; Mon, 23 Sep 2024 15:16:22 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.96.134.93]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5F7F218DD827; Mon, 23 Sep 2024 15:15:58 +0000 (UTC) From: Guinevere Larsen <guinevere@redhat.com> To: gdb-patches@sourceware.org Cc: Guinevere Larsen <guinevere@redhat.com> Subject: [PATCH v4 0/7] Support for recording some AVX instructions Date: Mon, 23 Sep 2024 12:15:35 -0300 Message-ID: <20240923151541.616723-2-guinevere@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, 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 <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
Series |
Support for recording some AVX instructions
|
|
Message
Guinevere Larsen
Sept. 23, 2024, 3:15 p.m. UTC
This patch is the third version of adding support to record and replay AVX instructions on x86 and x86_64 CPUs. This version has one more preparatory patch, as the record subsystem could read pseudo registers (like ymm). After this patch series, GDB should be able to fully record __memset_avx2_unaligned_erms from glibc! For rationale, supporting AVX instructions is important since glibc has been shipping functions that use them for a long time, meaning most standard library functions would not be supported by record, which is a big inconvenience for end users. The first patch of the series makes GDB aware that it can read pseudo registers freom executing and replaying threads, no user-visible changes expected. The second adds the capability for the main i386 record function to identify and read VEX prefixes, but doesn't add support for any instruction yet, so minimal user visible changes (only a slight tweak to an error message). The remaining patches add support to related instruction, and tests those instructions. Since this series only supports a very small subset of avx instructions, I am not sure if I should add a NEWS entry (and what to put in it if I should). Guinevere Larsen (7): gdb: Allow replayed threads to read and write pseudo registers gdb: Start supporting AVX instruction gdb/record: add support to vmovd and vmovq instructions gdb/record: add support to AVX unpack instructions gdb/record: Add recording support to vpbroadcast instructions gdb/record: support AVX instructions VMOVDQ(U|A) when recording gdb/record: add support to vzeroupper instruction gdb/amd64-tdep.c | 3 +- gdb/i386-tdep.c | 268 +++++++++++++- gdb/i386-tdep.h | 1 + gdb/record-full.c | 10 +- gdb/record-full.h | 3 + gdb/testsuite/gdb.reverse/i386-avx-reverse.c | 234 ++++++++++++ .../gdb.reverse/i386-avx-reverse.exp | 333 ++++++++++++++++++ gdb/testsuite/gdb.reverse/step-precsave.exp | 4 +- gdb/thread.c | 15 +- 9 files changed, 863 insertions(+), 8 deletions(-) create mode 100644 gdb/testsuite/gdb.reverse/i386-avx-reverse.c create mode 100644 gdb/testsuite/gdb.reverse/i386-avx-reverse.exp
Comments
>>>>> "Guinevere" == Guinevere Larsen <guinevere@redhat.com> writes:
Guinevere> Since this series only supports a very small subset of avx instructions,
Guinevere> I am not sure if I should add a NEWS entry (and what to put in it if I
Guinevere> should).
Not sure myself.
I had comments on the first two patches. The rest I'm not really
qualified to review but IMO you should just go ahead in this case as the
record-full maintainer. It seems to me the worst case is maybe some x86
decoding detail is incorrect, and this can always be fixed if it does in
fact occur.
thanks,
Tom