Skip to contentSkip to conversation

perf tools: Move 'struct events_stats' and prototypes to separate header

tip: perf/core tip-bot2 for Arnaldo Carvalho de Melo 1 participant 1 message Sep 2, 2019 1 message not in the archive perf events

lore
Share & tools
lore

tip-bot2 for Arnaldo Carvalho de Melo

author merge bot Applied
#1 lore raw
In reply to a message not in the archive

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     4772925885dac93aa5f00d1c1da93277778099cd
Gitweb:        https://git.kernel.org/tip/4772925885dac93aa5f00d1c1da93277778099cd
Author:        Arnaldo Carvalho de Melo <[email protected]>
AuthorDate:    Fri, 30 Aug 2019 11:44:32 -03:00
Committer:     Arnaldo Carvalho de Melo <[email protected]>
CommitterDate: Sat, 31 Aug 2019 22:24:10 -03:00

perf tools: Move 'struct events_stats' and prototypes to separate header

This will allow us to untangle the header dependency a bit more, as some places will not need event.h anymore.

---
 tools/perf/util/auxtrace.h     |  5 +++-
 tools/perf/util/event.h        | 42 +---------------------------
 tools/perf/util/events_stats.h | 51 +++++++++++++++++++++++++++++++++-
 tools/perf/util/evlist.h       |  2 +-
 tools/perf/util/hist.h         |  4 +---
 tools/perf/util/sort.h         |  1 +-
 6 files changed, 58 insertions(+), 47 deletions(-)
 create mode 100644 tools/perf/util/events_stats.h
tools/perf/util/auxtrace.h +5 -0
index b5ac24c..c539e7b 100644
@@ -30,6 +30,11 @@ struct record_opts;
 struct perf_record_auxtrace_info;
 struct events_stats;
 
+enum auxtrace_error_type {
+       PERF_AUXTRACE_ERROR_ITRACE  = 1,
+       PERF_AUXTRACE_ERROR_MAX
+};
+
 /* Auxtrace records must have the same alignment as perf event records */
 #define PERF_AUXTRACE_RECORD_ALIGNMENT 8
 
tools/perf/util/event.h +0 -42

54 lines not on this page · raw message

tools/perf/util/events_stats.h new file +51 -0

51 lines not on this page · raw message

tools/perf/util/evlist.h +1 -1
index ee28864..a55f0f2 100644
@@ -9,7 +9,7 @@
 #include <api/fd/array.h>
 #include <stdio.h>
 #include <internal/evlist.h>
-#include "event.h"
+#include "events_stats.h"
 #include "evsel.h"
 #include "mmap.h"
 #include <signal.h>
tools/perf/util/hist.h +1 -3
index 1c0a635..34803e3 100644
@@ -6,8 +6,8 @@
 #include <linux/types.h>
 #include <pthread.h>
 #include "evsel.h"
-#include "header.h"
 #include "color.h"
+#include "events_stats.h"
 
 struct hist_entry;
 struct hist_entry_ops;
@@ -190,8 +190,6 @@ void hists__reset_stats(struct hists *hists);
 void hists__inc_stats(struct hists *hists, struct hist_entry *h);
 void hists__inc_nr_events(struct hists *hists, u32 type);
 void hists__inc_nr_samples(struct hists *hists, bool filtered);
-void events_stats__inc(struct events_stats *stats, u32 type);
-size_t events_stats__fprintf(struct events_stats *stats, FILE *fp);
 
 size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
 		      int max_cols, float min_pcnt, FILE *fp,
tools/perf/util/sort.h +0 -1
index 3d7cef7..7b93f34 100644
@@ -9,7 +9,6 @@
 #include "symbol_conf.h"
 #include "callchain.h"
 #include "values.h"
-
 #include "hist.h"
 
 struct option;