* [PATCH] perf: fix perf_event.h header usage
@ 2011-01-04 14:30 Stephane Eranian
2011-01-04 15:44 ` Arnaldo Carvalho de Melo
2011-01-05 17:37 ` [tip:perf/core] perf tools: Fix " tip-bot for Stephane Eranian
0 siblings, 2 replies; 4+ messages in thread
From: Stephane Eranian @ 2011-01-04 14:30 UTC (permalink / raw)
To: linux-kernel
Cc: peterz, mingo, paulus, davem, fweisbec, perfmon2-devel, eranian,
eranian, robert.richter, acme
This patch fixes the usage of the perf_event.h header file
between command modules and the supporting code in util.
It is necessary to ensure that ALL files use the SAME
perf_event.h header from the kernel source tree.
There were a couple of #include <linux/perf_event.h> mixed
with #include "../../perf_event.h".
This caused issues on some distros because of mismatch
in the layout of struct perf_event_attr. That eventually
led perf stat to segfault.
Signed-off-by: Stephane Eranian <eranian@google.com>
---
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 863d78d..a0ccd69 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -3,7 +3,7 @@
#include <linux/list.h>
#include <stdbool.h>
-#include <linux/perf_event.h>
+#include "../../../include/linux/perf_event.h"
#include "types.h"
#include "xyarray.h"
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index 1c9043c..b82cafb 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -4,7 +4,7 @@
* Parse symbolic events/counts passed in as options:
*/
-#include <linux/perf_event.h>
+#include "../../../include/linux/perf_event.h"
struct list_head;
struct perf_evsel;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf: fix perf_event.h header usage
2011-01-04 14:30 [PATCH] perf: fix perf_event.h header usage Stephane Eranian
@ 2011-01-04 15:44 ` Arnaldo Carvalho de Melo
2011-01-04 16:47 ` Robert Richter
2011-01-05 17:37 ` [tip:perf/core] perf tools: Fix " tip-bot for Stephane Eranian
1 sibling, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-01-04 15:44 UTC (permalink / raw)
To: Stephane Eranian
Cc: linux-kernel, peterz, mingo, paulus, davem, fweisbec,
perfmon2-devel, eranian, robert.richter
Em Tue, Jan 04, 2011 at 04:30:01PM +0200, Stephane Eranian escreveu:
> This patch fixes the usage of the perf_event.h header file
> between command modules and the supporting code in util.
>
> It is necessary to ensure that ALL files use the SAME
> perf_event.h header from the kernel source tree.
>
> There were a couple of #include <linux/perf_event.h> mixed
> with #include "../../perf_event.h".
>
> This caused issues on some distros because of mismatch
> in the layout of struct perf_event_attr. That eventually
> led perf stat to segfault.
>
> Signed-off-by: Stephane Eranian <eranian@google.com>
Thanks, applying.
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf: fix perf_event.h header usage
2011-01-04 15:44 ` Arnaldo Carvalho de Melo
@ 2011-01-04 16:47 ` Robert Richter
0 siblings, 0 replies; 4+ messages in thread
From: Robert Richter @ 2011-01-04 16:47 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Stephane Eranian, linux-kernel@vger.kernel.org,
peterz@infradead.org, mingo@elte.hu, paulus@samba.org,
davem@davemloft.net, fweisbec@gmail.com,
perfmon2-devel@lists.sf.net, eranian@gmail.com
On 04.01.11 10:44:39, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jan 04, 2011 at 04:30:01PM +0200, Stephane Eranian escreveu:
> > This patch fixes the usage of the perf_event.h header file
> > between command modules and the supporting code in util.
> >
> > It is necessary to ensure that ALL files use the SAME
> > perf_event.h header from the kernel source tree.
> >
> > There were a couple of #include <linux/perf_event.h> mixed
> > with #include "../../perf_event.h".
> >
> > This caused issues on some distros because of mismatch
> > in the layout of struct perf_event_attr. That eventually
> > led perf stat to segfault.
> >
> > Signed-off-by: Stephane Eranian <eranian@google.com>
>
> Thanks, applying.
Isn't this valid for all <linux/*.h> header files?
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/core] perf tools: Fix perf_event.h header usage
2011-01-04 14:30 [PATCH] perf: fix perf_event.h header usage Stephane Eranian
2011-01-04 15:44 ` Arnaldo Carvalho de Melo
@ 2011-01-05 17:37 ` tip-bot for Stephane Eranian
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Stephane Eranian @ 2011-01-05 17:37 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, eranian, hpa, mingo, peterz, eranian,
davem, robert.richter, fweisbec, tglx, mingo
Commit-ID: d030260ad33b482a371f999c7e9db79ef7a2111f
Gitweb: http://git.kernel.org/tip/d030260ad33b482a371f999c7e9db79ef7a2111f
Author: Stephane Eranian <eranian@google.com>
AuthorDate: Tue, 4 Jan 2011 16:30:01 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 5 Jan 2011 14:52:54 -0200
perf tools: Fix perf_event.h header usage
This patch fixes the usage of the perf_event.h header file
between command modules and the supporting code in util.
It is necessary to ensure that ALL files use the SAME
perf_event.h header from the kernel source tree.
There were a couple of #include <linux/perf_event.h> mixed
with #include "../../perf_event.h".
This caused issues on some distros because of mismatch
in the layout of struct perf_event_attr. That eventually
led perf stat to segfault.
Cc: David S. Miller <davem@davemloft.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@gmail.com>
LKML-Reference: <4d233cf0.2308e30a.7b00.ffffc187@mx.google.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/evsel.h | 2 +-
tools/perf/util/parse-events.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 863d78d..a0ccd69 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -3,7 +3,7 @@
#include <linux/list.h>
#include <stdbool.h>
-#include <linux/perf_event.h>
+#include "../../../include/linux/perf_event.h"
#include "types.h"
#include "xyarray.h"
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index 1c9043c..b82cafb 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -4,7 +4,7 @@
* Parse symbolic events/counts passed in as options:
*/
-#include <linux/perf_event.h>
+#include "../../../include/linux/perf_event.h"
struct list_head;
struct perf_evsel;
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-05 17:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04 14:30 [PATCH] perf: fix perf_event.h header usage Stephane Eranian
2011-01-04 15:44 ` Arnaldo Carvalho de Melo
2011-01-04 16:47 ` Robert Richter
2011-01-05 17:37 ` [tip:perf/core] perf tools: Fix " tip-bot for Stephane Eranian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox