From: Yao Qi <yao@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] rearrange struct value to save memory
Date: Fri, 10 Jan 2014 03:32:00 -0000 [thread overview]
Message-ID: <52CF6966.1060405@codesourcery.com> (raw)
In-Reply-To: <1389294182-982-1-git-send-email-tromey@redhat.com>
On 01/10/2014 03:03 AM, Tom Tromey wrote:
> This patch rearranges struct value a tiny bit, moving the "regnum"
> field into a hole. This saves 8 bytes per value on a 64-bit machine,
> and 4 bytes per value on a 32 bit machine. I think it does not
> negatively affect readability or performance.
>
> Built and regtested on x86-64 Fedora 18.
>
> Let me know what you think.
>
Hi, Tom,
It does save some memory shown by the result of 'make perf-check' on
an amd64-linux box. I don't see any time performance regression
in the test. It is indeed a good improvement!
Original Patched
backtrace vmsize 2 55108 54316
backtrace vmsize 4 55108 52432
backtrace vmsize 8 53124 51512
backtrace vmsize 16 53124 51512
backtrace vmsize 32 53124 51512
backtrace vmsize 64 53124 51512
backtrace vmsize 128 53124 51512
backtrace vmsize 256 53124 51512
backtrace vmsize 512 53124 51512
backtrace vmsize 1024 53124 51512
backtrace vmsize 2048 53124 51512
disassemble vmsize 0 66740 66732
disassemble vmsize 1 66740 66732
disassemble vmsize 2 66740 66732
single-step vmsize 10000 50388 50384
single-step vmsize 20000 50652 50648
single-step vmsize 30000 51048 51044
single-step vmsize 40000 51312 51308
skip-prologue vmsize 1 50104 50100
skip-prologue vmsize 2 50104 50100
skip-prologue vmsize 3 50104 50100
solib_load vmsize 8 64968 64960
solib_load vmsize 16 64968 64960
solib_load vmsize 32 64968 64960
solib_load vmsize 64 64968 64960
solib_load vmsize 128 64968 64960
solib_unload vmsize 8 64972 64964
solib_unload vmsize 16 64972 64964
solib_unload vmsize 32 64972 64964
solib_unload vmsize 64 64972 64964
solib_unload vmsize 128 64972 64964
--
Yao (é½å°§)
next prev parent reply other threads:[~2014-01-10 3:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 19:03 Tom Tromey
2014-01-10 3:32 ` Yao Qi [this message]
2014-01-10 17:12 ` Tom Tromey
2014-01-13 20:02 ` Tom Tromey
2014-01-14 13:50 ` Yao Qi
2014-01-16 21:54 ` Tom Tromey
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=52CF6966.1060405@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/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