From: "Willgerodt, Felix via Gdb-patches" <gdb-patches@sourceware.org>
To: John Baldwin <jhb@FreeBSD.org>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH 3/4] gdb, gdbserver: Allocate only a sane amount of buffer when fetching registers.
Date: Mon, 9 May 2022 07:04:22 +0000 [thread overview]
Message-ID: <MN2PR11MB456629A6E277385C4B3F221D8EC69@MN2PR11MB4566.namprd11.prod.outlook.com> (raw)
In-Reply-To: <bae86c35-2c0c-f9fe-bfc7-3208f52591b5@FreeBSD.org>
> -----Original Message-----
> From: John Baldwin <jhb@FreeBSD.org>
> Sent: Freitag, 6. Mai 2022 18:09
> To: Willgerodt, Felix <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.
>
> 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.
Thanks for your feedback. I have implemented that locally, naming the define
I386_NO_AMX_REGISTER_SIZE.
Felix
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2022-05-09 7:05 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 via Gdb-patches
2022-05-06 12:12 ` [PATCH 1/4] gdb: define int512 and uint512 as built-in types Felix Willgerodt via Gdb-patches
2022-05-06 12:19 ` Eli Zaretskii via Gdb-patches
2022-06-27 18:17 ` Pedro Alves
2022-05-06 12:12 ` [PATCH 2/4] gdb, gdbserver: Add AMX registers Felix Willgerodt via Gdb-patches
2022-05-06 12:25 ` Eli Zaretskii via Gdb-patches
2022-05-11 8:14 ` Willgerodt, Felix via Gdb-patches
2022-05-11 11:41 ` Eli Zaretskii via Gdb-patches
2022-06-27 18:16 ` Pedro Alves
2022-06-27 18:24 ` Eli Zaretskii via Gdb-patches
2022-06-27 19:15 ` Pedro Alves
2022-06-28 12:09 ` Eli Zaretskii via Gdb-patches
2022-06-28 13:35 ` Pedro Alves
2022-05-06 16:17 ` John Baldwin
2022-05-09 7:04 ` Willgerodt, Felix via Gdb-patches
2022-05-09 16:31 ` John Baldwin
2022-06-27 18:12 ` Pedro Alves
2022-07-14 10:54 ` Willgerodt, Felix via Gdb-patches
2022-07-15 11:51 ` Willgerodt, Felix via Gdb-patches
2022-08-08 9:15 ` Willgerodt, Felix via Gdb-patches
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 via Gdb-patches
2022-05-06 16:08 ` John Baldwin
2022-05-09 7:04 ` Willgerodt, Felix via Gdb-patches [this message]
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 via Gdb-patches
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=MN2PR11MB456629A6E277385C4B3F221D8EC69@MN2PR11MB4566.namprd11.prod.outlook.com \
--to=gdb-patches@sourceware.org \
--cc=felix.willgerodt@intel.com \
--cc=jhb@FreeBSD.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