Commit c2ab4614b6
Changed files (3)
tools
lib/std/debug/Dwarf.zig
@@ -2354,19 +2354,14 @@ pub fn resolveSourceLocations(
sorted_pc_addrs: []const u64,
/// Asserts its length equals length of `sorted_pc_addrs`.
output: []std.debug.SourceLocation,
- parent_prog_node: std.Progress.Node,
) ResolveSourceLocationsError!void {
assert(sorted_pc_addrs.len == output.len);
assert(d.compile_units_sorted);
- const prog_node = parent_prog_node.start("Resolve Source Locations", sorted_pc_addrs.len);
- defer prog_node.end();
-
var cu_i: usize = 0;
var cu: *CompileUnit = &d.compile_unit_list.items[0];
var range = cu.pc_range.?;
next_pc: for (sorted_pc_addrs, output) |pc, *out| {
- defer prog_node.completeOne();
while (pc >= range.end) {
cu_i += 1;
if (cu_i >= d.compile_unit_list.items.len) {
lib/std/debug/Info.zig
@@ -20,13 +20,9 @@ address_map: std.AutoArrayHashMapUnmanaged(u64, Dwarf.ElfModule),
pub const LoadError = Dwarf.ElfModule.LoadError;
-pub fn load(gpa: Allocator, path: Path, parent_prog_node: std.Progress.Node) LoadError!Info {
+pub fn load(gpa: Allocator, path: Path) LoadError!Info {
var sections: Dwarf.SectionArray = Dwarf.null_section_array;
- var prog_node = parent_prog_node.start("Loading Debug Info", 0);
- defer prog_node.end();
var elf_module = try Dwarf.ElfModule.loadPath(gpa, path, null, null, §ions, null);
- prog_node.end();
- prog_node = parent_prog_node.start("Sort Compile Units", 0);
try elf_module.dwarf.sortCompileUnits();
var info: Info = .{
.address_map = .{},
@@ -51,10 +47,9 @@ pub fn resolveSourceLocations(
sorted_pc_addrs: []const u64,
/// Asserts its length equals length of `sorted_pc_addrs`.
output: []std.debug.SourceLocation,
- parent_prog_node: std.Progress.Node,
) ResolveSourceLocationsError!void {
assert(sorted_pc_addrs.len == output.len);
if (info.address_map.entries.len != 1) @panic("TODO");
const elf_module = &info.address_map.values()[0];
- return elf_module.dwarf.resolveSourceLocations(gpa, sorted_pc_addrs, output, parent_prog_node);
+ return elf_module.dwarf.resolveSourceLocations(gpa, sorted_pc_addrs, output);
}
tools/dump-cov.zig
@@ -28,10 +28,7 @@ pub fn main() !void {
.sub_path = cov_file_name,
};
- const prog_node = std.Progress.start(.{});
- defer prog_node.end();
-
- var debug_info = std.debug.Info.load(gpa, exe_path, prog_node) catch |err| {
+ var debug_info = std.debug.Info.load(gpa, exe_path) catch |err| {
fatal("failed to load debug info for {}: {s}", .{ exe_path, @errorName(err) });
};
defer debug_info.deinit(gpa);
@@ -54,7 +51,7 @@ pub fn main() !void {
assert(std.sort.isSorted(usize, pcs, {}, std.sort.asc(usize)));
const source_locations = try arena.alloc(std.debug.SourceLocation, pcs.len);
- try debug_info.resolveSourceLocations(gpa, pcs, source_locations, prog_node);
+ try debug_info.resolveSourceLocations(gpa, pcs, source_locations);
defer for (source_locations) |sl| {
gpa.free(sl.file_name);
};