Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1491329
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format |
| Date | 2016-09-26 17:10 +0200 |
| Message-ID | <slFHz-5oB-5@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <sjgNj-42P-1@gated-at.bofh.it> <sjh6F-4dN-13@gated-at.bofh.it> <skdNn-7ZV-29@gated-at.bofh.it> <skf2O-eA-25@gated-at.bofh.it> <slzCa-1yg-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Em Mon, Sep 26, 2016 at 10:35:33AM +0200, Jiri Olsa escreveu:
> ping.. is that working for you? IMO we can include this
> as additional patch to the set..
No, it doesn't fails to build on the first cross env I tried, fixing it
now, resulting patch:
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 72edf83d76b7..9365c155c6f3 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -758,6 +758,10 @@ ifndef NO_AUXTRACE
endif
endif
+ifndef CROSS_COMPILE
+ CFLAGS += -DHAVE_PMU_EVENTS_SUPPORT
+endif
+
# Among the variables below, these:
# perfexecdir
# template_dir
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 26dbee50b36c..ee86dbf2814e 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -349,7 +349,14 @@ include $(srctree)/tools/build/Makefile.include
JEVENTS := $(OUTPUT)pmu-events/jevents
JEVENTS_IN := $(OUTPUT)pmu-events/jevents-in.o
+
+#
+# Disabling pmu-events for cross compile, as
+# we dont support host CC tools building yet.
+#
+ifndef CROSS_COMPILE
PMU_EVENTS_IN := $(OUTPUT)pmu-events/pmu-events-in.o
+endif
export JEVENTS
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 2babcdf62839..37f74fcc9ca2 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -377,6 +377,8 @@ static int pmu_alias_terms(struct perf_pmu_alias *alias,
return 0;
}
+#ifdef HAVE_PMU_EVENTS_SUPPORT
+
/*
* Reading/parsing the default pmu type value, which should be
* located at:
@@ -473,6 +475,23 @@ static struct cpu_map *pmu_cpumask(const char *name)
return cpus;
}
+#else
+static int pmu_type(const char *name __maybe_unused, __u32 *type)
+{
+ *type = 0;
+ return 0;
+}
+
+static void pmu_read_sysfs(void)
+{
+}
+
+static struct cpu_map *pmu_cpumask(const char *name __maybe_unused)
+{
+ return NULL;
+}
+#endif /* HAVE_PMU_EVENTS_SUPPORT */
+
struct perf_event_attr * __weak
perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused)
{
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format Jiri Olsa <jolsa@redhat.com> - 2016-09-26 10:40 +0200
Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-26 17:10 +0200
Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format Andi Kleen <andi@firstfloor.org> - 2016-09-26 19:10 +0200
Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format Jiri Olsa <jolsa@redhat.com> - 2016-09-27 16:20 +0200
Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-30 00:30 +0200
Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format Jiri Olsa <jolsa@redhat.com> - 2016-09-30 11:20 +0200
[tip:perf/urgent] tools build: Add support for host programs format tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-10-04 10:20 +0200
[tip:perf/urgent] perf jevents: Program to convert JSON file tip-bot for Andi Kleen <tipbot@zytor.com> - 2016-10-04 10:20 +0200
[tip:perf/urgent] tools build: Make fixdep a hostprog tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-10-04 10:20 +0200
csiph-web