public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: Felix Willgerodt <felix.willgerodt@intel.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH 3/4] gdb, gdbserver: Allocate only a sane amount of buffer when fetching registers.
Date: Fri, 6 May 2022 09:08:53 -0700	[thread overview]
Message-ID: <bae86c35-2c0c-f9fe-bfc7-3208f52591b5@FreeBSD.org> (raw)
In-Reply-To: <20220506121226.137608-4-felix.willgerodt@intel.com>

On 5/6/22 5:12 AM, Felix Willgerodt via Gdb-patches wrote:
> A couple of functions blindly allocate a buffer of the size of
> I386_MAX_REGISTER_SIZE.  With the addition of AMX, this size has increased
> drastically from 64 bytes to 8192.  This changes these buffer allocations
> to only use the actual amount needed, similar to how it is already done in
> amd64-tdep.c (amd64_pseudo_register_read_value).
> 
> For the i387_collect_xsave and i387_cache_to_xsave functions any feedback is
> welcome.  I opted to take the middle ground and only distinguish
> between "AMX" and "Not-AMX".  That might be unnecessary optimization,
> we could alternatively be okay with using an 8kB buffer unconditionally or
> be okay with having many smaller buffer allocations.

I think these changes make sense, but I think it might be nice to have some
sort of named constant (I386_NOAMX_REGISTER_SIZE perhaps) instead of a bare
64.

-- 
John Baldwin

  reply	other threads:[~2022-05-06 16:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06 12:12 [PATCH 0/4] Add AMX support Felix Willgerodt
2022-05-06 12:12 ` [PATCH 1/4] gdb: define int512 and uint512 as built-in types Felix Willgerodt
2022-05-06 12:19   ` Eli Zaretskii
2022-06-27 18:17   ` Pedro Alves
2022-05-06 12:12 ` [PATCH 2/4] gdb, gdbserver: Add AMX registers Felix Willgerodt
2022-05-06 12:25   ` Eli Zaretskii
2022-05-11  8:14     ` Willgerodt, Felix
2022-05-11 11:41       ` Eli Zaretskii
2022-06-27 18:16         ` Pedro Alves
2022-06-27 18:24           ` Eli Zaretskii
2022-06-27 19:15             ` Pedro Alves
2022-06-28 12:09               ` Eli Zaretskii
2022-06-28 13:35                 ` Pedro Alves
2022-05-06 16:17   ` John Baldwin
2022-05-09  7:04     ` Willgerodt, Felix
2022-05-09 16:31       ` John Baldwin
2022-06-27 18:12   ` Pedro Alves
2022-07-14 10:54     ` Willgerodt, Felix
2022-07-15 11:51       ` Willgerodt, Felix
2022-08-08  9:15     ` Willgerodt, Felix
2022-08-08 17:16       ` John Baldwin
2022-05-06 12:12 ` [PATCH 3/4] gdb, gdbserver: Allocate only a sane amount of buffer when fetching registers Felix Willgerodt
2022-05-06 16:08   ` John Baldwin [this message]
2022-05-09  7:04     ` Willgerodt, Felix
2022-06-27 18:30   ` Pedro Alves
2022-05-06 12:12 ` [PATCH 4/4] gdb: Clear tilecfg.start_row for any PC modification Felix Willgerodt
2022-06-27 18:55   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bae86c35-2c0c-f9fe-bfc7-3208f52591b5@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=felix.willgerodt@intel.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).