forked from qt-creator/qt-creator
QmlDesigner: Introduce extra tracing file for source path storage
That is reducing dependecies and compilation time. Change-Id: I31acc6df4175dc42c9b11c5c69b970e1b5e71a4a Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -360,6 +360,8 @@ extend_qtc_library(QmlDesignerCore
|
|||||||
sourcepathexceptions.h
|
sourcepathexceptions.h
|
||||||
sourcepathstorage.cpp
|
sourcepathstorage.cpp
|
||||||
sourcepathstorage.h
|
sourcepathstorage.h
|
||||||
|
sourcepathstoragetracing.cpp
|
||||||
|
sourcepathstoragetracing.h
|
||||||
sourcepathview.h
|
sourcepathview.h
|
||||||
storagecache.h
|
storagecache.h
|
||||||
storagecacheentry.h
|
storagecacheentry.h
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "sourcepathexceptions.h"
|
#include "sourcepathexceptions.h"
|
||||||
|
|
||||||
#include <tracing/qmldesignertracing.h>
|
#include "sourcepathstoragetracing.h"
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
|
@@ -4,8 +4,7 @@
|
|||||||
#include "sourcepathstorage.h"
|
#include "sourcepathstorage.h"
|
||||||
|
|
||||||
#include "sourcepathexceptions.h"
|
#include "sourcepathexceptions.h"
|
||||||
|
#include "sourcepathstoragetracing.h"
|
||||||
#include <tracing/qmldesignertracing.h>
|
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
|
@@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2025 The Qt Company Ltd.
|
||||||
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
|
#include "sourcepathstoragetracing.h"
|
||||||
|
|
||||||
|
#include <sqlitebasestatement.h>
|
||||||
|
|
||||||
|
namespace QmlDesigner::SourcePathStorageTracing {
|
||||||
|
using namespace NanotraceHR::Literals;
|
||||||
|
|
||||||
|
#ifdef ENABLE_SOURCE_PATH_STORAGE_TRACING
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
thread_local Category category_{"source path storage",
|
||||||
|
Tracing::eventQueueWithStringArguments(),
|
||||||
|
Tracing::eventQueueWithoutArguments(),
|
||||||
|
category};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
Category &category()
|
||||||
|
{
|
||||||
|
return category_;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} // namespace QmlDesigner::SourcePathStorageTracing
|
@@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (C) 2025 The Qt Company Ltd.
|
||||||
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
|
#include <qmldesignercorelib_exports.h>
|
||||||
|
|
||||||
|
#include <nanotrace/nanotracehr.h>
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace QmlDesigner::SourcePathStorageTracing {
|
||||||
|
|
||||||
|
#ifdef ENABLE_SOURCE_PATH_STORAGE_TRACING
|
||||||
|
|
||||||
|
using Category = NanotraceHR::EnabledCategory;
|
||||||
|
using SourceLocation = Category::SourceLocation;
|
||||||
|
|
||||||
|
[[gnu::pure]] QMLDESIGNERCORE_EXPORT Category &category();
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
using Category = NanotraceHR::DisabledCategory;
|
||||||
|
using SourceLocation = Category::SourceLocation;
|
||||||
|
|
||||||
|
inline Category category()
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
} // namespace QmlDesigner::SourcePathStorageTracing
|
@@ -4,11 +4,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "nonlockingmutex.h"
|
#include "nonlockingmutex.h"
|
||||||
|
#include "sourcepathstoragetracing.h"
|
||||||
#include "storagecacheentry.h"
|
#include "storagecacheentry.h"
|
||||||
#include "storagecachefwd.h"
|
#include "storagecachefwd.h"
|
||||||
|
|
||||||
#include <tracing/qmldesignertracing.h>
|
|
||||||
|
|
||||||
#include <sourcepathids.h>
|
#include <sourcepathids.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
|
@@ -68,22 +68,4 @@ Category &category()
|
|||||||
|
|
||||||
} // namespace ModelTracing
|
} // namespace ModelTracing
|
||||||
|
|
||||||
namespace SourcePathStorageTracing {
|
|
||||||
|
|
||||||
#ifdef ENABLE_SOURCE_PATH_STORAGE_TRACING
|
|
||||||
|
|
||||||
Category &category()
|
|
||||||
{
|
|
||||||
thread_local Category category_{"source path storage",
|
|
||||||
Tracing::eventQueueWithStringArguments(),
|
|
||||||
Tracing::eventQueueWithoutArguments(),
|
|
||||||
category};
|
|
||||||
|
|
||||||
return category_;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace SourcePathStorageTracing
|
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -48,23 +48,4 @@ inline Category category()
|
|||||||
|
|
||||||
} // namespace ModelTracing
|
} // namespace ModelTracing
|
||||||
|
|
||||||
namespace SourcePathStorageTracing {
|
|
||||||
|
|
||||||
#ifdef ENABLE_SOURCE_PATH_STORAGE_TRACING
|
|
||||||
|
|
||||||
using Category = NanotraceHR::EnabledCategory;
|
|
||||||
|
|
||||||
[[gnu::pure]] QMLDESIGNERCORE_EXPORT Category &category();
|
|
||||||
#else
|
|
||||||
|
|
||||||
using Category = NanotraceHR::DisabledCategory;
|
|
||||||
|
|
||||||
inline Category category()
|
|
||||||
{
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace SourcePathStorageTracing
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
Reference in New Issue
Block a user