From: "tip-bot2 for Arnaldo Carvalho de Melo" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Adrian Hunter <adrian.hunter@intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
linux-kernel@vger.kernel.org
Subject: [tip: perf/urgent] perf stat: Move perf_stat_synthesize_config() to event.h
Date: Fri, 20 Sep 2019 16:20:59 -0000 [thread overview]
Message-ID: <156899645989.24167.3290450684967954761.tip-bot2@tip-bot2> (raw)
In-Reply-To: <tip-q5ebhrp44txboobs86htu5r9@git.kernel.org>
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: b251892d6ceafa3c8f8e6835a664e248766b1b3e
Gitweb: https://git.kernel.org/tip/b251892d6ceafa3c8f8e6835a664e248766b1b3e
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Tue, 10 Sep 2019 17:17:33 +01:00
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Fri, 20 Sep 2019 09:19:21 -03:00
perf stat: Move perf_stat_synthesize_config() to event.h
Together with the other synthsizers, and rename it to
perf_event__synthesize_stat_events().
This allows us to stop including event.h in util/stat.h.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-q5ebhrp44txboobs86htu5r9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-stat.c | 4 ++--
tools/perf/util/event.h | 5 +++++
tools/perf/util/stat.c | 10 +++++-----
tools/perf/util/stat.h | 8 ++------
4 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 5bc0c57..b55e806 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -540,8 +540,8 @@ try_again:
if (err < 0)
return err;
- err = perf_stat_synthesize_config(&stat_config, NULL, evsel_list,
- process_synthesized_event, is_pipe);
+ err = perf_event__synthesize_stat_events(&stat_config, NULL, evsel_list,
+ process_synthesized_event, is_pipe);
if (err < 0)
return err;
}
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index 4e6d33c..89a2404 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -293,6 +293,11 @@ typedef int (*perf_event__handler_t)(struct perf_tool *tool,
struct perf_sample *sample,
struct machine *machine);
+int perf_event__synthesize_stat_events(struct perf_stat_config *config,
+ struct perf_tool *tool,
+ struct evlist *evlist,
+ perf_event__handler_t process,
+ bool attrs);
int perf_event__synthesize_attr(struct perf_tool *tool,
struct perf_event_attr *attr, u32 ids, u64 *id,
perf_event__handler_t process);
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index d309c1c..2e318d9 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -495,11 +495,11 @@ int create_perf_stat_counter(struct evsel *evsel,
return perf_evsel__open_per_thread(evsel, evsel->core.threads);
}
-int perf_stat_synthesize_config(struct perf_stat_config *config,
- struct perf_tool *tool,
- struct evlist *evlist,
- perf_event__handler_t process,
- bool attrs)
+int perf_event__synthesize_stat_events(struct perf_stat_config *config,
+ struct perf_tool *tool,
+ struct evlist *evlist,
+ perf_event__handler_t process,
+ bool attrs)
{
int err;
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index 14fe3e5..0f9c9f6 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -7,8 +7,9 @@
#include <sys/types.h>
#include <sys/resource.h>
#include "rblist.h"
-#include "event.h"
+struct perf_cpu_map;
+struct perf_stat_config;
struct timespec;
struct stats {
@@ -210,11 +211,6 @@ size_t perf_event__fprintf_stat_config(union perf_event *event, FILE *fp);
int create_perf_stat_counter(struct evsel *evsel,
struct perf_stat_config *config,
struct target *target);
-int perf_stat_synthesize_config(struct perf_stat_config *config,
- struct perf_tool *tool,
- struct evlist *evlist,
- perf_event__handler_t process,
- bool attrs);
void
perf_evlist__print_counters(struct evlist *evlist,
struct perf_stat_config *config,
parent reply other threads:[~2019-09-20 16:22 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <tip-q5ebhrp44txboobs86htu5r9@git.kernel.org>]
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=156899645989.24167.3290450684967954761.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=bp@alien8.de \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).