From 1897fd5ec83e808b13dcae76026a10a134dcd6e1 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 16 Aug 2021 21:15:56 +0200 Subject: [PATCH] refactor(tracing): Use MTR_SCOPE --- src/ccache.cpp | 4 +--- src/storage/primary/PrimaryStorage.cpp | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ccache.cpp b/src/ccache.cpp index 8eec88487..f849b0258 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -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 diff --git a/src/storage/primary/PrimaryStorage.cpp b/src/storage/primary/PrimaryStorage.cpp index edb149061..175285135 100644 --- a/src/storage/primary/PrimaryStorage.cpp +++ b/src/storage/primary/PrimaryStorage.cpp @@ -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 -- 2.47.2