From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [RFC 0/4] perf tools: Add hist_entry allocation callbacks
Date: Mon, 4 Jul 2016 16:01:35 +0200 [thread overview]
Message-ID: <1467640899-3776-1-git-send-email-jolsa@kernel.org> (raw)
hi,
this patchset tries to add support provide own allocation
zalloc/free methods for hist_entry object.
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 for comments,
jirka
---
Jiri Olsa (4):
perf tools: Introduce hist_entry__init function
perf tools: Do the error path hist_entry release in hist_entry__new
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(-)
next reply other threads:[~2016-07-04 14:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 14:01 Jiri Olsa [this message]
2016-07-04 14:01 ` [PATCH 1/4] perf tools: Introduce hist_entry__init function Jiri Olsa
2016-07-04 19:08 ` Arnaldo Carvalho de Melo
2016-07-04 14:01 ` [PATCH 2/4] perf tools: Do the error path hist_entry release in hist_entry__new Jiri Olsa
2016-07-04 19:09 ` Arnaldo Carvalho de Melo
2016-07-05 6:32 ` Jiri Olsa
2016-07-04 14:01 ` [PATCH 3/4] perf tools: Introduce hist_entry_ops Jiri Olsa
2016-07-04 14:01 ` [PATCH 4/4] perf tools: Introduce hists__add_entry_ops function Jiri Olsa
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=1467640899-3776-1-git-send-email-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.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 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.