[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-xd1hpoze3kgb1rb639o3vehb@git.kernel.org>
Date: Sat, 18 Nov 2017 00:40:58 -0800
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, jolsa@...nel.org, hpa@...or.com,
linux-kernel@...r.kernel.org, tglx@...utronix.de,
wangnan0@...wei.com, adrian.hunter@...el.com, namhyung@...nel.org,
dsahern@...il.com, acme@...hat.com
Subject: [tip:perf/core] perf ordered_events: Pass timestamp arg in
perf_session__queue_event
Commit-ID: dc83e1394083d6e12625a3158bf88396dfaec633
Gitweb: https://git.kernel.org/tip/dc83e1394083d6e12625a3158bf88396dfaec633
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Thu, 3 Aug 2017 13:24:33 +0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 17 Nov 2017 12:14:09 -0300
perf ordered_events: Pass timestamp arg in perf_session__queue_event
There's no need to pass whole sample data, because it's only timestamp
that is used.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-xd1hpoze3kgb1rb639o3vehb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-kvm.c | 2 +-
tools/perf/util/ordered-events.c | 3 +--
tools/perf/util/ordered-events.h | 2 +-
tools/perf/util/session.c | 6 +++---
tools/perf/util/session.h | 2 +-
5 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 0c36f2a..cd253db 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -754,7 +754,7 @@ static s64 perf_kvm__mmap_read_idx(struct perf_kvm_stat *kvm, int idx,
return -1;
}
- err = perf_session__queue_event(kvm->session, event, &sample, 0);
+ err = perf_session__queue_event(kvm->session, event, sample.time, 0);
/*
* FIXME: Here we can't consume the event, as perf_session__queue_event will
* point to it, and it'll get possibly overwritten by the kernel.
diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c
index 8e09fd2..bad9e02 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -157,9 +157,8 @@ void ordered_events__delete(struct ordered_events *oe, struct ordered_event *eve
}
int ordered_events__queue(struct ordered_events *oe, union perf_event *event,
- struct perf_sample *sample, u64 file_offset)
+ u64 timestamp, u64 file_offset)
{
- u64 timestamp = sample->time;
struct ordered_event *oevent;
if (!timestamp || timestamp == ~0ULL)
diff --git a/tools/perf/util/ordered-events.h b/tools/perf/util/ordered-events.h
index 96e5292..8c7a294 100644
--- a/tools/perf/util/ordered-events.h
+++ b/tools/perf/util/ordered-events.h
@@ -45,7 +45,7 @@ struct ordered_events {
};
int ordered_events__queue(struct ordered_events *oe, union perf_event *event,
- struct perf_sample *sample, u64 file_offset);
+ u64 timestamp, u64 file_offset);
void ordered_events__delete(struct ordered_events *oe, struct ordered_event *event);
int ordered_events__flush(struct ordered_events *oe, enum oe_flush how);
void ordered_events__init(struct ordered_events *oe, ordered_events__deliver_t deliver);
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 5c41231..8976e41 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -873,9 +873,9 @@ static int process_finished_round(struct perf_tool *tool __maybe_unused,
}
int perf_session__queue_event(struct perf_session *s, union perf_event *event,
- struct perf_sample *sample, u64 file_offset)
+ u64 timestamp, u64 file_offset)
{
- return ordered_events__queue(&s->ordered_events, event, sample, file_offset);
+ return ordered_events__queue(&s->ordered_events, event, timestamp, file_offset);
}
static void callchain__lbr_callstack_printf(struct perf_sample *sample)
@@ -1517,7 +1517,7 @@ static s64 perf_session__process_event(struct perf_session *session,
return ret;
if (tool->ordered_events) {
- ret = perf_session__queue_event(session, event, &sample, file_offset);
+ ret = perf_session__queue_event(session, event, sample.time, file_offset);
if (ret != -ETIME)
return ret;
}
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 80bc80d..5b1c32b 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -53,7 +53,7 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset,
int perf_session__process_events(struct perf_session *session);
int perf_session__queue_event(struct perf_session *s, union perf_event *event,
- struct perf_sample *sample, u64 file_offset);
+ u64 timestamp, u64 file_offset);
void perf_tool__fill_defaults(struct perf_tool *tool);
Powered by blists - more mailing lists