Now that the orc_unwind and orc_unwind_ip tables are sorted at build time, remove the boot time sorting pass. No change in functionality. [ mingo: Rewrote the changelog and code comments. ]
Unified · Split
| @@ -273,9 +273,11 @@ void __init unwind_init(void) · 272 unmodified lines | ||
| 273 | 273 | return; |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | − /* Sort the .orc_unwind and .orc_unwind_ip tables: */ | |
| 277 | − sort(__start_orc_unwind_ip, num_entries, sizeof(int), orc_sort_cmp, | |
| 278 | − orc_sort_swap); | |
| 276 | + /* | |
| 277 | + * Note, the orc_unwind and orc_unwind_ip tables were already | |
| 278 | + * sorted at build time via the 'sorttable' tool. | |
| 279 | + * It's ready for binary search straight away, no need to sort it. | |
| 280 | + */ | |
| 279 | 281 | |
| 280 | 282 | /* Initialize the fast lookup table: */ |
| 281 | 283 | lookup_num_blocks = orc_lookup_end - orc_lookup; |
| @@ -306,7 +306,10 @@ vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o} · 305 unmodified lines | ||
| 306 | 306 | |
| 307 | 307 | if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then |
| 308 | 308 | info SORTTAB vmlinux |
| 309 | − sorttable vmlinux | |
| 309 | + if ! sorttable vmlinux; then | |
| 310 | + echo >&2 Failed to sort kernel tables | |
| 311 | + exit 1 | |
| 312 | + fi | |
| 310 | 313 | fi |
| 311 | 314 | |
| 312 | 315 | info SYSMAP System.map |