mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
perf tools: Improve support for sessions with multiple events
By creating an perf_evlist out of the attributes in the perf.data file header, so that we can use evlists and evsels when reading recorded sessions in addition to when we record sessions. More work is needed to allow tools to allow the user to select which events are wanted when browsing sessions, be it just one or a subset of them, aggregated or showed at the same time but with different indications on the UI to allow seeing workloads thru different views at the same time. But the overall goal/trend is to more uniformly use evsels and evlists. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
3d3b5e9599
commit
e248de331a
10 changed files with 208 additions and 196 deletions
|
@ -34,12 +34,12 @@ struct perf_session {
|
|||
struct thread *last_match;
|
||||
struct machine host_machine;
|
||||
struct rb_root machines;
|
||||
struct rb_root hists_tree;
|
||||
struct perf_evlist *evlist;
|
||||
/*
|
||||
* FIXME: should point to the first entry in hists_tree and
|
||||
* be a hists instance. Right now its only 'report'
|
||||
* that is using ->hists_tree while all the rest use
|
||||
* ->hists.
|
||||
* FIXME: Need to split this up further, we need global
|
||||
* stats + per event stats. 'perf diff' also needs
|
||||
* to properly support multiple events in a single
|
||||
* perf.data file.
|
||||
*/
|
||||
struct hists hists;
|
||||
u64 sample_type;
|
||||
|
@ -151,11 +151,7 @@ size_t perf_session__fprintf_dsos(struct perf_session *self, FILE *fp);
|
|||
size_t perf_session__fprintf_dsos_buildid(struct perf_session *self,
|
||||
FILE *fp, bool with_hits);
|
||||
|
||||
static inline
|
||||
size_t perf_session__fprintf_nr_events(struct perf_session *self, FILE *fp)
|
||||
{
|
||||
return hists__fprintf_nr_events(&self->hists, fp);
|
||||
}
|
||||
size_t perf_session__fprintf_nr_events(struct perf_session *session, FILE *fp);
|
||||
|
||||
static inline int perf_session__parse_sample(struct perf_session *session,
|
||||
const union perf_event *event,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue