| author | |
| committer | |
| log | bb80906868d26b9eec6ecd2ed2d7593ccbe88ae5 |
| tree | 38e2965d436797fc7dde03905e38e6f625709517 |
| parent | 5d08e47160ade85f0b47f925f9aa32b66827e82e |
| signature |
5 files changed, 17 insertions(+), 4 deletions(-)
src/Compilation.zig+8-1| ... | ... | @@ -2911,7 +2911,14 @@ pub fn update(comp: *Compilation, main_progress_node: std.Progress.Node) UpdateE |
| 2911 | 2911 | // The linker progress node is set up here instead of in `performAllTheWork`, because |
| 2912 | 2912 | // we also want it around during `flush`. |
| 2913 | 2913 | if (comp.bin_file) |lf| { |
| 2914 | comp.link_prog_node = main_progress_node.start("Linking", 0); | |
| 2914 | // mirrors logic in `Compilation.flush`: | |
| 2915 | // For llvm: "LLVM Emit Object" and "Parse Object" with the zcu object | |
| 2916 | // Always: flush of the linker | |
| 2917 | const initial_estimated_total: usize = if (comp.zcu) |zcu| | |
| 2918 | if (zcu.llvm_object) |_| 3 else 1 | |
| 2919 | else | |
| 2920 | 1; | |
| 2921 | comp.link_prog_node = main_progress_node.start("Linking", initial_estimated_total); | |
| 2915 | 2922 | lf.startProgress(comp.link_prog_node); |
| 2916 | 2923 | } |
| 2917 | 2924 | defer if (comp.bin_file) |lf| { |
src/Zcu/PerThread.zig+1| ... | ... | @@ -876,6 +876,7 @@ fn updateZirRefs(pt: Zcu.PerThread) (Io.Cancelable || Allocator.Error)!void { |
| 876 | 876 | const old_line = old_zir.getDeclaration(old_inst).src_line; |
| 877 | 877 | const new_line = new_zir.getDeclaration(new_inst).src_line; |
| 878 | 878 | if (old_line != new_line) { |
| 879 | comp.link_prog_node.increaseEstimatedTotalItems(1); | |
| 879 | 880 | try comp.link_queue.enqueueZcu(comp, pt.tid, .{ .debug_update_line_number = tracked_inst_index }); |
| 880 | 881 | } |
| 881 | 882 | }, |
src/link/Coff.zig+3-1| ... | ... | @@ -5886,7 +5886,9 @@ pub fn flush( |
| 5886 | 5886 | prog_node: std.Progress.Node, |
| 5887 | 5887 | ) link.Error!void { |
| 5888 | 5888 | _ = arena; |
| 5889 | _ = prog_node; | |
| 5889 | const sub_prog_node = prog_node.start("COFF Flush", 0); | |
| 5890 | defer sub_prog_node.end(); | |
| 5891 | ||
| 5890 | 5892 | const comp = coff.base.comp; |
| 5891 | 5893 | |
| 5892 | 5894 | // TODO: When https://github.com/ziglang/zig/issues/23617 is in, |
src/link/Elf2.zig+4-2| ... | ... | @@ -5224,7 +5224,7 @@ fn loadObject( |
| 5224 | 5224 | .first_symbol_reloc = .none, |
| 5225 | 5225 | .first_got_reloc = .none, |
| 5226 | 5226 | }; |
| 5227 | elf.synth_prog_node.increaseEstimatedTotalItems(1); | |
| 5227 | elf.input_prog_node.increaseEstimatedTotalItems(1); | |
| 5228 | 5228 | } |
| 5229 | 5229 | var symmap: std.ArrayList(Symbol.Id) = .empty; |
| 5230 | 5230 | defer symmap.deinit(gpa); |
| ... | ... | @@ -7105,9 +7105,11 @@ pub fn flush( |
| 7105 | 7105 | ) link.Error!void { |
| 7106 | 7106 | const comp = elf.base.comp; |
| 7107 | 7107 | const diags = &comp.link_diags; |
| 7108 | _ = prog_node; | |
| 7109 | 7108 | _ = arena; |
| 7110 | 7109 | |
| 7110 | const sub_prog_node = prog_node.start("ELF Flush", 0); | |
| 7111 | defer sub_prog_node.end(); | |
| 7112 | ||
| 7111 | 7113 | if (comp.config.output_mode == .Exe) { |
| 7112 | 7114 | var any_undef = false; |
| 7113 | 7115 | for (elf.globals.strong_undef.keys()) |name| { |
src/link/Wasm.zig+1| ... | ... | @@ -3398,6 +3398,7 @@ pub fn prelink(wasm: *Wasm, prog_node: std.Progress.Node) link.Error!void { |
| 3398 | 3398 | const tracy = trace(@src()); |
| 3399 | 3399 | defer tracy.end(); |
| 3400 | 3400 | |
| 3401 | prog_node.increaseEstimatedTotalItems(1); | |
| 3401 | 3402 | const sub_prog_node = prog_node.start("Wasm Prelink", 0); |
| 3402 | 3403 | defer sub_prog_node.end(); |
| 3403 | 3404 |