Skip to content

Commit 185bcb9

Browse files
committed
perf sort: Remove needless headers from sort.h, provide fwd struct decls
Reducing the includes hell a bit more, speeding up the build and avoiding needless rebuilds when just one of those files gets updated. 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-u63el2vqsovsmnhebx1rcixo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 97b9d86 commit 185bcb9

5 files changed

Lines changed: 8 additions & 13 deletions

File tree

‎tools/perf/ui/browsers/res_sample.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include "sort.h"
77
#include "config.h"
88
#include "time-utils.h"
9+
#include "../util.h"
10+
#include "../../util/util.h"
911
#include <linux/time64.h>
1012
#include <linux/zalloc.h>
1113

‎tools/perf/ui/browsers/scripts.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
2+
#include "../../builtin.h"
23
#include "../../util/sort.h"
4+
#include "../../util/util.h"
35
#include "../../util/hist.h"
46
#include "../../util/debug.h"
57
#include "../../util/symbol.h"

‎tools/perf/ui/stdio/hist.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <linux/string.h>
44

55
#include "../../util/callchain.h"
6+
#include "../../util/debug.h"
67
#include "../../util/hist.h"
78
#include "../../util/map.h"
89
#include "../../util/map_groups.h"

‎tools/perf/util/callchain.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include "asm/bug.h"
2222

23+
#include "debug.h"
2324
#include "hist.h"
2425
#include "sort.h"
2526
#include "machine.h"

‎tools/perf/util/sort.h‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,18 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
22
#ifndef __PERF_SORT_H
33
#define __PERF_SORT_H
4-
#include "../builtin.h"
5-
64
#include <regex.h>
7-
8-
#include "color.h"
5+
#include <stdbool.h>
96
#include <linux/list.h>
10-
#include "cache.h"
117
#include <linux/rbtree.h>
128
#include "map_symbol.h"
139
#include "symbol_conf.h"
14-
#include "string.h"
1510
#include "callchain.h"
1611
#include "values.h"
1712

18-
#include "../perf.h"
19-
#include "debug.h"
20-
#include "header.h"
21-
22-
#include <subcmd/parse-options.h>
23-
#include "parse-events.h"
2413
#include "hist.h"
25-
#include "srcline.h"
2614

15+
struct option;
2716
struct thread;
2817

2918
extern regex_t parent_regex;

0 commit comments

Comments
 (0)