| author | |
| committer | |
| log | 8663a5a12e0122a6ecd9038be2cbb22364276377 |
| tree | 27930d00ca054e087874d025393ff14bc0d6d12b |
| parent | b40045e5dd6e7c9e7c0f173d33b0b878ebf55c2b |
| signature |
5 files changed, 10 insertions(+), 10 deletions(-)
src/chrome.zig+2-2| ... | @@ -42,7 +42,7 @@ pub fn deinit_thread() void { | ... | @@ -42,7 +42,7 @@ pub fn deinit_thread() void { |
| 42 | buffered_writer.flush() catch {}; | 42 | buffered_writer.flush() catch {}; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | pub inline fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []const u8, iargs: anytype) void { | 45 | pub fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []const u8, iargs: anytype) void { |
| 46 | buffered_writer.print( | 46 | buffered_writer.print( |
| 47 | \\{{"cat":"function", "name":"{s}:{d}:{d} ({s}) | 47 | \\{{"cat":"function", "name":"{s}:{d}:{d} ({s}) |
| 48 | ++ ifmt ++ | 48 | ++ ifmt ++ |
| ... | @@ -62,7 +62,7 @@ pub inline fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []cons | ... | @@ -62,7 +62,7 @@ pub inline fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []cons |
| 62 | ) catch {}; | 62 | ) catch {}; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | pub inline fn trace_end(ctx: tracer.Ctx) void { | 65 | pub fn trace_end(ctx: tracer.Ctx) void { |
| 66 | _ = ctx; | 66 | _ = ctx; |
| 67 | buffered_writer.print( | 67 | buffered_writer.print( |
| 68 | \\{{"cat":"function", "ph": "E", "pid": {d}, "tid": {d}, "ts": {d}}}, | 68 | \\{{"cat":"function", "ph": "E", "pid": {d}, "tid": {d}, "ts": {d}}}, |
src/log.zig+2-2| ... | @@ -14,11 +14,11 @@ pub fn init_thread(args: struct {}) !void { | ... | @@ -14,11 +14,11 @@ pub fn init_thread(args: struct {}) !void { |
| 14 | 14 | ||
| 15 | pub fn deinit_thread() void {} | 15 | pub fn deinit_thread() void {} |
| 16 | 16 | ||
| 17 | pub inline fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []const u8, iargs: anytype) void { | 17 | pub fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []const u8, iargs: anytype) void { |
| 18 | log.debug("{s}:{d}:{d} ({s})" ++ ifmt, .{ src.file, src.line, src.column, src.fn_name } ++ iargs); | 18 | log.debug("{s}:{d}:{d} ({s})" ++ ifmt, .{ src.file, src.line, src.column, src.fn_name } ++ iargs); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | pub inline fn trace_end(ctx: tracer.Ctx) void { | 21 | pub fn trace_end(ctx: tracer.Ctx) void { |
| 22 | _ = ctx; | 22 | _ = ctx; |
| 23 | } | 23 | } |
| 24 | 24 |
src/mod.zig+2-2| ... | @@ -45,7 +45,7 @@ pub fn deinit_thread() void { | ... | @@ -45,7 +45,7 @@ pub fn deinit_thread() void { |
| 45 | started = false; | 45 | started = false; |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | pub inline fn trace(src: std.builtin.SourceLocation, comptime fmt: []const u8, args: anytype) Ctx { | 48 | pub fn trace(src: std.builtin.SourceLocation, comptime fmt: []const u8, args: anytype) Ctx { |
| 49 | return .{ | 49 | return .{ |
| 50 | .src = src, | 50 | .src = src, |
| 51 | .data = if (!started) undefined else impl.trace_begin(src, fmt, args), | 51 | .data = if (!started) undefined else impl.trace_begin(src, fmt, args), |
| ... | @@ -56,7 +56,7 @@ pub const Ctx = struct { | ... | @@ -56,7 +56,7 @@ pub const Ctx = struct { |
| 56 | src: std.builtin.SourceLocation, | 56 | src: std.builtin.SourceLocation, |
| 57 | data: impl.Data, | 57 | data: impl.Data, |
| 58 | 58 | ||
| 59 | pub inline fn end(self: Ctx) void { | 59 | pub fn end(self: Ctx) void { |
| 60 | if (!started) return; | 60 | if (!started) return; |
| 61 | impl.trace_end(self); | 61 | impl.trace_end(self); |
| 62 | } | 62 | } |
src/none.zig+2-2| ... | @@ -14,13 +14,13 @@ pub fn init_thread(args: struct {}) !void { | ... | @@ -14,13 +14,13 @@ pub fn init_thread(args: struct {}) !void { |
| 14 | 14 | ||
| 15 | pub fn deinit_thread() void {} | 15 | pub fn deinit_thread() void {} |
| 16 | 16 | ||
| 17 | pub inline fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []const u8, iargs: anytype) void { | 17 | pub fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []const u8, iargs: anytype) void { |
| 18 | _ = src; | 18 | _ = src; |
| 19 | _ = ifmt; | 19 | _ = ifmt; |
| 20 | _ = iargs; | 20 | _ = iargs; |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | pub inline fn trace_end(ctx: tracer.Ctx) void { | 23 | pub fn trace_end(ctx: tracer.Ctx) void { |
| 24 | _ = ctx; | 24 | _ = ctx; |
| 25 | } | 25 | } |
| 26 | 26 |
src/spall.zig+2-2| ... | @@ -41,7 +41,7 @@ pub fn deinit_thread() void { | ... | @@ -41,7 +41,7 @@ pub fn deinit_thread() void { |
| 41 | buffered_writer.flush() catch {}; | 41 | buffered_writer.flush() catch {}; |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | pub inline fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []const u8, iargs: anytype) void { | 44 | pub fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []const u8, iargs: anytype) void { |
| 45 | const fmt = "{s}:{d}:{d} ({s})" ++ ifmt; | 45 | const fmt = "{s}:{d}:{d} ({s})" ++ ifmt; |
| 46 | const args = .{ src.file, src.line, src.column, src.fn_name }; | 46 | const args = .{ src.file, src.line, src.column, src.fn_name }; |
| 47 | buffered_writer.writeStruct(BeginEvent{ | 47 | buffered_writer.writeStruct(BeginEvent{ |
| ... | @@ -54,7 +54,7 @@ pub inline fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []cons | ... | @@ -54,7 +54,7 @@ pub inline fn trace_begin(src: std.builtin.SourceLocation, comptime ifmt: []cons |
| 54 | buffered_writer.print(fmt, args ++ iargs) catch return; | 54 | buffered_writer.print(fmt, args ++ iargs) catch return; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | pub inline fn trace_end(ctx: tracer.Ctx) void { | 57 | pub fn trace_end(ctx: tracer.Ctx) void { |
| 58 | _ = ctx; | 58 | _ = ctx; |
| 59 | buffered_writer.writeStruct(EndEvent{ | 59 | buffered_writer.writeStruct(EndEvent{ |
| 60 | .pid = @intCast(pid), | 60 | .pid = @intCast(pid), |