Commit 04fd9ae
IMPALA-9373: Trial run of include-what-you-use
Implemented recommendations from IWYU in a subset of
files, mostly in util. Did a few cleanups related to
systematic problems that I noticed as a result.
I noticed that uid-util.h was pulling in boost UUID headers
to a lot of compilation units, so refactored that a little
bit, including pulling out the hash functions into
unique-id-hash.h and moving some inline functions into
client-request-state-map.cc.
Systematically replaced the general boost mutex header with the
internal pthread-based one. This is equivalent for us, since
we assume that boost::mutex is implemented by pthread_mutex_t,
e.g. for the implementation of ConditionVariable.
Switch include guards to pragma once just as general cleanup.
Prefix string with std:: consistently in headers so that they
don't depend on "using" declarations pulled in from random
headers.
Look at includes of C++ stream headers, including iostream and
stringstream, and replaced them with iosfwd or removed them
if possible.
Compile time:
Measured a full ASAN build of the impalad binary on an 8 core
machine with cccache enabled, but cleared. It used very slightly
less CPU, probably because we are still pulling in most of the
same system headers.
Before:
real 9m27.502s
user 64m39.775s
sys 2m49.002s
After:
real 9m26.561s
user 64m28.948s
sys 2m48.252s
So for the moment, the only significant wins are on incremental
builds, where touching header files should not require as many
recompilations. Compile times should start to drop meaningfully
once we thin out more unnecessary includes - currently it seems
like most compile units end up with large chunks of boost/std
code included via transitive header dependencies.
Change-Id: I3450e0ffcb8b183e18ac59c8b33b9ecbd3f60e20
Reviewed-on: http://gerrit.cloudera.org:8080/15202
Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>1 parent f216e68 commit 04fd9ae
File tree
169 files changed
+697
-729
lines changed- be/src
- benchmarks
- catalog
- codegen
- common
- exec
- parquet
- experiments
- exprs
- rpc
- runtime
- bufferpool
- io
- scheduling
- service
- statestore
- testutil
- thirdparty/mustache
- transport
- udf
- util
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
169 files changed
+697
-729
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
| 22 | + | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
236 | 235 | | |
237 | 236 | | |
238 | 237 | | |
239 | | - | |
240 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 20 | + | |
25 | 21 | | |
26 | 22 | | |
27 | 23 | | |
28 | | - | |
29 | 24 | | |
30 | 25 | | |
31 | 26 | | |
32 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | | - | |
| 22 | + | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| |||
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
70 | | - | |
71 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
0 commit comments