From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: bigeasy@linutronix.de, paulus@samba.org, dsahern@gmail.com,
jolsa@kernel.org, jgalar@efficios.com, tzanussi@gmail.com,
tglx@linutronix.de, fweisbec@gmail.com, a.p.zijlstra@chello.nl,
namhyung@kernel.org, mingo@kernel.org, hpa@zytor.com,
wangnan0@huawei.com, hekuang@huawei.com, acme@redhat.com,
linux-kernel@vger.kernel.org
Subject: [tip:perf/core] perf data: Add support for setting ordered_events queue size
Date: Tue, 5 May 2015 19:57:34 -0700 [thread overview]
Message-ID: <tip-8fa46753fe2ca96b0fc175efb6c9ed5c001fb554@git.kernel.org> (raw)
In-Reply-To: <1429372220-6406-5-git-send-email-jolsa@kernel.org>
Commit-ID: 8fa46753fe2ca96b0fc175efb6c9ed5c001fb554
Gitweb: http://git.kernel.org/tip/8fa46753fe2ca96b0fc175efb6c9ed5c001fb554
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Sat, 18 Apr 2015 17:50:17 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 29 Apr 2015 10:37:48 -0300
perf data: Add support for setting ordered_events queue size
Adding support to limit the size of ordered_events queue, so we could
control allocation size of perf data files without proper finished round
events.
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jeremie Galarneau <jgalar@efficios.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1429372220-6406-5-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/data-convert-bt.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index 4f942b3..b35c8d6 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -74,6 +74,9 @@ struct convert {
u64 events_size;
u64 events_count;
+
+ /* Ordered events configured queue size. */
+ u64 queue_size;
};
static int value_set(struct bt_ctf_field_type *type,
@@ -968,6 +971,18 @@ static int ctf_writer__flush_streams(struct ctf_writer *cw)
return ret;
}
+static int convert__config(const char *var, const char *value, void *cb)
+{
+ struct convert *c = cb;
+
+ if (!strcmp(var, "convert.queue-size")) {
+ c->queue_size = perf_config_u64(var, value);
+ return 0;
+ }
+
+ return perf_default_config(var, value, cb);
+}
+
int bt_convert__perf2ctf(const char *input, const char *path, bool force)
{
struct perf_session *session;
@@ -994,6 +1009,8 @@ int bt_convert__perf2ctf(const char *input, const char *path, bool force)
struct ctf_writer *cw = &c.writer;
int err = -1;
+ perf_config(convert__config, &c);
+
/* CTF writer */
if (ctf_writer__init(cw, path))
return -1;
@@ -1003,6 +1020,11 @@ int bt_convert__perf2ctf(const char *input, const char *path, bool force)
if (!session)
goto free_writer;
+ if (c.queue_size) {
+ ordered_events__set_alloc_size(&session->ordered_events,
+ c.queue_size);
+ }
+
/* CTF writer env/clock setup */
if (ctf_writer__setup_env(cw, session))
goto free_session;
next prev parent reply other threads:[~2015-05-06 2:58 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-18 15:50 [PATCHv6 0/7] perf tools: Add perf data CTF conversion Jiri Olsa
2015-04-18 15:50 ` [PATCH 1/7] perf data: Show error message when conversion failed Jiri Olsa
2015-05-06 2:55 ` [tip:perf/core] " tip-bot for He Kuang
2015-04-18 15:50 ` [PATCH 2/7] perf data: Switch to multiple cpu stream files Jiri Olsa
2015-04-20 19:58 ` Arnaldo Carvalho de Melo
2015-04-20 20:01 ` Arnaldo Carvalho de Melo
2015-04-20 20:19 ` Jiri Olsa
2015-04-20 20:41 ` Arnaldo Carvalho de Melo
2015-04-20 20:49 ` Arnaldo Carvalho de Melo
2015-05-06 2:57 ` [tip:perf/core] " tip-bot for Sebastian Andrzej Siewior
2015-04-18 15:50 ` [PATCH 3/7] perf data: Enable stream flush within processing Jiri Olsa
2015-05-06 2:57 ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-04-18 15:50 ` [PATCH 4/7] perf data: Add support for setting ordered_events queue size Jiri Olsa
2015-05-06 2:57 ` tip-bot for Jiri Olsa [this message]
2015-04-18 15:50 ` [PATCH 5/7] tools lib traceevent: Add alias field to struct format_field Jiri Olsa
2015-04-20 14:24 ` Steven Rostedt
2015-05-06 2:55 ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-04-18 15:50 ` [PATCH 6/7] perf data: Fix duplicate field names and avoid reserved keywords Jiri Olsa
2015-04-18 18:56 ` Jérémie Galarneau
2015-04-18 20:45 ` Jiri Olsa
2015-04-20 14:02 ` Arnaldo Carvalho de Melo
2015-05-06 2:57 ` [tip:perf/core] " tip-bot for Wang Nan
2015-04-18 15:50 ` [PATCH 7/7] perf data: Fix signess of value Jiri Olsa
2015-04-20 21:23 ` Arnaldo Carvalho de Melo
2015-04-20 21:52 ` Jiri Olsa
2015-04-21 2:41 ` Wang Nan
2015-04-21 14:25 ` Arnaldo Carvalho de Melo
2015-05-06 2:58 ` [tip:perf/core] perf data: Fix signedness " tip-bot for Wang Nan
2015-04-20 20:05 ` [PATCHv6 0/7] perf tools: Add perf data CTF conversion Arnaldo Carvalho de Melo
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=tip-8fa46753fe2ca96b0fc175efb6c9ed5c001fb554@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=bigeasy@linutronix.de \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=hekuang@huawei.com \
--cc=hpa@zytor.com \
--cc=jgalar@efficios.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
--cc=tzanussi@gmail.com \
--cc=wangnan0@huawei.com \
/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.