[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1403103539-16807-13-git-send-email-jolsa@kernel.org>
Date: Wed, 18 Jun 2014 16:58:53 +0200
From: Jiri Olsa <jolsa@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: Jiri Olsa <jolsa@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Jean Pihet <jean.pihet@...aro.org>,
Namhyung Kim <namhyung@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: [PATCH 12/18] perf tools: Add ordered_events_queue_init function
Adding ordered_events_queue_init function for struct
ordered_events_queue initialization.
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jean Pihet <jean.pihet@...aro.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
tools/perf/util/ordered-events.c | 9 +++++++++
tools/perf/util/ordered-events.h | 1 +
tools/perf/util/session.c | 6 +-----
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c
index 022be55..42b1bbc 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -192,3 +192,12 @@ int ordered_events_flush(struct perf_session *s, struct perf_tool *tool,
return err;
}
+
+void ordered_events_queue_init(struct ordered_events_queue *q)
+{
+ INIT_LIST_HEAD(&q->events);
+ INIT_LIST_HEAD(&q->cache);
+ INIT_LIST_HEAD(&q->to_free);
+ q->max_alloc_size = (u64) -1;
+ q->cur_alloc_size = 0;
+}
diff --git a/tools/perf/util/ordered-events.h b/tools/perf/util/ordered-events.h
index c0dc00e..0633b09 100644
--- a/tools/perf/util/ordered-events.h
+++ b/tools/perf/util/ordered-events.h
@@ -40,4 +40,5 @@ void ordered_event_put(struct ordered_events_queue *q,
struct ordered_event *iter);
int ordered_events_flush(struct perf_session *s, struct perf_tool *tool,
enum oeq_flush how);
+void ordered_events_queue_init(struct ordered_events_queue *q);
#endif /* __ORDERED_EVENTS_H */
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 2b97ada..59d13a7 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -76,11 +76,7 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
goto out;
session->repipe = repipe;
- INIT_LIST_HEAD(&session->ordered_events.events);
- INIT_LIST_HEAD(&session->ordered_events.cache);
- INIT_LIST_HEAD(&session->ordered_events.to_free);
- session->ordered_events.max_alloc_size = (u64) -1;
- session->ordered_events.cur_alloc_size = 0;
+ ordered_events_queue_init(&session->ordered_events);
machines__init(&session->machines);
if (file) {
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists