diff options
Diffstat (limited to 'src/trace/event.zig')
| -rw-r--r-- | src/trace/event.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/trace/event.zig b/src/trace/event.zig index 02deb51..24caff4 100644 --- a/src/trace/event.zig +++ b/src/trace/event.zig @@ -198,6 +198,13 @@ pub fn frameId(addr: u64) u64 { return addr | 1 << 61; } +/// The id of the string that holds the basic blocks of the function that +/// begins at `addr` (`Debugger.emitBlocks`), found as a frame's is: the +/// greatest at or below the pc's. Bits 61 and 62 both. +pub fn blocksId(addr: u64) u64 { + return addr | 3 << 61; +} + pub fn now() u64 { var ts: std.os.linux.timespec = undefined; _ = std.os.linux.clock_gettime(.MONOTONIC, &ts); |
