Commit c6f5dc2
objtool: Union instruction::{call_dest,jump_table}
The instruction call_dest and jump_table members can never be used at
the same time, their usage depends on type.
struct instruction {
struct list_head list; /* 0 16 */
struct hlist_node hash; /* 16 16 */
struct list_head call_node; /* 32 16 */
struct section * sec; /* 48 8 */
long unsigned int offset; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
long unsigned int immediate; /* 64 8 */
unsigned int len; /* 72 4 */
u8 type; /* 76 1 */
/* Bitfield combined with previous fields */
u16 dead_end:1; /* 76: 8 2 */
u16 ignore:1; /* 76: 9 2 */
u16 ignore_alts:1; /* 76:10 2 */
u16 hint:1; /* 76:11 2 */
u16 save:1; /* 76:12 2 */
u16 restore:1; /* 76:13 2 */
u16 retpoline_safe:1; /* 76:14 2 */
u16 noendbr:1; /* 76:15 2 */
u16 entry:1; /* 78: 0 2 */
u16 visited:4; /* 78: 1 2 */
u16 no_reloc:1; /* 78: 5 2 */
/* XXX 2 bits hole, try to pack */
/* Bitfield combined with next fields */
s8 instr; /* 79 1 */
struct alt_group * alt_group; /* 80 8 */
- struct symbol * call_dest; /* 88 8 */
- struct instruction * jump_dest; /* 96 8 */
- struct instruction * first_jump_src; /* 104 8 */
- struct reloc * jump_table; /* 112 8 */
- struct alternative * alts; /* 120 8 */
+ struct instruction * jump_dest; /* 88 8 */
+ struct instruction * first_jump_src; /* 96 8 */
+ union {
+ struct symbol * _call_dest; /* 104 8 */
+ struct reloc * _jump_table; /* 104 8 */
+ }; /* 104 8 */
+ struct alternative * alts; /* 112 8 */
+ struct symbol * sym; /* 120 8 */
/* --- cacheline 2 boundary (128 bytes) --- */
- struct symbol * sym; /* 128 8 */
- struct stack_op * stack_ops; /* 136 8 */
- struct cfi_state * cfi; /* 144 8 */
+ struct stack_op * stack_ops; /* 128 8 */
+ struct cfi_state * cfi; /* 136 8 */
- /* size: 152, cachelines: 3, members: 29 */
- /* sum members: 150 */
+ /* size: 144, cachelines: 3, members: 28 */
+ /* sum members: 142 */
/* sum bitfield members: 14 bits, bit holes: 1, sum bit holes: 2 bits */
- /* last cacheline: 24 bytes */
+ /* last cacheline: 16 bytes */
};
pre: 5:39.35 real, 215.58 user, 123.69 sys, 2344873 mem
post: 5:38.18 real, 213.25 user, 124.90 sys, 23449040 mem
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build only
Tested-by: Thomas Weißschuh <linux@weissschuh.net> # compile and run
Link: https://lore.kernel.org/r/20230208172245.640914454@infradead.org1 parent 0932dbe commit c6f5dc2
2 files changed
Lines changed: 50 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
117 | 135 | | |
118 | 136 | | |
119 | 137 | | |
120 | 138 | | |
121 | | - | |
| 139 | + | |
122 | 140 | | |
123 | 141 | | |
124 | 142 | | |
125 | 143 | | |
126 | | - | |
| 144 | + | |
127 | 145 | | |
128 | 146 | | |
129 | 147 | | |
| |||
137 | 155 | | |
138 | 156 | | |
139 | 157 | | |
140 | | - | |
141 | | - | |
| 158 | + | |
| 159 | + | |
142 | 160 | | |
143 | 161 | | |
144 | 162 | | |
| |||
274 | 292 | | |
275 | 293 | | |
276 | 294 | | |
277 | | - | |
278 | | - | |
| 295 | + | |
| 296 | + | |
279 | 297 | | |
280 | 298 | | |
281 | 299 | | |
| |||
678 | 696 | | |
679 | 697 | | |
680 | 698 | | |
681 | | - | |
| 699 | + | |
682 | 700 | | |
683 | 701 | | |
684 | 702 | | |
| |||
709 | 727 | | |
710 | 728 | | |
711 | 729 | | |
712 | | - | |
| 730 | + | |
713 | 731 | | |
714 | 732 | | |
715 | 733 | | |
| |||
1340 | 1358 | | |
1341 | 1359 | | |
1342 | 1360 | | |
1343 | | - | |
| 1361 | + | |
1344 | 1362 | | |
1345 | 1363 | | |
1346 | 1364 | | |
| |||
1425 | 1443 | | |
1426 | 1444 | | |
1427 | 1445 | | |
1428 | | - | |
| 1446 | + | |
1429 | 1447 | | |
1430 | 1448 | | |
1431 | 1449 | | |
| |||
1683 | 1701 | | |
1684 | 1702 | | |
1685 | 1703 | | |
1686 | | - | |
| 1704 | + | |
1687 | 1705 | | |
1688 | 1706 | | |
1689 | 1707 | | |
1690 | 1708 | | |
1691 | | - | |
| 1709 | + | |
1692 | 1710 | | |
1693 | 1711 | | |
1694 | 1712 | | |
| |||
2125 | 2143 | | |
2126 | 2144 | | |
2127 | 2145 | | |
2128 | | - | |
| 2146 | + | |
2129 | 2147 | | |
2130 | 2148 | | |
2131 | 2149 | | |
| |||
2137 | 2155 | | |
2138 | 2156 | | |
2139 | 2157 | | |
2140 | | - | |
| 2158 | + | |
2141 | 2159 | | |
2142 | 2160 | | |
2143 | | - | |
| 2161 | + | |
2144 | 2162 | | |
2145 | 2163 | | |
2146 | 2164 | | |
| |||
2612 | 2630 | | |
2613 | 2631 | | |
2614 | 2632 | | |
2615 | | - | |
2616 | | - | |
| 2633 | + | |
| 2634 | + | |
2617 | 2635 | | |
2618 | 2636 | | |
2619 | 2637 | | |
| |||
3320 | 3338 | | |
3321 | 3339 | | |
3322 | 3340 | | |
3323 | | - | |
3324 | | - | |
| 3341 | + | |
| 3342 | + | |
3325 | 3343 | | |
3326 | 3344 | | |
3327 | 3345 | | |
| |||
3403 | 3421 | | |
3404 | 3422 | | |
3405 | 3423 | | |
3406 | | - | |
| 3424 | + | |
3407 | 3425 | | |
3408 | 3426 | | |
3409 | 3427 | | |
3410 | 3428 | | |
3411 | 3429 | | |
3412 | | - | |
| 3430 | + | |
3413 | 3431 | | |
3414 | 3432 | | |
3415 | 3433 | | |
| |||
3847 | 3865 | | |
3848 | 3866 | | |
3849 | 3867 | | |
3850 | | - | |
3851 | | - | |
| 3868 | + | |
| 3869 | + | |
3852 | 3870 | | |
3853 | 3871 | | |
3854 | | - | |
| 3872 | + | |
3855 | 3873 | | |
3856 | 3874 | | |
3857 | 3875 | | |
| |||
3952 | 3970 | | |
3953 | 3971 | | |
3954 | 3972 | | |
3955 | | - | |
| 3973 | + | |
3956 | 3974 | | |
3957 | 3975 | | |
3958 | 3976 | | |
3959 | 3977 | | |
3960 | 3978 | | |
3961 | | - | |
| 3979 | + | |
3962 | 3980 | | |
3963 | 3981 | | |
3964 | 3982 | | |
| |||
4036 | 4054 | | |
4037 | 4055 | | |
4038 | 4056 | | |
4039 | | - | |
| 4057 | + | |
| 4058 | + | |
4040 | 4059 | | |
4041 | 4060 | | |
4042 | 4061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
0 commit comments