Commit 3526020
committed
Repply [memprof] Introduce FrameIdConverter and CallStackIdConverter (#90307)
Currently, we convert FrameId to Frame and CallStackId to a call stack
at several places. This patch unifies those into function objects --
FrameIdConverter and CallStackIdConverter.
The existing implementation of CallStackIdConverter, being removed in
this patch, handles both FrameId and CallStackId conversions. This
patch splits it into two phases for flexibility (but make them
composable) because some places only require the FrameId conversion.
This iteration fixes a problem uncovered with ubsan, where we were
dereferencing an uninitialized std::unique_ptr.1 parent 6dd9061 commit 3526020
File tree
5 files changed
+107
-125
lines changed- llvm
- include/llvm/ProfileData
- lib/ProfileData
- unittests/ProfileData
5 files changed
+107
-125
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
740 | 798 | | |
741 | 799 | | |
742 | 800 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 79 | + | |
| 80 | + | |
87 | 81 | | |
88 | 82 | | |
89 | 83 | | |
90 | 84 | | |
91 | | - | |
| 85 | + | |
92 | 86 | | |
| 87 | + | |
| 88 | + | |
93 | 89 | | |
94 | 90 | | |
95 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1520 | 1520 | | |
1521 | 1521 | | |
1522 | 1522 | | |
1523 | | - | |
1524 | | - | |
1525 | | - | |
1526 | | - | |
1527 | | - | |
1528 | | - | |
1529 | | - | |
1530 | | - | |
1531 | | - | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
1547 | | - | |
1548 | | - | |
| 1523 | + | |
| 1524 | + | |
1549 | 1525 | | |
1550 | 1526 | | |
1551 | 1527 | | |
1552 | | - | |
1553 | | - | |
1554 | | - | |
1555 | | - | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
1556 | 1533 | | |
1557 | | - | |
1558 | | - | |
1559 | | - | |
1560 | | - | |
1561 | | - | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
1562 | 1545 | | |
1563 | 1546 | | |
1564 | | - | |
1565 | | - | |
| 1547 | + | |
| 1548 | + | |
1566 | 1549 | | |
1567 | 1550 | | |
1568 | | - | |
1569 | | - | |
| 1551 | + | |
| 1552 | + | |
1570 | 1553 | | |
| 1554 | + | |
1571 | 1555 | | |
1572 | 1556 | | |
1573 | 1557 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | 498 | | |
537 | 499 | | |
538 | 500 | | |
| |||
562 | 524 | | |
563 | 525 | | |
564 | 526 | | |
565 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
566 | 530 | | |
567 | 531 | | |
568 | 532 | | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
573 | 537 | | |
574 | 538 | | |
575 | 539 | | |
| |||
602 | 566 | | |
603 | 567 | | |
604 | 568 | | |
605 | | - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
606 | 572 | | |
607 | 573 | | |
608 | 574 | | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
613 | 579 | | |
614 | 580 | | |
615 | 581 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
532 | 510 | | |
533 | 511 | | |
534 | | - | |
535 | | - | |
| 512 | + | |
| 513 | + | |
536 | 514 | | |
537 | 515 | | |
538 | 516 | | |
| |||
0 commit comments