| ... | @@ -21,6 +21,7 @@ const introspect = @import("introspect.zig"); | ... | @@ -21,6 +21,7 @@ const introspect = @import("introspect.zig"); |
| 21 | const link = @import("link.zig"); | 21 | const link = @import("link.zig"); |
| 22 | const tracy = @import("tracy.zig"); | 22 | const tracy = @import("tracy.zig"); |
| 23 | const trace = tracy.trace; | 23 | const trace = tracy.trace; |
| | 24 | const traceNamed = tracy.traceNamed; |
| 24 | const build_options = @import("build_options"); | 25 | const build_options = @import("build_options"); |
| 25 | const LibCInstallation = std.zig.LibCInstallation; | 26 | const LibCInstallation = std.zig.LibCInstallation; |
| 26 | const glibc = @import("libs/glibc.zig"); | 27 | const glibc = @import("libs/glibc.zig"); |
| ... | @@ -4707,8 +4708,8 @@ fn performAllTheWork( | ... | @@ -4707,8 +4708,8 @@ fn performAllTheWork( |
| 4707 | } | 4708 | } |
| 4708 | | 4709 | |
| 4709 | if (comp.zcu) |zcu| { | 4710 | if (comp.zcu) |zcu| { |
| 4710 | const astgen_frame = tracy.namedFrame("astgen"); | 4711 | const tracy_trace = traceNamed(@src(), "astgen"); |
| 4711 | defer astgen_frame.end(); | 4712 | defer tracy_trace.end(); |
| 4712 | | 4713 | |
| 4713 | const zir_prog_node = main_progress_node.start("AST Lowering", 0); | 4714 | const zir_prog_node = main_progress_node.start("AST Lowering", 0); |
| 4714 | defer zir_prog_node.end(); | 4715 | defer zir_prog_node.end(); |
| ... | @@ -5221,8 +5222,8 @@ fn processOneJob(tid: Zcu.PerThread.Id, comp: *Compilation, job: Job) JobError!v | ... | @@ -5221,8 +5222,8 @@ fn processOneJob(tid: Zcu.PerThread.Id, comp: *Compilation, job: Job) JobError!v |
| 5221 | try comp.link_queue.enqueueZcu(comp, tid, .{ .update_line_number = tracked_inst }); | 5222 | try comp.link_queue.enqueueZcu(comp, tid, .{ .update_line_number = tracked_inst }); |
| 5222 | }, | 5223 | }, |
| 5223 | .analyze_func => |func| { | 5224 | .analyze_func => |func| { |
| 5224 | const named_frame = tracy.namedFrame("analyze_func"); | 5225 | const tracy_trace = traceNamed(@src(), "analyze_func"); |
| 5225 | defer named_frame.end(); | 5226 | defer tracy_trace.end(); |
| 5226 | | 5227 | |
| 5227 | const pt: Zcu.PerThread = .activate(comp.zcu.?, tid); | 5228 | const pt: Zcu.PerThread = .activate(comp.zcu.?, tid); |
| 5228 | defer pt.deactivate(); | 5229 | defer pt.deactivate(); |
| ... | @@ -5234,8 +5235,8 @@ fn processOneJob(tid: Zcu.PerThread.Id, comp: *Compilation, job: Job) JobError!v | ... | @@ -5234,8 +5235,8 @@ fn processOneJob(tid: Zcu.PerThread.Id, comp: *Compilation, job: Job) JobError!v |
| 5234 | }; | 5235 | }; |
| 5235 | }, | 5236 | }, |
| 5236 | .analyze_comptime_unit => |unit| { | 5237 | .analyze_comptime_unit => |unit| { |
| 5237 | const named_frame = tracy.namedFrame("analyze_comptime_unit"); | 5238 | const tracy_trace = traceNamed(@src(), "analyze_comptime_unit"); |
| 5238 | defer named_frame.end(); | 5239 | defer tracy_trace.end(); |
| 5239 | | 5240 | |
| 5240 | const pt: Zcu.PerThread = .activate(comp.zcu.?, tid); | 5241 | const pt: Zcu.PerThread = .activate(comp.zcu.?, tid); |
| 5241 | defer pt.deactivate(); | 5242 | defer pt.deactivate(); |
| ... | @@ -5274,8 +5275,8 @@ fn processOneJob(tid: Zcu.PerThread.Id, comp: *Compilation, job: Job) JobError!v | ... | @@ -5274,8 +5275,8 @@ fn processOneJob(tid: Zcu.PerThread.Id, comp: *Compilation, job: Job) JobError!v |
| 5274 | } | 5275 | } |
| 5275 | }, | 5276 | }, |
| 5276 | .resolve_type_fully => |ty| { | 5277 | .resolve_type_fully => |ty| { |
| 5277 | const named_frame = tracy.namedFrame("resolve_type_fully"); | 5278 | const tracy_trace = traceNamed(@src(), "resolve_type_fully"); |
| 5278 | defer named_frame.end(); | 5279 | defer tracy_trace.end(); |
| 5279 | | 5280 | |
| 5280 | const pt: Zcu.PerThread = .activate(comp.zcu.?, tid); | 5281 | const pt: Zcu.PerThread = .activate(comp.zcu.?, tid); |
| 5281 | defer pt.deactivate(); | 5282 | defer pt.deactivate(); |
| ... | @@ -5285,8 +5286,8 @@ fn processOneJob(tid: Zcu.PerThread.Id, comp: *Compilation, job: Job) JobError!v | ... | @@ -5285,8 +5286,8 @@ fn processOneJob(tid: Zcu.PerThread.Id, comp: *Compilation, job: Job) JobError!v |
| 5285 | }; | 5286 | }; |
| 5286 | }, | 5287 | }, |
| 5287 | .analyze_mod => |mod| { | 5288 | .analyze_mod => |mod| { |
| 5288 | const named_frame = tracy.namedFrame("analyze_mod"); | 5289 | const tracy_trace = traceNamed(@src(), "analyze_mod"); |
| 5289 | defer named_frame.end(); | 5290 | defer tracy_trace.end(); |
| 5290 | | 5291 | |
| 5291 | const pt: Zcu.PerThread = .activate(comp.zcu.?, tid); | 5292 | const pt: Zcu.PerThread = .activate(comp.zcu.?, tid); |
| 5292 | defer pt.deactivate(); | 5293 | defer pt.deactivate(); |
| ... | @@ -5296,8 +5297,8 @@ fn processOneJob(tid: Zcu.PerThread.Id, comp: *Compilation, job: Job) JobError!v | ... | @@ -5296,8 +5297,8 @@ fn processOneJob(tid: Zcu.PerThread.Id, comp: *Compilation, job: Job) JobError!v |
| 5296 | }; | 5297 | }; |
| 5297 | }, | 5298 | }, |
| 5298 | .windows_import_lib => |index| { | 5299 | .windows_import_lib => |index| { |
| 5299 | const named_frame = tracy.namedFrame("windows_import_lib"); | 5300 | const tracy_trace = traceNamed(@src(), "windows_import_lib"); |
| 5300 | defer named_frame.end(); | 5301 | defer tracy_trace.end(); |
| 5301 | | 5302 | |
| 5302 | const link_lib = comp.windows_libs.keys()[index]; | 5303 | const link_lib = comp.windows_libs.keys()[index]; |
| 5303 | mingw.buildImportLib(comp, link_lib) catch |err| { | 5304 | mingw.buildImportLib(comp, link_lib) catch |err| { |