Commit 950ccee
src: name EmbededderGraph edges and use class names for nodes
This patch: - Refactors the `MemoryRetainer` API so that the impementer no longer calls `TrackThis()` that sets the size of node on the top of the stack, which may be hard to understand. Instead now they implements `SelfSize()` to provide their self sizes. Also documents the API in the header. - Refactors `MemoryTracker` so it calls `MemoryInfoName()` and `SelfSize()` of `MemoryRetainer` to retrieve info about them, and separate `node_names` and `edge_names` so the edges can be properly named with reference names and the nodes can be named with class names. (Previously the nodes are named with reference names while the edges are all indexed and appear as array elements). - Adds `SET_MEMORY_INFO_NAME()`, `SET_SELF_SIZE()` and `SET_NO_MEMORY_INFO()` convenience macros - Fixes a few `MemoryInfo` calls in some `MemoryRetainers` to track their references properly. - Refactors the heapdump tests to check both node names and edge names, distinguishing between wrapped JS nodes (without prefixes) and embedder wrappers (prefixed with `Node / `). Backport-PR-URL: #23295 PR-URL: #23072 Reviewed-By: Anna Henningsen <[email protected]>1 parent 390fc85 commit 950ccee
File tree
50 files changed
+734
-507
lines changed- lib/internal/test
- src
- test
- cctest
- common
- parallel
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
50 files changed
+734
-507
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
184 | | - | |
185 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 36 | | |
42 | 37 | | |
43 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
175 | | - | |
176 | 176 | | |
177 | | - | |
178 | | - | |
| 177 | + | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | 196 | | |
201 | 197 | | |
202 | 198 | | |
| |||
225 | 221 | | |
226 | 222 | | |
227 | 223 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
233 | 227 | | |
234 | 228 | | |
235 | 229 | | |
| |||
249 | 243 | | |
250 | 244 | | |
251 | 245 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
257 | 249 | | |
258 | 250 | | |
259 | 251 | | |
| |||
298 | 290 | | |
299 | 291 | | |
300 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
301 | 296 | | |
302 | 297 | | |
303 | 298 | | |
| |||
1195 | 1190 | | |
1196 | 1191 | | |
1197 | 1192 | | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1203 | 1196 | | |
1204 | 1197 | | |
1205 | 1198 | | |
| |||
1376 | 1369 | | |
1377 | 1370 | | |
1378 | 1371 | | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
1382 | | - | |
1383 | | - | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
1384 | 1375 | | |
1385 | 1376 | | |
1386 | 1377 | | |
| |||
1424 | 1415 | | |
1425 | 1416 | | |
1426 | 1417 | | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
1432 | 1421 | | |
1433 | 1422 | | |
1434 | 1423 | | |
| |||
1472 | 1461 | | |
1473 | 1462 | | |
1474 | 1463 | | |
1475 | | - | |
1476 | | - | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1480 | 1467 | | |
1481 | 1468 | | |
1482 | 1469 | | |
| |||
1507 | 1494 | | |
1508 | 1495 | | |
1509 | 1496 | | |
1510 | | - | |
1511 | | - | |
1512 | | - | |
1513 | | - | |
1514 | | - | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
1515 | 1500 | | |
1516 | 1501 | | |
1517 | 1502 | | |
| |||
1542 | 1527 | | |
1543 | 1528 | | |
1544 | 1529 | | |
1545 | | - | |
1546 | | - | |
1547 | | - | |
1548 | | - | |
1549 | | - | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
1550 | 1533 | | |
1551 | 1534 | | |
1552 | 1535 | | |
| |||
1577 | 1560 | | |
1578 | 1561 | | |
1579 | 1562 | | |
1580 | | - | |
1581 | | - | |
1582 | | - | |
1583 | | - | |
1584 | | - | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
1585 | 1566 | | |
1586 | 1567 | | |
1587 | 1568 | | |
| |||
1611 | 1592 | | |
1612 | 1593 | | |
1613 | 1594 | | |
1614 | | - | |
1615 | | - | |
1616 | | - | |
1617 | | - | |
1618 | | - | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
1619 | 1598 | | |
1620 | 1599 | | |
1621 | 1600 | | |
| |||
1644 | 1623 | | |
1645 | 1624 | | |
1646 | 1625 | | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
1650 | | - | |
1651 | | - | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
1652 | 1629 | | |
1653 | 1630 | | |
1654 | 1631 | | |
| |||
1679 | 1656 | | |
1680 | 1657 | | |
1681 | 1658 | | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
1685 | | - | |
1686 | | - | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
1687 | 1662 | | |
1688 | 1663 | | |
1689 | 1664 | | |
| |||
1713 | 1688 | | |
1714 | 1689 | | |
1715 | 1690 | | |
1716 | | - | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
1721 | 1694 | | |
1722 | 1695 | | |
1723 | 1696 | | |
| |||
1801 | 1774 | | |
1802 | 1775 | | |
1803 | 1776 | | |
1804 | | - | |
1805 | | - | |
1806 | | - | |
1807 | | - | |
1808 | | - | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
1809 | 1780 | | |
1810 | 1781 | | |
1811 | 1782 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| |||
0 commit comments