summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/trace/host.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/trace/host.zig b/src/trace/host.zig
index f111d55..df2f845 100644
--- a/src/trace/host.zig
+++ b/src/trace/host.zig
@@ -11,6 +11,9 @@ pub const Options = struct {
ring_bytes: usize = 1 << 24,
/// A shared library to LD_PRELOAD into the target (the agent).
preload: ?[]const u8 = null,
+ /// The kinds the target is held at (`Ring.Header.stop_mask`), set before
+ /// it starts: no first event slips by.
+ stop_mask: u64 = 0,
};
pub const Session = struct {
@@ -23,6 +26,7 @@ pub const Session = struct {
pub fn spawn(arena: std.mem.Allocator, path: [*:0]const u8, argv: [*:null]const ?[*:0]const u8, env: [:null]const ?[*:0]const u8, options: Options) !Session {
var ring = try Ring.create(options.ring_bytes);
errdefer ring.close();
+ ring.hdr.stop_mask.store(options.stop_mask, .monotonic);
var envp: std.ArrayList(?[*:0]const u8) = .empty;
for (env) |v| {
const s = std.mem.span(v.?);