Commit d030260a authored by Stephane Eranian's avatar Stephane Eranian Committed by Arnaldo Carvalho de Melo
Browse files

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 <>
Cc: Frederic Weisbecker <>
Cc: Ingo Molnar <>
Cc: Paul Mackerras <>
Cc: Peter Zijlstra <>
Cc: Robert Richter <>
Cc: Stephane Eranian <>
LKML-Reference: <>
Signed-off-by: default avatarStephane Eranian <>
Signed-off-by: default avatarArnaldo Carvalho de Melo <>
parent 454a3bbe
......@@ -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"
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment