Avoid automatic creation of performance data related .json files

Amends 1a84ae038d which enabled building
the Nanotrace library by default. The part that is used for startup
performance logging is only enabled at runtime with the `-trace` command
line argument, but some logging using the "hr" variant was automatically
created. Disable that part at compile time by default.

Fixes: QTCREATORBUG-30331
Change-Id: I8add207c760bfe2dde52534f55feb7b637ccb600
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Eike Ziller
2024-02-13 15:04:20 +01:00
parent a26aff7afd
commit 7b57ae31f6
2 changed files with 8 additions and 3 deletions

View File

@@ -3,7 +3,6 @@ add_qtc_library(Nanotrace
SOURCES SOURCES
nanotraceglobals.h nanotraceglobals.h
nanotrace.cpp nanotrace.h nanotrace.cpp nanotrace.h
nanotracehr.cpp nanotracehr.h
PUBLIC_DEPENDS Qt::Core Qt::Gui PUBLIC_DEPENDS Qt::Core Qt::Gui
PROPERTIES PROPERTIES
CXX_VISIBILITY_PRESET default CXX_VISIBILITY_PRESET default
@@ -16,3 +15,9 @@ extend_qtc_library(Nanotrace
CONDITION DESIGN_STUDIO_USE_NANOTRACE CONDITION DESIGN_STUDIO_USE_NANOTRACE
PUBLIC_DEFINES NANOTRACE_DESIGNSTUDIO_ENABLED PUBLIC_DEFINES NANOTRACE_DESIGNSTUDIO_ENABLED
) )
option(NANOTRACEHR_ENABLED "Enables collecting high resolution performance data" OFF)
extend_qtc_library(Nanotrace
SOURCES
nanotracehr.cpp nanotracehr.h
)

View File

@@ -34,7 +34,7 @@ enum class Tracing { IsDisabled, IsEnabled };
constexpr Tracing tracingStatus() constexpr Tracing tracingStatus()
{ {
#ifdef NANOTRACE_ENABLED #ifdef NANOTRACEHR_ENABLED
return Tracing::IsEnabled; return Tracing::IsEnabled;
#else #else
return Tracing::IsDisabled; return Tracing::IsDisabled;
@@ -1569,7 +1569,7 @@ template<typename Category, typename... Arguments>
Tracer(typename Category::ArgumentType name, Category &category, Arguments &&...) Tracer(typename Category::ArgumentType name, Category &category, Arguments &&...)
-> Tracer<Category, typename Category::IsActive>; -> Tracer<Category, typename Category::IsActive>;
#ifdef NANOTRACE_ENABLED #ifdef NANOTRACEHR_ENABLED
class GlobalTracer class GlobalTracer
{ {
public: public: