Skip to content

Commit

Permalink
perf tools: Fix perf_event.h header usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephane Eranian authored and Arnaldo Carvalho de Melo committed Jan 5, 2011
1 parent 454a3bb commit d030260
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/perf/util/evsel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/parse-events.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d030260

Please sign in to comment.