tiny.memtrace.EventKind
Defined in event.
API (22)
Actions
Public operations.
Fields and members
Public fields and members.
adviseallocallocatorcensusdecommitdiscardfreelifecyclemapprotectreleaseremapresizescope_enterscope_exitsnapshottrace_starttrace_stopunmap
Source
Source: lib/memtrace/src/event.zig:45
zig
pub const Kind = enum { trace_start, trace_stop, allocator, scope_enter, scope_exit, alloc, free, release, resize, remap, lifecycle, map, unmap, protect, discard, decommit, snapshot, census, advise, pub fn tag(self: Kind) []const u8 { return switch (self) { .trace_start => "trace.start", .trace_stop => "trace.stop", .allocator => "allocator", .scope_enter => "scope.enter", .scope_exit => "scope.exit", .alloc => "alloc", .free => "free", .release => "release", .resize => "resize", .remap => "remap", .lifecycle => "lifecycle", .map => "map", .unmap => "unmap", .protect => "protect", .discard => "discard", .decommit => "decommit", .advise => "advise", .snapshot => "snapshot", .census => "census", }; } pub fn fromTag(text: []const u8) ?Kind { if (std.mem.eql(u8, text, "trace.start")) return .trace_start; if (std.mem.eql(u8, text, "trace.stop")) return .trace_stop; if (std.mem.eql(u8, text, "allocator")) return .allocator; if (std.mem.eql(u8, text, "scope.enter")) return .scope_enter; if (std.mem.eql(u8, text, "scope.exit")) return .scope_exit; if (std.mem.eql(u8, text, "alloc")) return .alloc; if (std.mem.eql(u8, text, "free")) return .free; if (std.mem.eql(u8, text, "release")) return .release; if (std.mem.eql(u8, text, "resize")) return .resize; if (std.mem.eql(u8, text, "remap")) return .remap; if (std.mem.eql(u8, text, "lifecycle")) return .lifecycle; if (std.mem.eql(u8, text, "map")) return .map; if (std.mem.eql(u8, text, "unmap")) return .unmap; if (std.mem.eql(u8, text, "protect")) return .protect; if (std.mem.eql(u8, text, "discard")) return .discard; if (std.mem.eql(u8, text, "decommit")) return .decommit; if (std.mem.eql(u8, text, "advise")) return .advise; if (std.mem.eql(u8, text, "snapshot")) return .snapshot; if (std.mem.eql(u8, text, "census")) return .census; return null; } pub fn isMemoryOperation(self: Kind) bool { return switch (self) { .alloc, .free, .release, .resize, .remap, .map, .unmap, .protect, .discard, .decommit, .advise, => true, else => false, }; }};Source: lib/memtrace/src/root.zig:82
zig
pub const EventKind = event_mod.Kind;Audit
| Definitions | 4 |
|---|---|
| Public names | 8 |
| Members | 19 |
| Version | 26.7.0 |
| Revision | daab053ee433 |