mbox series

[0/3] hw/net,virtfs-proxy-helper: Reduce .data footprint

Message ID 20200305010446.17029-1-philmd@redhat.com (mailing list archive)
Headers show
Series hw/net,virtfs-proxy-helper: Reduce .data footprint | expand

Message

Philippe Mathieu-Daudé March 5, 2020, 1:04 a.m. UTC
More memory footprint reduction, similar to:
https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html

The elf-dissector tool [1] [2] helped to notice the big array.

[1] https://phabricator.kde.org/source/elf-dissector/
[2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html

Philippe Mathieu-Daudé (3):
  hw/net/e1000: Add readops/writeops typedefs
  hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data
  virtfs-proxy-helper: Make the helper_opts[] array const

 fsdev/virtfs-proxy-helper.c | 2 +-
 hw/net/e1000.c              | 6 ++++--
 hw/net/e1000e_core.c        | 6 ++++--
 3 files changed, 9 insertions(+), 5 deletions(-)

Comments

Stefano Garzarella March 5, 2020, 9:53 a.m. UTC | #1
On Thu, Mar 05, 2020 at 02:04:43AM +0100, Philippe Mathieu-Daudé wrote:
> More memory footprint reduction, similar to:
> https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html
> 
> The elf-dissector tool [1] [2] helped to notice the big array.
> 
> [1] https://phabricator.kde.org/source/elf-dissector/
> [2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html
> 

Thanks to share these links!

> Philippe Mathieu-Daudé (3):
>   hw/net/e1000: Add readops/writeops typedefs
>   hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data
>   virtfs-proxy-helper: Make the helper_opts[] array const
> 
>  fsdev/virtfs-proxy-helper.c | 2 +-
>  hw/net/e1000.c              | 6 ++++--
>  hw/net/e1000e_core.c        | 6 ++++--
>  3 files changed, 9 insertions(+), 5 deletions(-)
> 

Cool and clear changes!

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

Thanks,
Stefano
Philippe Mathieu-Daudé March 5, 2020, 10:37 a.m. UTC | #2
On 3/5/20 10:53 AM, Stefano Garzarella wrote:
> On Thu, Mar 05, 2020 at 02:04:43AM +0100, Philippe Mathieu-Daudé wrote:
>> More memory footprint reduction, similar to:
>> https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html
>>
>> The elf-dissector tool [1] [2] helped to notice the big array.
>>
>> [1] https://phabricator.kde.org/source/elf-dissector/
>> [2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html
>>
> 
> Thanks to share these links!

FYI the heap equivalent (besides that more powerful) is:
https://github.com/KDE/heaptrack

> 
>> Philippe Mathieu-Daudé (3):
>>    hw/net/e1000: Add readops/writeops typedefs
>>    hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data
>>    virtfs-proxy-helper: Make the helper_opts[] array const
>>
>>   fsdev/virtfs-proxy-helper.c | 2 +-
>>   hw/net/e1000.c              | 6 ++++--
>>   hw/net/e1000e_core.c        | 6 ++++--
>>   3 files changed, 9 insertions(+), 5 deletions(-)
>>
> 
> Cool and clear changes!
> 
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
> 
> Thanks,
> Stefano
>
Stefano Garzarella March 5, 2020, 10:41 a.m. UTC | #3
On Thu, Mar 05, 2020 at 11:37:22AM +0100, Philippe Mathieu-Daudé wrote:
> On 3/5/20 10:53 AM, Stefano Garzarella wrote:
> > On Thu, Mar 05, 2020 at 02:04:43AM +0100, Philippe Mathieu-Daudé wrote:
> > > More memory footprint reduction, similar to:
> > > https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html
> > > 
> > > The elf-dissector tool [1] [2] helped to notice the big array.
> > > 
> > > [1] https://phabricator.kde.org/source/elf-dissector/
> > > [2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html
> > > 
> > 
> > Thanks to share these links!
> 
> FYI the heap equivalent (besides that more powerful) is:
> https://github.com/KDE/heaptrack

Cool, thanks!

Previously I used valgrind's massif tool to track the heap, but I'll try
heaptrack.

Cheers,
Stefano
Paolo Bonzini March 6, 2020, 9:25 a.m. UTC | #4
On 05/03/20 02:04, Philippe Mathieu-Daudé wrote:
> More memory footprint reduction, similar to:
> https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html
> 
> The elf-dissector tool [1] [2] helped to notice the big array.
> 
> [1] https://phabricator.kde.org/source/elf-dissector/
> [2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html
> 
> Philippe Mathieu-Daudé (3):
>   hw/net/e1000: Add readops/writeops typedefs
>   hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data
>   virtfs-proxy-helper: Make the helper_opts[] array const
> 
>  fsdev/virtfs-proxy-helper.c | 2 +-
>  hw/net/e1000.c              | 6 ++++--
>  hw/net/e1000e_core.c        | 6 ++++--
>  3 files changed, 9 insertions(+), 5 deletions(-)
> 

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

These can certainly go through qemu-trivial.

Paolo
Laurent Vivier March 9, 2020, 11:44 a.m. UTC | #5
Le 06/03/2020 à 10:25, Paolo Bonzini a écrit :
> On 05/03/20 02:04, Philippe Mathieu-Daudé wrote:
>> More memory footprint reduction, similar to:
>> https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html
>>
>> The elf-dissector tool [1] [2] helped to notice the big array.
>>
>> [1] https://phabricator.kde.org/source/elf-dissector/
>> [2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html
>>
>> Philippe Mathieu-Daudé (3):
>>   hw/net/e1000: Add readops/writeops typedefs
>>   hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data
>>   virtfs-proxy-helper: Make the helper_opts[] array const
>>
>>  fsdev/virtfs-proxy-helper.c | 2 +-
>>  hw/net/e1000.c              | 6 ++++--
>>  hw/net/e1000e_core.c        | 6 ++++--
>>  3 files changed, 9 insertions(+), 5 deletions(-)
>>
> 
> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> These can certainly go through qemu-trivial.

Applied to my trivial-patches branch.

Thanks,
Laurent