@@ -552,7 +552,6 @@ impl GlobalCacheTracker {
552552 clean_ctx : & mut CleanContext < ' _ > ,
553553 gc_opts : & GcOpts ,
554554 ) -> CargoResult < ( ) > {
555- let _p = crate :: util:: profile:: start ( "cleaning global cache files" ) ;
556555 let gctx = clean_ctx. gctx ;
557556 let base = BasePaths {
558557 index : gctx. registry_index_path ( ) . into_path_unlocked ( ) ,
@@ -706,7 +705,6 @@ impl GlobalCacheTracker {
706705 sync_size : bool ,
707706 delete_paths : & mut Vec < PathBuf > ,
708707 ) -> CargoResult < ( ) > {
709- let _p = crate :: util:: profile:: start ( "global cache db sync" ) ;
710708 debug ! ( target: "gc" , "starting db sync" ) ;
711709 // For registry_index and git_db, add anything that is missing in the db.
712710 Self :: update_parent_for_missing_from_db ( conn, now, REGISTRY_INDEX_TABLE , & base. index ) ?;
@@ -804,9 +802,6 @@ impl GlobalCacheTracker {
804802 parent_table_name : & str ,
805803 base_path : & Path ,
806804 ) -> CargoResult < ( ) > {
807- let _p = crate :: util:: profile:: start ( format ! (
808- "update parent db for missing from db {parent_table_name}"
809- ) ) ;
810805 trace ! ( target: "gc" , "checking for untracked parent to add to {parent_table_name}" ) ;
811806 let names = Self :: names_from ( base_path) ?;
812807
@@ -833,7 +828,6 @@ impl GlobalCacheTracker {
833828 table_name : & str ,
834829 base_path : & Path ,
835830 ) -> CargoResult < ( ) > {
836- let _p = crate :: util:: profile:: start ( format ! ( "update db for removed {table_name}" ) ) ;
837831 trace ! ( target: "gc" , "checking for db entries to remove from {table_name}" ) ;
838832 let mut select_stmt = conn. prepare_cached ( & format ! (
839833 "SELECT {table_name}.rowid, {parent_table_name}.name, {table_name}.name
@@ -863,9 +857,6 @@ impl GlobalCacheTracker {
863857 child_base_paths : & [ & Path ] ,
864858 delete_paths : & mut Vec < PathBuf > ,
865859 ) -> CargoResult < ( ) > {
866- let _p = crate :: util:: profile:: start ( format ! (
867- "update db parent for removed from disk {parent_table_name}"
868- ) ) ;
869860 trace ! ( target: "gc" , "checking for db entries to remove from {parent_table_name}" ) ;
870861 let mut select_stmt =
871862 conn. prepare_cached ( & format ! ( "SELECT rowid, name FROM {parent_table_name}" ) ) ?;
@@ -899,7 +890,6 @@ impl GlobalCacheTracker {
899890 now : Timestamp ,
900891 base_path : & Path ,
901892 ) -> CargoResult < ( ) > {
902- let _p = crate :: util:: profile:: start ( "populate untracked crate" ) ;
903893 trace ! ( target: "gc" , "populating untracked crate files" ) ;
904894 let mut insert_stmt = conn. prepare_cached (
905895 "INSERT INTO registry_crate (registry_id, name, size, timestamp)
@@ -939,7 +929,6 @@ impl GlobalCacheTracker {
939929 base_path : & Path ,
940930 populate_size : bool ,
941931 ) -> CargoResult < ( ) > {
942- let _p = crate :: util:: profile:: start ( format ! ( "populate untracked {table_name}" ) ) ;
943932 trace ! ( target: "gc" , "populating untracked files for {table_name}" ) ;
944933 // Gather names (and make sure they are in the database).
945934 let id_names = Self :: names_from ( & base_path) ?;
@@ -1003,7 +992,6 @@ impl GlobalCacheTracker {
1003992 table_name : & str ,
1004993 base_path : & Path ,
1005994 ) -> CargoResult < ( ) > {
1006- let _p = crate :: util:: profile:: start ( format ! ( "update NULL sizes {table_name}" ) ) ;
1007995 trace ! ( target: "gc" , "updating NULL size information in {table_name}" ) ;
1008996 let mut null_stmt = conn. prepare_cached ( & format ! (
1009997 "SELECT {table_name}.rowid, {table_name}.name, {parent_table_name}.name
@@ -1570,7 +1558,6 @@ impl DeferredGlobalLastUse {
15701558 /// This will also clear the state of `self`.
15711559 #[ tracing:: instrument( skip_all) ]
15721560 pub fn save ( & mut self , tracker : & mut GlobalCacheTracker ) -> CargoResult < ( ) > {
1573- let _p = crate :: util:: profile:: start ( "saving last-use data" ) ;
15741561 trace ! ( target: "gc" , "saving last-use data" ) ;
15751562 if self . is_empty ( ) {
15761563 return Ok ( ( ) ) ;
0 commit comments