Commit a7714ed
authored
[lldb] Add summary formatter for Swift Task (llvm#10265)
This change vertically condenses how a `Task` is displayed, by hiding the boolean
members (ex `isRunning`) and placing those flags in the summary string.
The synthetic formatter continues to expose these (and only these) 4 children:
* `address`
* `id`
* `enqueuePriority`
* `children`
The flags are pipe (`|`) delimited, matching the format used by `swift-inspect`.
Here's an example of output when printing a `Task`:
```
(Task<(), Error>) task = id:2 flags:enqueued|future {
address = 0x14b604490
id = 2
enqueuePriority = .medium
children = {}
}
```
This change also removes the `Task`'s `kind` field, which currently relevant only in
special cases. See `JobKind` in `MetadataValues.h`.1 parent 4772ab8 commit a7714ed
File tree
7 files changed
+186
-96
lines changed- lldb
- source/Plugins/Language/Swift
- test/API/lang/swift/async
- continuations
- formatters/task
- children
- taskgroups
7 files changed
+186
-96
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
778 | 779 | | |
779 | 780 | | |
780 | 781 | | |
| 782 | + | |
781 | 783 | | |
782 | 784 | | |
783 | | - | |
784 | | - | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
785 | 789 | | |
786 | 790 | | |
787 | 791 | | |
| |||
790 | 794 | | |
791 | 795 | | |
792 | 796 | | |
793 | | - | |
794 | 797 | | |
| 798 | + | |
795 | 799 | | |
796 | 800 | | |
797 | 801 | | |
798 | | - | |
799 | | - | |
| 802 | + | |
| 803 | + | |
800 | 804 | | |
801 | 805 | | |
802 | 806 | | |
| |||
805 | 809 | | |
806 | 810 | | |
807 | 811 | | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | 812 | | |
818 | 813 | | |
819 | 814 | | |
| |||
841 | 836 | | |
842 | 837 | | |
843 | 838 | | |
844 | | - | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
845 | 843 | | |
846 | | - | |
847 | | - | |
848 | | - | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
849 | 849 | | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
850 | 867 | | |
851 | 868 | | |
852 | 869 | | |
| |||
865 | 882 | | |
866 | 883 | | |
867 | 884 | | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | | - | |
880 | | - | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
881 | 888 | | |
882 | | - | |
883 | | - | |
884 | 889 | | |
885 | 890 | | |
886 | 891 | | |
| |||
1641 | 1646 | | |
1642 | 1647 | | |
1643 | 1648 | | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
1644 | 1685 | | |
1645 | 1686 | | |
1646 | 1687 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
494 | 507 | | |
495 | 508 | | |
496 | 509 | | |
| |||
Lines changed: 27 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
| |||
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
42 | 57 | | |
43 | 58 | | |
Lines changed: 23 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
Lines changed: 19 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
0 commit comments