All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] perf tools: Add hist_entry allocation callbacks
@ 2016-07-05  6:56 Jiri Olsa
  2016-07-05  6:56 ` [PATCH 1/3] perf tools: Introduce hist_entry__init function Jiri Olsa
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jiri Olsa @ 2016-07-05  6:56 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra

hi,
this patchset tries to add support provide own allocation
zalloc/free methods for hist_entry object.

v2 changes:
  - merged patch 1 and 2 from RFC

The reason is to provide a way to be able to store more
data within hist_entry object in a transparent way to
its current usage by allocating its own hist_entry sub
object.

The user/app which wants to allocate its own hist_entry
sub object provides following ops struct:

  struct hist_entry_ops *ops {
    void*   (*new)(size_t);
    void    (*free)(void *);
  }

via new interface function:

  struct hist_entry *
  hists__add_entry_ops(struct hists *hists,
                       struct hist_entry_ops *ops,
                       ...

I'm using this for c2c code to enlarge hist_entry object
with large stats structure, which has no use to standard
perf usage/commands.

It might be used to lower the hist_entry footproint for
default perf usage by uing this for things like hierarchy
output that adds extra stuff into hist_entry object.

Available at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
  perf/he_ops

thanks,
jirka


---
Jiri Olsa (3):
      perf tools: Introduce hist_entry__init function
      perf tools: Introduce hist_entry_ops
      perf tools: Introduce hists__add_entry_ops function

 tools/perf/util/hist.c | 204 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------
 tools/perf/util/hist.h |  11 ++++++
 tools/perf/util/sort.h |   6 ++++
 3 files changed, 148 insertions(+), 73 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-13  7:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-05  6:56 [PATCH 0/3] perf tools: Add hist_entry allocation callbacks Jiri Olsa
2016-07-05  6:56 ` [PATCH 1/3] perf tools: Introduce hist_entry__init function Jiri Olsa
2016-07-13  7:00   ` [tip:perf/core] perf hists: " tip-bot for Jiri Olsa
2016-07-05  6:56 ` [PATCH 2/3] perf tools: Introduce hist_entry_ops Jiri Olsa
2016-07-13  7:01   ` [tip:perf/core] perf hists: " tip-bot for Jiri Olsa
2016-07-05  6:56 ` [PATCH 3/3] perf tools: Introduce hists__add_entry_ops function Jiri Olsa
2016-07-13  7:01   ` [tip:perf/core] perf hists: " tip-bot for Jiri Olsa
2016-07-05 14:15 ` [PATCH 0/3] perf tools: Add hist_entry allocation callbacks Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.