[PATCHSET,0/5] perf annotate: Reduce memory footprint (v2)

Message ID 20231103191907.54531-1-namhyung@kernel.org
Headers
Series perf annotate: Reduce memory footprint (v2) |

Message

Namhyung Kim Nov. 3, 2023, 7:19 p.m. UTC
  Hello,

This is a part of my work to improve perf annotate.  At first, I'd
like reduce the size of struct annotation which will be allocated
together with struct symbol in some cases.  In fact, it doesn't use
most of them so it needs to slim down and lazy-allocate used part.

* v2 changes)
 - fix typo
 - reorder struct annotated_source
 - add Ian's Reviewed-by tags
 
With this applied, size of the struct goes down from 96 to 48.

The code is available at perf/annotate-diet-v2 branch in

  git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Thanks,
Namhyung


Namhyung Kim (5):
  perf annotate: Split struct cycles_info
  perf annotate: Split struct annotated_branch
  perf annotate: Move max_coverage to annotated_branch
  perf annotate: Move some fields to annotated_source
  perf annotate: Move offsets to annotated_source

 tools/perf/builtin-annotate.c     |   7 +-
 tools/perf/ui/browsers/annotate.c |  18 ++--
 tools/perf/util/annotate.c        | 162 ++++++++++++++++--------------
 tools/perf/util/annotate.h        |  49 +++++----
 tools/perf/util/block-info.c      |   4 +-
 tools/perf/util/block-range.c     |   7 +-
 tools/perf/util/sort.c            |  14 +--
 7 files changed, 147 insertions(+), 114 deletions(-)
  

Comments

Arnaldo Carvalho de Melo Nov. 8, 2023, 8:27 p.m. UTC | #1
Em Fri, Nov 03, 2023 at 12:19:02PM -0700, Namhyung Kim escreveu:
> Hello,
> 
> This is a part of my work to improve perf annotate.  At first, I'd
> like reduce the size of struct annotation which will be allocated
> together with struct symbol in some cases.  In fact, it doesn't use
> most of them so it needs to slim down and lazy-allocate used part.
> 
> * v2 changes)
>  - fix typo
>  - reorder struct annotated_source
>  - add Ian's Reviewed-by tags
>  
> With this applied, size of the struct goes down from 96 to 48.
> 
> The code is available at perf/annotate-diet-v2 branch in
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git
> 
> Thanks,
> Namhyung
> 

Applied to perf-tools-next, thanks,

- Arnaldo
 
> Namhyung Kim (5):
>   perf annotate: Split struct cycles_info
>   perf annotate: Split struct annotated_branch
>   perf annotate: Move max_coverage to annotated_branch
>   perf annotate: Move some fields to annotated_source
>   perf annotate: Move offsets to annotated_source
> 
>  tools/perf/builtin-annotate.c     |   7 +-
>  tools/perf/ui/browsers/annotate.c |  18 ++--
>  tools/perf/util/annotate.c        | 162 ++++++++++++++++--------------
>  tools/perf/util/annotate.h        |  49 +++++----
>  tools/perf/util/block-info.c      |   4 +-
>  tools/perf/util/block-range.c     |   7 +-
>  tools/perf/util/sort.c            |  14 +--
>  7 files changed, 147 insertions(+), 114 deletions(-)
> 
> -- 
> 2.42.0.869.gea05f2083d-goog
> 
>