mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
add more tracy hooks
This commit is contained in:
parent
59733374ed
commit
79fefec599
4 changed files with 14 additions and 0 deletions
|
|
@ -2387,6 +2387,9 @@ fn resizeSections(self: *MachO) !void {
|
|||
}
|
||||
|
||||
fn writeSectionsAndUpdateLinkeditSizes(self: *MachO) !void {
|
||||
const tracy = trace(@src());
|
||||
defer tracy.end();
|
||||
|
||||
const gpa = self.base.comp.gpa;
|
||||
|
||||
const cmd = self.symtab_cmd;
|
||||
|
|
@ -3513,6 +3516,8 @@ pub fn getTarget(self: MachO) std.Target {
|
|||
/// the original file. This is super messy, but there doesn't seem any other
|
||||
/// way to please the XNU.
|
||||
pub fn invalidateKernelCache(dir: fs.Dir, sub_path: []const u8) !void {
|
||||
const tracy = trace(@src());
|
||||
defer tracy.end();
|
||||
if (comptime builtin.target.isDarwin() and builtin.target.cpu.arch == .aarch64) {
|
||||
try dir.copyFile(sub_path, dir, sub_path, .{});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ const log = std.log.scoped(.link);
|
|||
const macho = std.macho;
|
||||
const mem = std.mem;
|
||||
const testing = std.testing;
|
||||
const trace = @import("../../tracy.zig").trace;
|
||||
const Allocator = mem.Allocator;
|
||||
const Hasher = @import("hasher.zig").ParallelHasher;
|
||||
const MachO = @import("../MachO.zig");
|
||||
|
|
@ -264,6 +265,9 @@ pub fn writeAdhocSignature(
|
|||
opts: WriteOpts,
|
||||
writer: anytype,
|
||||
) !void {
|
||||
const tracy = trace(@src());
|
||||
defer tracy.end();
|
||||
|
||||
const allocator = macho_file.base.comp.gpa;
|
||||
|
||||
var header: macho.SuperBlob = .{
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ pub fn ParallelHasher(comptime Hasher: type) type {
|
|||
out: *[hash_size]u8,
|
||||
err: *fs.File.PReadError!usize,
|
||||
) void {
|
||||
const tracy = trace(@src());
|
||||
defer tracy.end();
|
||||
err.* = file.preadAll(buffer, fstart);
|
||||
Hasher.hash(buffer, out, .{});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,6 +211,9 @@ fn verifyLibcxxCorrectlyLinked() void {
|
|||
}
|
||||
|
||||
fn mainArgs(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
|
||||
const tr = tracy.trace(@src());
|
||||
defer tr.end();
|
||||
|
||||
if (args.len <= 1) {
|
||||
std.log.info("{s}", .{usage});
|
||||
fatal("expected command argument", .{});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue