| author | |
| committer | |
| log | ccbff4bf3ad50eaba9a89f8dffbd37fd8b5099ad |
| tree | 85b5aa984cec1228d68cbdf74f7bdf132c893044 |
| parent | 1a7c4e85025b8fff061f78ff34f7524bbed2722d |
| signature |
3 files changed, 7 insertions(+), 4 deletions(-)
src/chrome.zig+3-2| ... | @@ -5,6 +5,7 @@ const log = std.log.scoped(.tracer); | ... | @@ -5,6 +5,7 @@ const log = std.log.scoped(.tracer); |
| 5 | const root = @import("root"); | 5 | const root = @import("root"); |
| 6 | const nfs = @import("nfs"); | 6 | const nfs = @import("nfs"); |
| 7 | const nio = @import("nio"); | 7 | const nio = @import("nio"); |
| 8 | const time = @import("time"); | ||
| 8 | const linux = @import("sys-linux"); | 9 | const linux = @import("sys-linux"); |
| 9 | 10 | ||
| 10 | var pid: linux.pid_t = undefined; | 11 | var pid: linux.pid_t = undefined; |
| ... | @@ -54,7 +55,7 @@ pub inline fn trace_begin(ctx: tracer.Ctx, comptime ifmt: []const u8, iargs: any | ... | @@ -54,7 +55,7 @@ pub inline fn trace_begin(ctx: tracer.Ctx, comptime ifmt: []const u8, iargs: any |
| 54 | } ++ iargs ++ .{ | 55 | } ++ iargs ++ .{ |
| 55 | pid, | 56 | pid, |
| 56 | tid, | 57 | tid, |
| 57 | std.time.microTimestamp(), | 58 | time.microTimestamp(), |
| 58 | }, | 59 | }, |
| 59 | ) catch {}; | 60 | ) catch {}; |
| 60 | } | 61 | } |
| ... | @@ -68,7 +69,7 @@ pub inline fn trace_end(ctx: tracer.Ctx) void { | ... | @@ -68,7 +69,7 @@ pub inline fn trace_end(ctx: tracer.Ctx) void { |
| 68 | .{ | 69 | .{ |
| 69 | pid, | 70 | pid, |
| 70 | tid, | 71 | tid, |
| 71 | std.time.microTimestamp(), | 72 | time.microTimestamp(), |
| 72 | }, | 73 | }, |
| 73 | ) catch {}; | 74 | ) catch {}; |
| 74 | } | 75 | } |
src/spall.zig+3-2| ... | @@ -5,6 +5,7 @@ const log = std.log.scoped(.tracer); | ... | @@ -5,6 +5,7 @@ const log = std.log.scoped(.tracer); |
| 5 | const root = @import("root"); | 5 | const root = @import("root"); |
| 6 | const nfs = @import("nfs"); | 6 | const nfs = @import("nfs"); |
| 7 | const nio = @import("nio"); | 7 | const nio = @import("nio"); |
| 8 | const time = @import("time"); | ||
| 8 | const linux = @import("sys-linux"); | 9 | const linux = @import("sys-linux"); |
| 9 | 10 | ||
| 10 | var pid: linux.pid_t = undefined; | 11 | var pid: linux.pid_t = undefined; |
| ... | @@ -44,7 +45,7 @@ pub inline fn trace_begin(ctx: tracer.Ctx, comptime ifmt: []const u8, iargs: any | ... | @@ -44,7 +45,7 @@ pub inline fn trace_begin(ctx: tracer.Ctx, comptime ifmt: []const u8, iargs: any |
| 44 | buffered_writer.writeStruct(BeginEvent{ | 45 | buffered_writer.writeStruct(BeginEvent{ |
| 45 | .pid = @intCast(pid), | 46 | .pid = @intCast(pid), |
| 46 | .tid = @intCast(tid), | 47 | .tid = @intCast(tid), |
| 47 | .time = @floatFromInt(std.time.microTimestamp()), | 48 | .time = @floatFromInt(time.microTimestamp()), |
| 48 | .name_len = @truncate(std.fmt.count(fmt, args ++ iargs)), | 49 | .name_len = @truncate(std.fmt.count(fmt, args ++ iargs)), |
| 49 | .args_len = 0, | 50 | .args_len = 0, |
| 50 | }) catch return; | 51 | }) catch return; |
| ... | @@ -56,7 +57,7 @@ pub inline fn trace_end(ctx: tracer.Ctx) void { | ... | @@ -56,7 +57,7 @@ pub inline fn trace_end(ctx: tracer.Ctx) void { |
| 56 | buffered_writer.writeStruct(EndEvent{ | 57 | buffered_writer.writeStruct(EndEvent{ |
| 57 | .pid = @intCast(pid), | 58 | .pid = @intCast(pid), |
| 58 | .tid = @intCast(tid), | 59 | .tid = @intCast(tid), |
| 59 | .time = @floatFromInt(std.time.microTimestamp()), | 60 | .time = @floatFromInt(time.microTimestamp()), |
| 60 | }) catch return; | 61 | }) catch return; |
| 61 | } | 62 | } |
| 62 | 63 |
zigmod.yml+1| ... | @@ -8,6 +8,7 @@ dependencies: | ... | @@ -8,6 +8,7 @@ dependencies: |
| 8 | - src: git https://github.com/nektro/zig-sys-linux | 8 | - src: git https://github.com/nektro/zig-sys-linux |
| 9 | - src: git https://github.com/nektro/zig-nfs | 9 | - src: git https://github.com/nektro/zig-nfs |
| 10 | - src: git https://github.com/nektro/zig-nio | 10 | - src: git https://github.com/nektro/zig-nio |
| 11 | - src: git https://github.com/nektro/zig-time | ||
| 11 | 12 | ||
| 12 | root_dependencies: | 13 | root_dependencies: |
| 13 | - src: git https://github.com/nektro/zig-nfs | 14 | - src: git https://github.com/nektro/zig-nfs |