mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
perf ordered_events: Allow tools to specify a deliver method
So that we can simplify the deliver method to pass just: (ordered_events, ordered_event, sample); Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-j0s4bpxs5qza5tnkvjwom9rw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
b7b61cbebd
commit
d10eb1eb76
4 changed files with 37 additions and 17 deletions
|
@ -181,8 +181,7 @@ static int __ordered_events__flush(struct ordered_events *oe)
|
|||
if (ret)
|
||||
pr_err("Can't parse sample, err = %d\n", ret);
|
||||
else {
|
||||
ret = machines__deliver_event(oe->machines, oe->evlist, iter->event,
|
||||
&sample, oe->tool, iter->file_offset);
|
||||
ret = oe->deliver(oe, iter, &sample);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
@ -264,7 +263,8 @@ int ordered_events__flush(struct ordered_events *oe, enum oe_flush how)
|
|||
}
|
||||
|
||||
void ordered_events__init(struct ordered_events *oe, struct machines *machines,
|
||||
struct perf_evlist *evlist, struct perf_tool *tool)
|
||||
struct perf_evlist *evlist, struct perf_tool *tool,
|
||||
ordered_events__deliver_t deliver)
|
||||
{
|
||||
INIT_LIST_HEAD(&oe->events);
|
||||
INIT_LIST_HEAD(&oe->cache);
|
||||
|
@ -274,6 +274,7 @@ void ordered_events__init(struct ordered_events *oe, struct machines *machines,
|
|||
oe->evlist = evlist;
|
||||
oe->machines = machines;
|
||||
oe->tool = tool;
|
||||
oe->deliver = deliver;
|
||||
}
|
||||
|
||||
void ordered_events__free(struct ordered_events *oe)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue