From: David Ahern <dsahern@gmail.com>
To: acme@ghostprotocols.net, linux-kernel@vger.kernel.org
Cc: xiaoguangrong@linux.vnet.ibm.com, David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@kernel.org>, Jiri Olsa <jolsa@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Runzhen Wang <runzhen@linux.vnet.ibm.com>
Subject: [PATCH 1/5] perf session: Export queue_event function
Date: Mon, 5 Aug 2013 21:41:33 -0400 [thread overview]
Message-ID: <1375753297-69645-2-git-send-email-dsahern@gmail.com> (raw)
In-Reply-To: <1375753297-69645-1-git-send-email-dsahern@gmail.com>
Taking a lesson from perf-trace and bringing in control of event
processing to perf-kvm-stat-live: parse the sample to get access the
time leaving just the need to queue it to the ordered samples list.
For that the queue_event function needs to be exported.
Unexport perf_session__process_event.
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Runzhen Wang <runzhen@linux.vnet.ibm.com>
Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
---
tools/perf/util/session.c | 10 +++++-----
tools/perf/util/session.h | 6 ++----
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index b5ebd47..dedaeb2 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -643,7 +643,7 @@ static void __queue_event(struct sample_queue *new, struct perf_session *s)
#define MAX_SAMPLE_BUFFER (64 * 1024 / sizeof(struct sample_queue))
-static int perf_session_queue_event(struct perf_session *s, union perf_event *event,
+int perf_session_queue_event(struct perf_session *s, union perf_event *event,
struct perf_sample *sample, u64 file_offset)
{
struct ordered_samples *os = &s->ordered_samples;
@@ -1049,10 +1049,10 @@ static void event_swap(union perf_event *event, bool sample_id_all)
swap(event, sample_id_all);
}
-int perf_session__process_event(struct perf_session *session,
- union perf_event *event,
- struct perf_tool *tool,
- u64 file_offset)
+static int perf_session__process_event(struct perf_session *session,
+ union perf_event *event,
+ struct perf_tool *tool,
+ u64 file_offset)
{
struct perf_sample sample;
int ret;
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 9818fc2..8bed17e 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -56,10 +56,8 @@ int __perf_session__process_events(struct perf_session *self,
int perf_session__process_events(struct perf_session *self,
struct perf_tool *tool);
-int perf_session__process_event(struct perf_session *session,
- union perf_event *event,
- struct perf_tool *tool,
- u64 file_offset);
+int perf_session_queue_event(struct perf_session *s, union perf_event *event,
+ struct perf_sample *sample, u64 file_offset);
void perf_tool__fill_defaults(struct perf_tool *tool);
--
1.7.10.1
next prev parent reply other threads:[~2013-08-06 1:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 1:41 [PATCH 0/5] perf kvm live - latest round take 4 David Ahern
2013-08-06 1:41 ` David Ahern [this message]
2013-08-12 10:23 ` [tip:perf/core] perf session: Export queue_event function tip-bot for David Ahern
2013-08-06 1:41 ` [PATCH 2/5] perf kvm: add live mode - v4 David Ahern
2013-08-12 10:23 ` [tip:perf/core] perf kvm: Add live mode tip-bot for David Ahern
2013-08-06 1:41 ` [PATCH 3/5] perf kvm: add min and max stats to display - v2 David Ahern
2013-08-12 10:23 ` [tip:perf/core] perf kvm: Add min and max stats to display tip-bot for David Ahern
2013-08-06 1:41 ` [PATCH 4/5] perf kvm: option to print events that exceed a threshold David Ahern
2013-08-07 19:27 ` Arnaldo Carvalho de Melo
2013-08-07 20:24 ` David Ahern
2013-08-07 20:34 ` Arnaldo Carvalho de Melo
2013-08-06 1:41 ` [PATCH 5/5] perf kvm stat report: Add option to analyze specific VM David Ahern
2013-08-12 10:23 ` [tip:perf/core] " tip-bot for David Ahern
2013-08-06 5:45 ` [PATCH 0/5] perf kvm live - latest round take 4 Xiao Guangrong
2013-08-06 13:28 ` David Ahern
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=1375753297-69645-2-git-send-email-dsahern@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@ghostprotocols.net \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=runzhen@linux.vnet.ibm.com \
--cc=xiaoguangrong@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®