[v4,0/7] Support for recording some AVX instructions

Message ID 20240923151541.616723-2-guinevere@redhat.com
Headers
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

Tom Tromey Oct. 4, 2024, 7:58 p.m. UTC | #1
>>>>> "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