Skip to content

Commit

Permalink
perf build: Include generated header files properly
Browse files Browse the repository at this point in the history
The flex and bison generate header files from the source.  When user
specified a build directory with O= option, it'd generate files under
the directory.  The build command has -I option to specify the header
include directory.

But the -I option only affects the files included like <...>.  Let's
change the flex and bison headers to use it instead of "...".

Fixes: 80eeb67 ("perf jevents: Program to convert JSON file")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Anup Sharma <anupnewsmail@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230728022447.1323563-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed Aug 3, 2023
1 parent 7822a89 commit c7e97f2
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tools/perf/pmu-events/jevents.py
Original file line number Diff line number Diff line change
@@ -1000,7 +1000,7 @@ def ftw(path: str, parents: Sequence[str],
_args = ap.parse_args()

_args.output_file.write("""
#include "pmu-events/pmu-events.h"
#include <pmu-events/pmu-events.h>
#include "util/header.h"
#include "util/pmu.h"
#include <string.h>
4 changes: 2 additions & 2 deletions tools/perf/util/bpf-filter.c
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@
#include "util/evsel.h"

#include "util/bpf-filter.h"
#include "util/bpf-filter-flex.h"
#include "util/bpf-filter-bison.h"
#include <util/bpf-filter-flex.h>
#include <util/bpf-filter-bison.h>

#include "bpf_skel/sample-filter.h"
#include "bpf_skel/sample_filter.skel.h"
4 changes: 2 additions & 2 deletions tools/perf/util/expr.c
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@
#include "debug.h"
#include "evlist.h"
#include "expr.h"
#include "expr-bison.h"
#include "expr-flex.h"
#include <util/expr-bison.h>
#include <util/expr-flex.h>
#include "util/hashmap.h"
#include "smt.h"
#include "tsc.h"
4 changes: 2 additions & 2 deletions tools/perf/util/parse-events.c
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@
#include "debug.h"
#include <api/fs/tracing_path.h>
#include <perf/cpumap.h>
#include "parse-events-bison.h"
#include "parse-events-flex.h"
#include <util/parse-events-bison.h>
#include <util/parse-events-flex.h>
#include "pmu.h"
#include "pmus.h"
#include "asm/bug.h"
4 changes: 2 additions & 2 deletions tools/perf/util/pmu.c
Original file line number Diff line number Diff line change
@@ -19,8 +19,8 @@
#include "evsel.h"
#include "pmu.h"
#include "pmus.h"
#include "pmu-bison.h"
#include "pmu-flex.h"
#include <util/pmu-bison.h>
#include <util/pmu-flex.h>
#include "parse-events.h"
#include "print-events.h"
#include "header.h"

0 comments on commit c7e97f2

Please sign in to comment.