summaryrefslogtreecommitdiff
path: root/src/trace/event.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/trace/event.zig')
-rw-r--r--src/trace/event.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/trace/event.zig b/src/trace/event.zig
index 24caff4..1447c8e 100644
--- a/src/trace/event.zig
+++ b/src/trace/event.zig
@@ -198,6 +198,12 @@ pub fn frameId(addr: u64) u64 {
return addr | 1 << 61;
}
+/// The id of the string that tells of the file mapped at `path`: its build
+/// id and where its debug info came from (`Debugger.emitModule`).
+pub fn moduleId(path: []const u8) u64 {
+ return std.hash.Wyhash.hash(1, path) | 1 << 63;
+}
+
/// 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.