Skip to content

Commit

Permalink
perf tools: Remove debug.h from header files not needing it
Browse files Browse the repository at this point in the history
And fix the fallout, adding it to places that must have it since they
use its definitions.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-1s3jel4i26chq2g0lydoz7i3@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed Aug 29, 2019
1 parent 0ac25fd commit b420902
Show file tree
Hide file tree
Showing 23 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions tools/perf/arch/arm/util/auxtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <linux/zalloc.h>

#include "../../util/auxtrace.h"
#include "../../util/debug.h"
#include "../../util/evlist.h"
#include "../../util/pmu.h"
#include "cs-etm.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/arch/arm/util/cs-etm.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/zalloc.h>

#include "cs-etm.h"
#include "../../util/debug.h"
#include "../../util/record.h"
#include "../../util/auxtrace.h"
#include "../../util/cpumap.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/arch/x86/tests/perf-time-to-tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <perf/cpumap.h>
#include <perf/evlist.h>

#include "debug.h"
#include "parse-events.h"
#include "evlist.h"
#include "evsel.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/tests/code-reading.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <perf/cpumap.h>
#include <perf/evlist.h>

#include "debug.h"
#include "parse-events.h"
#include "evlist.h"
#include "evsel.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/tests/keep-tracking.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <perf/cpumap.h>
#include <perf/evlist.h>

#include "debug.h"
#include "parse-events.h"
#include "evlist.h"
#include "evsel.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/tests/mmap-basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <pthread.h>
#include <perf/cpumap.h>

#include "debug.h"
#include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
Expand Down
2 changes: 2 additions & 0 deletions tools/perf/tests/sw-clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
#include <stdlib.h>
#include <signal.h>
#include <sys/mman.h>
#include <linux/string.h>

#include "tests.h"
#include "util/debug.h"
#include "util/evsel.h"
#include "util/evlist.h"
#include "util/cpumap.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/tests/switch-tracking.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <perf/cpumap.h>
#include <perf/evlist.h>

#include "debug.h"
#include "parse-events.h"
#include "evlist.h"
#include "evsel.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/tests/task-exit.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include "debug.h"
#include "evlist.h"
#include "evsel.h"
#include "target.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/ui/browsers/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "../ui.h"
#include "../util.h"
#include "../../util/annotate.h"
#include "../../util/debug.h"
#include "../../util/hist.h"
#include "../../util/sort.h"
#include "../../util/map.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/ui/browsers/hists.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/time64.h>
#include <linux/zalloc.h>

#include "../../util/debug.h"
#include "../../util/callchain.h"
#include "../../util/evsel.h"
#include "../../util/evlist.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/ui/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <linux/compiler.h>

#include "../util/callchain.h"
#include "../util/debug.h"
#include "../util/hist.h"
#include "../util/util.h"
#include "../util/sort.h"
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/auxtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include "event.h"
#include "session.h"
#include "debug.h"

union perf_event;
struct perf_session;
Expand Down Expand Up @@ -614,6 +613,7 @@ void itrace_synth_opts__clear_time_range(struct itrace_synth_opts *opts)
}

#else
#include "debug.h"

static inline struct auxtrace_record *
auxtrace_record__init(struct evlist *evlist __maybe_unused,
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "util/hist.h" /* perf_hist_config */
#include "util/llvm-utils.h" /* perf_llvm_config */
#include "config.h"
#include "debug.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/hist.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "callchain.h"
#include "debug.h"
#include "build-id.h"
#include "hist.h"
#include "map.h"
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/llvm-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef __LLVM_UTILS_H
#define __LLVM_UTILS_H

#include "debug.h"
#include <stdbool.h>

struct llvm_param {
/* Path of clang executable */
Expand Down
2 changes: 2 additions & 0 deletions tools/perf/util/metricgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/* Manage metrics and groups of metrics from JSON files */

#include "metricgroup.h"
#include "debug.h"
#include "evlist.h"
#include "evsel.h"
#include "strbuf.h"
Expand All @@ -18,6 +19,7 @@
#include "strlist.h"
#include <assert.h>
#include <linux/ctype.h>
#include <linux/string.h>
#include <linux/zalloc.h>
#include <subcmd/parse-options.h>

Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/python.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <poll.h>
#include <linux/err.h>
#include <perf/cpumap.h>
#include "debug.h"
#include "evlist.h"
#include "callchain.h"
#include "evsel.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/record.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include "debug.h"
#include "evlist.h"
#include "evsel.h"
#include "cpumap.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <sys/mman.h>
#include <perf/cpumap.h>

#include "debug.h"
#include "evlist.h"
#include "evsel.h"
#include "memswap.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <regex.h>
#include <linux/mman.h>
#include <linux/time64.h>
#include "debug.h"
#include "sort.h"
#include "hist.h"
#include "cacheline.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <inttypes.h>
#include <math.h>
#include "counts.h"
#include "debug.h"
#include "stat.h"
#include "target.h"
#include "evlist.h"
Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/trigger.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#ifndef __TRIGGER_H_
#define __TRIGGER_H_ 1

#include "util/debug.h"
#include "asm/bug.h"

/*
Expand Down

0 comments on commit b420902

Please sign in to comment.