]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
refactor(tracing): Use MTR_SCOPE
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 16 Aug 2021 19:15:56 +0000 (21:15 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 16 Aug 2021 19:22:20 +0000 (21:22 +0200)
src/ccache.cpp
src/storage/primary/PrimaryStorage.cpp

index 8eec88487109d2d985696845b7136cea47a6ca39..f849b0258581622d89514cd32c69507756b7829a 100644 (file)
@@ -726,7 +726,7 @@ update_manifest_file(Context& ctx,
     return;
   }
 
-  MTR_BEGIN("manifest", "manifest_put");
+  MTR_SCOPE("manifest", "manifest_put");
 
   // See comment in get_file_hash_index for why saving of timestamps is forced
   // for precompiled headers.
@@ -744,8 +744,6 @@ update_manifest_file(Context& ctx,
                            ctx.time_of_compilation,
                            save_timestamp);
     });
-
-  MTR_END("manifest", "manifest_put");
 }
 
 struct FindCoverageFileResult
index edb14906156acec6f43f22ab7138f1726dbf2606..175285135093c84e1a90f9fa2f18c4622e310b57 100644 (file)
@@ -97,11 +97,11 @@ PrimaryStorage::PrimaryStorage(const Config& config) : m_config(config)
 void
 PrimaryStorage::initialize()
 {
-  MTR_BEGIN("primary_storage", "clean_internal_tempdir");
+  MTR_SCOPE("primary_storage", "clean_internal_tempdir");
+
   if (m_config.temporary_dir() == m_config.cache_dir() + "/tmp") {
     clean_internal_tempdir();
   }
-  MTR_END("primary_storage", "clean_internal_tempdir");
 }
 
 void