@@ -488,7 +488,7 @@ pub const Handle = struct {
488
488
comptime Context : type ,
489
489
) error {OutOfMemory }! T {
490
490
@branchHint (.cold );
491
- const tracy_zone = tracy .trace (@src ());
491
+ const tracy_zone = tracy .traceNamed (@src (), "getLazy(" ++ name ++ ")" );
492
492
defer tracy_zone .end ();
493
493
494
494
const has_data_field_name = "has_" ++ name ;
@@ -603,6 +603,9 @@ pub fn getHandle(self: *DocumentStore, uri: Uri) ?*Handle {
603
603
}
604
604
605
605
pub fn readUri (store : * DocumentStore , uri : Uri ) ? [:0 ]const u8 {
606
+ const tracy_zone = tracy .trace (@src ());
607
+ defer tracy_zone .end ();
608
+
606
609
const file_path = URI .parse (store .allocator , uri ) catch | err | {
607
610
log .err ("failed to parse URI '{s}': {}" , .{ uri , err });
608
611
return null ;
@@ -921,6 +924,9 @@ fn notifyBuildEnd(self: *DocumentStore, status: EndStatus) void {
921
924
}
922
925
923
926
fn invalidateBuildFileWorker (self : * DocumentStore , build_file_uri : Uri , is_build_file_uri_owned : bool ) void {
927
+ const tracy_zone = tracy .trace (@src ());
928
+ defer tracy_zone .end ();
929
+
924
930
defer if (is_build_file_uri_owned ) self .allocator .free (build_file_uri );
925
931
926
932
var end_status : EndStatus = .failed ;
@@ -968,6 +974,9 @@ fn invalidateBuildFileWorker(self: *DocumentStore, build_file_uri: Uri, is_build
968
974
}
969
975
970
976
pub fn loadTrigramStores (self : * DocumentStore ) error {OutOfMemory }! []* DocumentStore.Handle {
977
+ const tracy_zone = tracy .trace (@src ());
978
+ defer tracy_zone .end ();
979
+
971
980
if (builtin .single_threaded ) {
972
981
for (self .handles .values ()) | handle | {
973
982
_ = try handle .getTrigramStore ();
@@ -1166,6 +1175,9 @@ fn buildDotZigExists(dir_path: []const u8) bool {
1166
1175
/// See `Handle.getAssociatedBuildFileUri`.
1167
1176
/// Caller owns returned memory.
1168
1177
fn collectPotentialBuildFiles (self : * DocumentStore , uri : Uri ) ! []* BuildFile {
1178
+ const tracy_zone = tracy .trace (@src ());
1179
+ defer tracy_zone .end ();
1180
+
1169
1181
var potential_build_files : std .ArrayListUnmanaged (* BuildFile ) = .empty ;
1170
1182
errdefer potential_build_files .deinit (self .allocator );
1171
1183
@@ -1372,6 +1384,9 @@ fn createAndStoreDocument(
1372
1384
}
1373
1385
1374
1386
pub fn loadDirectoryRecursive (store : * DocumentStore , directory_uri : Uri ) ! usize {
1387
+ const tracy_zone = tracy .trace (@src ());
1388
+ defer tracy_zone .end ();
1389
+
1375
1390
const workspace_path = try URI .parse (store .allocator , directory_uri );
1376
1391
defer store .allocator .free (workspace_path );
1377
1392
0 commit comments