From: Joel Rosdahl Date: Mon, 16 Aug 2021 19:15:56 +0000 (+0200) Subject: refactor(tracing): Use MTR_SCOPE X-Git-Tag: v4.4~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1897fd5ec83e808b13dcae76026a10a134dcd6e1;p=thirdparty%2Fccache.git refactor(tracing): Use MTR_SCOPE --- 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