linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>,
	 Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	 Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	 linux-perf-users@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/4] perf annotate: Add a hashmap for symbol histogram
Date: Tue, 27 Feb 2024 21:21:26 -0800	[thread overview]
Message-ID: <CAM9d7cgnv9BHoA3zsLqJPxJp6JPAZMrH6_T+=an4_det0DPOTA@mail.gmail.com> (raw)
In-Reply-To: <CAP-5=fVUqFbvYp_g5PL9e4on=5gF1YE42-w-XMTrFxOZJ+JrXw@mail.gmail.com>

On Tue, Feb 27, 2024 at 5:20 PM Ian Rogers <irogers@google.com> wrote:
>
> On Tue, Feb 27, 2024 at 4:52 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > Now symbol histogram uses an array to save per-offset sample counts.
> > But it wastes a lot of memory if the symbol has a few samples only.
> > Add a hashmap to save values only for actual samples.
> >
> > For now, it has duplicate histogram (one in the existing array and
> > another in the new hash map).  Once it can convert to use the hash
> > in all places, we can get rid of the array later.
> >
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
[SNIP]
> > diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
> > index 94435607c958..a2b0c8210740 100644
> > --- a/tools/perf/util/annotate.h
> > +++ b/tools/perf/util/annotate.h
> > @@ -12,6 +12,7 @@
> >  #include "symbol_conf.h"
> >  #include "mutex.h"
> >  #include "spark.h"
> > +#include "hashmap.h"
>
> nit: This could just be a forward reference to keep the number of
> header files down.

Sounds good.  Will fix in v2.

Thanks for your review!
Namhyung

  reply	other threads:[~2024-02-28  5:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28  0:52 [PATCH 0/4] perf annotate: Improve memory usage for symbol histogram Namhyung Kim
2024-02-28  0:52 ` [PATCH 1/4] perf annotate: Add a hashmap " Namhyung Kim
2024-02-28  1:19   ` Ian Rogers
2024-02-28  5:21     ` Namhyung Kim [this message]
2024-02-28  0:52 ` [PATCH 2/4] perf annotate: Calculate instruction overhead using hashmap Namhyung Kim
2024-02-28  5:43   ` Namhyung Kim
2024-02-28  0:52 ` [PATCH 3/4] perf annotate: Remove sym_hist.addr[] array Namhyung Kim
2024-02-28  0:52 ` [PATCH 4/4] perf annotate: Add comments in the data structures Namhyung Kim
2024-02-28  1:20 ` [PATCH 0/4] perf annotate: Improve memory usage for symbol histogram Ian Rogers
2024-03-04 13:58 ` Arnaldo Carvalho de Melo
2024-03-04 16:36   ` Namhyung Kim
2024-03-04 22:53     ` Namhyung Kim

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='CAM9d7cgnv9BHoA3zsLqJPxJp6JPAZMrH6_T+=an4_det0DPOTA@mail.gmail.com' \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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 NNTP newsgroup(s).