Skip to content

Commit

Permalink
perf tools: Remove needless perf.h include directive from headers
Browse files Browse the repository at this point in the history
Its not needed there, add it to the places that need it and were getting
it via those headers.

Cc: Adrian Hunter <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: https://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
acmel committed Aug 29, 2019
1 parent f371102 commit c1a604d
Show file tree
Hide file tree
Showing 21 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions tools/perf/builtin-c2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "thread.h"
#include "mem2node.h"
#include "symbol.h"
#include "../perf.h"

struct c2c_hists {
struct hists hists;
Expand Down
1 change: 1 addition & 0 deletions tools/perf/builtin-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* DSOs and symbol information, sort them and produce a diff.
*/
#include "builtin.h"
#include "perf.h"

#include "util/debug.h"
#include "util/event.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "util/units.h"
#include "util/bpf-event.h"
#include "asm/bug.h"
#include "perf.h"

#include <errno.h>
#include <inttypes.h>
Expand Down
1 change: 1 addition & 0 deletions tools/perf/builtin-script.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include <perf/evlist.h>
#include "util/record.h"
#include "util/util.h"
#include "perf.h"

#include <linux/ctype.h>

Expand Down
1 change: 1 addition & 0 deletions tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
*/

#include "builtin.h"
#include "perf.h"
#include "util/cgroup.h"
#include <subcmd/parse-options.h>
#include "util/parse-events.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include "string2.h"
#include "syscalltbl.h"
#include "rb_resort.h"
#include "../perf.h"

#include <errno.h>
#include <inttypes.h>
Expand Down
1 change: 1 addition & 0 deletions tools/perf/perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* perf top, perf record, perf report, etc.) are started.
*/
#include "builtin.h"
#include "perf.h"

#include "util/env.h"
#include <subcmd/exec-cmd.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 @@ -22,6 +22,7 @@
#include "../../util/top.h"
#include "../../util/thread.h"
#include "../../arch/common.h"
#include "../../perf.h"

#include "../browsers/hists.h"
#include "../helpline.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/ui/browsers/res_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "time-utils.h"
#include "../util.h"
#include "../../util/util.h"
#include "../../perf.h"
#include <linux/time64.h>
#include <linux/zalloc.h>

Expand Down
1 change: 1 addition & 0 deletions tools/perf/ui/browsers/scripts.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "../../builtin.h"
#include "../../perf.h"
#include "../../util/sort.h"
#include "../../util/util.h"
#include "../../util/hist.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 @@ -9,6 +9,7 @@
#include "../util/sort.h"
#include "../util/evsel.h"
#include "../util/evlist.h"
#include "../perf.h"

/* hist period print (hpp) functions */

Expand Down
1 change: 1 addition & 0 deletions tools/perf/ui/tui/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "../../util/cache.h"
#include "../../util/debug.h"
#include "../../util/util.h"
#include "../../perf.h"
#include "../browser.h"
#include "../helpline.h"
#include "../ui.h"
Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/auxtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <asm/bitsperlong.h>
#include <asm/barrier.h>

#include "../perf.h"
#include "event.h"
#include "session.h"
#include "debug.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/callchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "callchain.h"
#include "branch.h"
#include "symbol.h"
#include "../perf.h"

#define CALLCHAIN_PARAM_DEFAULT \
.mode = CHAIN_GRAPH_ABS, \
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "stat.h"
#include "session.h"
#include "bpf-event.h"
#include "../perf.h"

#define DEFAULT_PROC_MAP_PARSE_TIMEOUT 500

Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <linux/perf_event.h>
#include <perf/event.h>

#include "../perf.h"
#include "build-id.h"
#include "perf_regs.h"

Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/evlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "debug.h"
#include "units.h"
#include "util.h"
#include "../perf.h"
#include "asm/bug.h"
#include "bpf-event.h"
#include <signal.h>
Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/evlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <api/fd/array.h>
#include <stdio.h>
#include <internal/evlist.h>
#include "../perf.h"
#include "event.h"
#include "evsel.h"
#include "mmap.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "debug.h"
#include "event.h"
#include "mmap.h"
#include "../perf.h"
#include "util.h" /* page_size */

size_t perf_mmap__mmap_len(struct perf_mmap *map)
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 @@ -29,6 +29,7 @@
#include "sample-raw.h"
#include "stat.h"
#include "util.h"
#include "../perf.h"
#include "arch/common.h"

#ifdef HAVE_ZSTD_SUPPORT
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/top.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "parse-events.h"
#include "symbol.h"
#include "top.h"
#include "../perf.h"
#include <inttypes.h>

#define SNPRINTF(buf, size, fmt, args...) \
Expand Down

0 comments on commit c1a604d

Please sign in to comment.