This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 5545f9c
committed
Auto merge of rust-lang#139758 - Zoxc:thread-local-graph, r=<try>
Use thread local dep graph encoding
This adds thread local encoding of dep graph nodes. Each thread has a `MemEncoder` that gets flushed to the global `FileEncoder` when it exceeds 64 kB. Each thread also has a local cache of dep indices. This means there can now be empty gaps in `SerializedDepGraph`.
Indices are marked green and also allocated by the new atomic operation `DepNodeColorMap::try_mark_green` as the encoder lock is removed.
This is based on rust-lang#139636 and rust-lang#139756.File tree
8 files changed
+480
-206
lines changed- compiler
- rustc_data_structures/src
- sync
- rustc_incremental/src/persist
- rustc_query_system/src/dep_graph
- rustc_serialize/src
- opaque
8 files changed
+480
-206
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
| |||
172 | 168 | | |
173 | 169 | | |
174 | 170 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 171 | + | |
183 | 172 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | 127 | | |
130 | 128 | | |
131 | 129 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 130 | + | |
| 131 | + | |
140 | 132 | | |
141 | 133 | | |
142 | 134 | | |
| |||
1052 | 1044 | | |
1053 | 1045 | | |
1054 | 1046 | | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | 1047 | | |
1065 | | - | |
| 1048 | + | |
1066 | 1049 | | |
1067 | 1050 | | |
1068 | 1051 | | |
| |||
1180 | 1163 | | |
1181 | 1164 | | |
1182 | 1165 | | |
1183 | | - | |
1184 | | - | |
| 1166 | + | |
| 1167 | + | |
1185 | 1168 | | |
1186 | 1169 | | |
1187 | 1170 | | |
1188 | 1171 | | |
1189 | 1172 | | |
1190 | 1173 | | |
1191 | 1174 | | |
1192 | | - | |
1193 | | - | |
1194 | 1175 | | |
1195 | 1176 | | |
1196 | 1177 | | |
| |||
1216 | 1197 | | |
1217 | 1198 | | |
1218 | 1199 | | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
| 1200 | + | |
1227 | 1201 | | |
1228 | 1202 | | |
1229 | 1203 | | |
| |||
1350 | 1324 | | |
1351 | 1325 | | |
1352 | 1326 | | |
| 1327 | + | |
1353 | 1328 | | |
1354 | 1329 | | |
1355 | 1330 | | |
| |||
1358 | 1333 | | |
1359 | 1334 | | |
1360 | 1335 | | |
1361 | | - | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
1362 | 1340 | | |
1363 | 1341 | | |
1364 | 1342 | | |
| |||
1367 | 1345 | | |
1368 | 1346 | | |
1369 | 1347 | | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
1370 | 1378 | | |
1371 | 1379 | | |
1372 | 1380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | | - | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
0 commit comments