Commit 010523e
[vm] Fix handling of WeakSerializationReferences in v8 profile.
Instead of trying to lazily create artificial nodes when needed for
WeakSerializationReference (WSR) targets in all cases, create them
eagerly for targets in reachable WSRs, since those are guaranteed
to be needed.
Those for unreachable WSRs are still lazily created as needed, since the
WSR won't even be accessed by the clustered snapshot writer unless the
unreachable WSR is part of another unreachable object that has an
artificial node created.
This rework avoids some issues seen on upcoming CLs where the artificial
nodes for WSR targets weren't getting correctly generated.
-----
Also extend the v8 snapshot profile writer tests to check the sizes of
the text and data sections in ELF snapshots. That means the v8 snapshot
profile writer tests check up to three different measures, from most
precise to least precise, depending on the output mode:
* If writing an ELF snapshot directly: the sum of the sizes attributed
to the text and data section symbols are checked to be exactly the
same as the sum of the sizes of the objects in the profile.
* If writing an ELF snapshot either directly or via assembly: the sum
of the sizes of the text and data sections are checked to be the same
as the sum of the sizes of the objects in the profile. If using an
assembler that merges text and data sections, then account for the
padding between the sections using an approximate check.
* For all: Check that the size of the snapshot as a whole is
approximately equal to the sum of the sizes of the objects in the
profile, accounting both for possible padding and for the global
header information and non-data/non-text sections like the dynamic
symbol section.
TEST=vm/data{,_2}/v8_snapshot_profile_writer_test
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm64-try
Change-Id: I66e0e7fdb5bb98045621bf516f150a4723e08147
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198942
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>1 parent 34add23 commit 010523e
File tree
6 files changed
+171
-72
lines changed- pkg/native_stack_traces
- lib
- runtime
- tests/vm
- dart_2
- dart
- vm
6 files changed
+171
-72
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 59 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
192 | 195 | | |
193 | 196 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
| |||
215 | 220 | | |
216 | 221 | | |
217 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
218 | 263 | | |
219 | 264 | | |
220 | 265 | | |
221 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
222 | 271 | | |
223 | 272 | | |
224 | 273 | | |
| |||
227 | 276 | | |
228 | 277 | | |
229 | 278 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | 279 | | |
234 | 280 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | 281 | | |
239 | 282 | | |
240 | 283 | | |
241 | 284 | | |
242 | | - | |
243 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
244 | 291 | | |
245 | 292 | | |
246 | 293 | | |
| |||
Lines changed: 59 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
200 | 203 | | |
201 | 204 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
206 | 211 | | |
207 | 212 | | |
208 | 213 | | |
| |||
220 | 225 | | |
221 | 226 | | |
222 | 227 | | |
223 | | - | |
224 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
225 | 268 | | |
226 | 269 | | |
227 | 270 | | |
228 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
229 | 276 | | |
230 | 277 | | |
231 | 278 | | |
| |||
234 | 281 | | |
235 | 282 | | |
236 | 283 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | 284 | | |
241 | 285 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | 286 | | |
246 | 287 | | |
247 | 288 | | |
248 | 289 | | |
249 | | - | |
250 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
251 | 296 | | |
252 | 297 | | |
253 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2481 | 2481 | | |
2482 | 2482 | | |
2483 | 2483 | | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
2484 | 2491 | | |
2485 | 2492 | | |
2486 | 2493 | | |
| |||
6268 | 6275 | | |
6269 | 6276 | | |
6270 | 6277 | | |
6271 | | - | |
| 6278 | + | |
6272 | 6279 | | |
6273 | | - | |
6274 | 6280 | | |
6275 | | - | |
6276 | | - | |
6277 | | - | |
6278 | | - | |
6279 | | - | |
6280 | | - | |
6281 | | - | |
| 6281 | + | |
| 6282 | + | |
| 6283 | + | |
| 6284 | + | |
| 6285 | + | |
| 6286 | + | |
| 6287 | + | |
| 6288 | + | |
6282 | 6289 | | |
6283 | | - | |
6284 | | - | |
| 6290 | + | |
6285 | 6291 | | |
6286 | 6292 | | |
6287 | | - | |
6288 | | - | |
6289 | | - | |
6290 | | - | |
6291 | | - | |
6292 | | - | |
6293 | | - | |
6294 | | - | |
| 6293 | + | |
| 6294 | + | |
| 6295 | + | |
| 6296 | + | |
6295 | 6297 | | |
6296 | 6298 | | |
6297 | 6299 | | |
6298 | | - | |
| 6300 | + | |
6299 | 6301 | | |
6300 | 6302 | | |
6301 | 6303 | | |
| |||
6364 | 6366 | | |
6365 | 6367 | | |
6366 | 6368 | | |
6367 | | - | |
6368 | | - | |
| 6369 | + | |
| 6370 | + | |
6369 | 6371 | | |
6370 | 6372 | | |
6371 | | - | |
6372 | | - | |
6373 | | - | |
6374 | | - | |
6375 | | - | |
6376 | | - | |
6377 | | - | |
6378 | | - | |
| 6373 | + | |
6379 | 6374 | | |
6380 | 6375 | | |
6381 | | - | |
6382 | | - | |
6383 | | - | |
6384 | | - | |
6385 | | - | |
6386 | | - | |
6387 | | - | |
6388 | | - | |
| 6376 | + | |
| 6377 | + | |
| 6378 | + | |
| 6379 | + | |
| 6380 | + | |
6389 | 6381 | | |
6390 | | - | |
6391 | | - | |
6392 | | - | |
6393 | | - | |
6394 | 6382 | | |
6395 | 6383 | | |
6396 | 6384 | | |
| |||
6490 | 6478 | | |
6491 | 6479 | | |
6492 | 6480 | | |
| 6481 | + | |
6493 | 6482 | | |
6494 | 6483 | | |
6495 | 6484 | | |
| |||
7045 | 7034 | | |
7046 | 7035 | | |
7047 | 7036 | | |
7048 | | - | |
| 7037 | + | |
| 7038 | + | |
7049 | 7039 | | |
7050 | 7040 | | |
7051 | | - | |
| 7041 | + | |
7052 | 7042 | | |
7053 | 7043 | | |
7054 | 7044 | | |
| |||
7137 | 7127 | | |
7138 | 7128 | | |
7139 | 7129 | | |
| 7130 | + | |
| 7131 | + | |
| 7132 | + | |
| 7133 | + | |
| 7134 | + | |
| 7135 | + | |
| 7136 | + | |
| 7137 | + | |
| 7138 | + | |
| 7139 | + | |
| 7140 | + | |
| 7141 | + | |
| 7142 | + | |
7140 | 7143 | | |
7141 | 7144 | | |
7142 | 7145 | | |
| |||
0 commit comments