| author | |
| committer | |
| log | ef56eae6262d4a1e6c866c47be418755ef2b9108 |
| tree | 0d5e431bb71aceda652dbe5c68447250d0f723f7 |
| parent | 387db22fb347b1dfa8b4914a88ec254c8c6d5919 |
4 files changed, 11 insertions(+), 11 deletions(-)
src/log.zig+2-2| ... | ... | @@ -2,11 +2,11 @@ const std = @import("std"); |
| 2 | 2 | const tracer = @import("./mod.zig"); |
| 3 | 3 | const log = std.log.scoped(.tracer); |
| 4 | 4 | |
| 5 | pub fn init() void {} | |
| 5 | pub fn init() !void {} | |
| 6 | 6 | |
| 7 | 7 | pub fn deinit() void {} |
| 8 | 8 | |
| 9 | pub fn init2() void {} | |
| 9 | pub fn init2() !void {} | |
| 10 | 10 | |
| 11 | 11 | pub fn deinit2() void {} |
| 12 | 12 |
src/mod.zig+2-2| ... | ... | @@ -9,7 +9,7 @@ pub const log = @import("./log.zig"); |
| 9 | 9 | pub const spall = @import("./spall.zig"); |
| 10 | 10 | |
| 11 | 11 | pub fn init() !void { |
| 12 | impl.init(); | |
| 12 | try impl.init(); | |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | pub fn deinit() void { |
| ... | ... | @@ -17,7 +17,7 @@ pub fn deinit() void { |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | pub fn init2() !void { |
| 20 | impl.init2(); | |
| 20 | try impl.init2(); | |
| 21 | 21 | started = true; |
| 22 | 22 | } |
| 23 | 23 |
src/none.zig+2-2| ... | ... | @@ -2,11 +2,11 @@ const std = @import("std"); |
| 2 | 2 | const tracer = @import("./mod.zig"); |
| 3 | 3 | const log = std.log.scoped(.tracer); |
| 4 | 4 | |
| 5 | pub fn init() void {} | |
| 5 | pub fn init() !void {} | |
| 6 | 6 | |
| 7 | 7 | pub fn deinit() void {} |
| 8 | 8 | |
| 9 | pub fn init2() void {} | |
| 9 | pub fn init2() !void {} | |
| 10 | 10 | |
| 11 | 11 | pub fn deinit2() void {} |
| 12 | 12 |
src/spall.zig+5-5| ... | ... | @@ -10,7 +10,7 @@ threadlocal var tid: std.os.linux.pid_t = undefined; |
| 10 | 10 | threadlocal var path: []const u8 = undefined; |
| 11 | 11 | threadlocal var file: std.fs.File = undefined; |
| 12 | 12 | |
| 13 | pub fn init() void { | |
| 13 | pub fn init() !void { | |
| 14 | 14 | pid = std.os.linux.getpid(); |
| 15 | 15 | } |
| 16 | 16 | |
| ... | ... | @@ -18,12 +18,12 @@ pub fn deinit() void { |
| 18 | 18 | // |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | pub fn init2() void { | |
| 21 | pub fn init2() !void { | |
| 22 | 22 | tid = std.os.linux.gettid(); |
| 23 | 23 | |
| 24 | path = std.fmt.allocPrint(alloc, "/data/trace.{d}.{d}.spall.jsonl", .{ pid, tid }) catch @panic("oom"); | |
| 25 | file = std.fs.cwd().createFile(path, .{}) catch @panic("create fail"); | |
| 26 | file.writer().writeAll("[\n") catch @panic("["); | |
| 24 | path = try std.fmt.allocPrint(alloc, "/data/trace.{d}.{d}.spall.jsonl", .{ pid, tid }); | |
| 25 | file = try std.fs.cwd().createFile(path, .{}); | |
| 26 | try file.writer().writeAll("[\n"); | |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | pub fn deinit2() void { |