From 4316524226319d70f56fcdca8b126654fde972b1 Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Mon, 17 Oct 2022 20:23:51 +0200 Subject: [PATCH] add more tracy calls in documentstore --- src/DocumentStore.zig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/DocumentStore.zig b/src/DocumentStore.zig index d8943be..9ec9808 100644 --- a/src/DocumentStore.zig +++ b/src/DocumentStore.zig @@ -302,6 +302,9 @@ fn garbageCollectionCImports(self: *DocumentStore) error{OutOfMemory}!void { } fn garbageCollectionBuildFiles(self: *DocumentStore) error{OutOfMemory}!void { + const tracy_zone = tracy.trace(@src()); + defer tracy_zone.end(); + var reachable_build_files = std.StringHashMapUnmanaged(void){}; defer reachable_build_files.deinit(self.allocator); @@ -521,6 +524,9 @@ fn uriAssociatedWithBuild( build_file: BuildFile, uri: Uri, ) error{OutOfMemory}!bool { + const tracy_zone = tracy.trace(@src()); + defer tracy_zone.end(); + var checked_uris = std.StringHashMap(void).init(self.allocator); defer { var it = checked_uris.iterator(); @@ -750,6 +756,9 @@ pub fn collectDependencies( handle: Handle, dependencies: *std.ArrayListUnmanaged(Uri), ) error{OutOfMemory}!void { + const tracy_zone = tracy.trace(@src()); + defer tracy_zone.end(); + try dependencies.ensureUnusedCapacity(allocator, handle.import_uris.items.len); for (handle.import_uris.items) |uri| { dependencies.appendAssumeCapacity(try allocator.dupe(u8, uri));