Message ID | 20241023165117.4051131-1-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 1FE3D3858C39 for <patchwork@sourceware.org>; Wed, 23 Oct 2024 16:52:03 +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 5F3103858D39 for <gdb-patches@sourceware.org>; Wed, 23 Oct 2024 16:51:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F3103858D39 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 5F3103858D39 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=1729702294; cv=none; b=m/5QTvbmqOZqXa/feSJ2Z5Ru/FpnyL+h1m7ooaKSEWwpf6pl+2IpyeDT4KQ3+Ky0pywtFM3bjQqKnuIOqNrt/lGodaCV2aLDpBrOItvBtHAhtkGxS3iL6OIf16LHOqR0J0HA6AhCyd9ddMwNcL0D5cOCngeRRxii0KX/Q2ELMNI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729702294; c=relaxed/simple; bh=x+HeHUExked/Q8PfJP/vQu1DB2JUeT0Io1Ix2cJUqeY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RfOPYpX0kFnCOeu5V8nriSmbbtiPLCvJqepnHr050ze+wgXcb7f8hOQygthZInQie31CjKoj7X23OllztfqlUX6wCA2Y01zhTkck9YvW1HRsTcMfmKbUfhMRWnglyY+V6Q5SDXpPtTdn+uGlg5M1/8LzT2uOxWi2oyyFJpgIpTA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729702290; 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=hTC6CE+P30rHDPxlEygwyiJwLWpIdZCZrImkknmbnwc=; b=GqoAn+jK5QZUJoQdZHiyOMco/9KQeV7/N+mmT6f3zq5HojeEEsJfHhdRbUCsrU8CHNn4pJ CDxFsnRB9a8MV9S+04PXmoDaX/KGzxl0IpY/se7cpHMoPaXahTqgTkRXWzdDrmxIWa/+Ft N0ZO2KMaN7soBt8x1sui2EOvFiJt2CY= Received: from mx-prod-mc-02.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-328-tNoPU44RNVith60fnM93_w-1; Wed, 23 Oct 2024 12:51:29 -0400 X-MC-Unique: tNoPU44RNVith60fnM93_w-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AE0011955D62 for <gdb-patches@sourceware.org>; Wed, 23 Oct 2024 16:51:27 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.96.134.67]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 61C1B300018D; Wed, 23 Oct 2024 16:51:26 +0000 (UTC) From: Guinevere Larsen <guinevere@redhat.com> To: gdb-patches@sourceware.org Cc: Guinevere Larsen <guinevere@redhat.com> Subject: [PATCH v5 0/7] Support for recording some AVX instructions Date: Wed, 23 Oct 2024 13:51:10 -0300 Message-ID: <20241023165117.4051131-1-guinevere@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=-5.2 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
Oct. 23, 2024, 4:51 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). Changes for v5: * the new function record_full_is_replaying now uses dynamic_cast to check if the record-full target is enabled. 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 | 11 +- 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, 864 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> The first patch of the series makes GDB aware that it can read pseudo
Guinevere> registers freom executing and replaying threads, no user-visible
Guinevere> changes expected. The second adds the capability for the main i386 record
Guinevere> function to identify and read VEX prefixes, but doesn't add support for
Guinevere> any instruction yet, so minimal user visible changes (only a slight
Guinevere> tweak to an error message). The remaining patches add support to related
Guinevere> instruction, and tests those instructions.
FWIW these look fine to me.
I didn't really review the target-dependent parts in detail, like I
didn't look up instruction encodings or anything like that.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
On 10/25/24 12:46 PM, Tom Tromey wrote: >>>>>> "Guinevere" == Guinevere Larsen <guinevere@redhat.com> writes: > Guinevere> The first patch of the series makes GDB aware that it can read pseudo > Guinevere> registers freom executing and replaying threads, no user-visible > Guinevere> changes expected. The second adds the capability for the main i386 record > Guinevere> function to identify and read VEX prefixes, but doesn't add support for > Guinevere> any instruction yet, so minimal user visible changes (only a slight > Guinevere> tweak to an error message). The remaining patches add support to related > Guinevere> instruction, and tests those instructions. > > FWIW these look fine to me. > I didn't really review the target-dependent parts in detail, like I > didn't look up instruction encodings or anything like that. > > Approved-By: Tom Tromey <tom@tromey.com> Thanks for the review! I've pushed this! If there is something I missed related to the target-specific parts, the test should let us find it easily and figure out what's up.