Skip to content

Commit f0a6f6b

Browse files
Move DebugSettingsManager to core
- pass registry path in constructor Change-Id: I2a121da2c9483a0df088989feea490a638c63016 Signed-off-by: Mateusz Hoppe <[email protected]>
1 parent 43db1bf commit f0a6f6b

File tree

94 files changed

+163
-116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+163
-116
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ endif()
776776
include_directories(${NEO_BUILD_DIR})
777777
include_directories(${NEO_SOURCE_DIR})
778778
include_directories(${NEO_SOURCE_DIR}/core/compiler_interface/compiler_options${BRANCH_DIR_SUFFIX})
779+
include_directories(${NEO_SOURCE_DIR}/core/debug_settings/definitions${BRANCH_DIR_SUFFIX})
779780
include_directories(${NEO_SOURCE_DIR}/core/memory_manager/definitions${BRANCH_DIR_SUFFIX})
780781
include_directories(${NEO_SOURCE_DIR}/core/memory_properties${BRANCH_DIR_SUFFIX})
781782
include_directories(${NEO_SOURCE_DIR}/core/sku_info/definitions${BRANCH_DIR_SUFFIX})
@@ -787,7 +788,7 @@ include_directories(${NEO_SOURCE_DIR}/runtime/gmm_helper/client_context${BRANCH_
787788
include_directories(${NEO_SOURCE_DIR}/runtime/gmm_helper/gmm_memory${BRANCH_DIR_SUFFIX})
788789
include_directories(${NEO_SOURCE_DIR}/runtime/mem_obj/definitions${BRANCH_DIR_SUFFIX})
789790
include_directories(${NEO_SOURCE_DIR}/runtime/memory_manager/definitions${BRANCH_DIR_SUFFIX})
790-
include_directories(${NEO_SOURCE_DIR}/runtime/os_interface/definitions${BRANCH_DIR_SUFFIX})
791+
791792

792793
if(HAVE_INSTRUMENTATION)
793794
set(IGDRCL__INSTRUMENTATION_DIR_SUFFIX ${BRANCH_DIR_SUFFIX})

core/compiler_interface/compiler_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
#include "core/compiler_interface/compiler_cache.h"
1111
#include "core/compiler_interface/compiler_interface.inl"
12+
#include "core/debug_settings/debug_settings_manager.h"
1213
#include "core/helpers/hw_info.h"
1314
#include "runtime/device/device.h"
14-
#include "runtime/os_interface/debug_settings_manager.h"
1515
#include "runtime/os_interface/os_inc_base.h"
1616

1717
#include "cif/common/cif_main.h"

core/debug_settings/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (C) 2019 Intel Corporation
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
7+
set(NEO_CORE_DEBUG_SETTINGS
8+
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
9+
${CMAKE_CURRENT_SOURCE_DIR}/debug_settings_manager.h
10+
${CMAKE_CURRENT_SOURCE_DIR}/debug_settings_manager.cpp
11+
${CMAKE_CURRENT_SOURCE_DIR}/debug_variables_base.inl
12+
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}/debug_variables.inl
13+
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}/translate_debug_settings.cpp
14+
${CMAKE_CURRENT_SOURCE_DIR}/definitions/translate_debug_settings.h
15+
)
16+
17+
set_property(GLOBAL PROPERTY NEO_CORE_DEBUG_SETTINGS ${NEO_CORE_DEBUG_SETTINGS})

runtime/os_interface/debug_settings_manager.cpp renamed to core/debug_settings/debug_settings_manager.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@
77

88
#include "debug_settings_manager.h"
99

10+
#include "core/debug_settings/definitions/translate_debug_settings.h"
1011
#include "core/helpers/debug_helpers.h"
1112
#include "core/helpers/ptr_math.h"
1213
#include "core/helpers/string.h"
1314
#include "core/utilities/debug_settings_reader_creator.h"
14-
#include "runtime/os_interface/definitions/translate_debug_settings.h"
15-
#include "runtime/os_interface/ocl_reg_path.h"
16-
17-
#include "CL/cl.h"
1815

1916
#include <cstdio>
2017
#include <sstream>
@@ -27,12 +24,10 @@ static std::string to_string(const std::string &arg) {
2724

2825
namespace NEO {
2926

30-
DebugSettingsManager<globalDebugFunctionalityLevel> DebugManager;
31-
3227
template <DebugFunctionalityLevel DebugLevel>
33-
DebugSettingsManager<DebugLevel>::DebugSettingsManager() {
28+
DebugSettingsManager<DebugLevel>::DebugSettingsManager(const char *registryPath) {
3429
if (registryReadAvailable()) {
35-
readerImpl = SettingsReaderCreator::create(oclRegPath);
30+
readerImpl = SettingsReaderCreator::create(std::string(registryPath));
3631
injectSettingsFromReader();
3732
dumpFlags();
3833
}

runtime/os_interface/debug_settings_manager.h renamed to core/debug_settings/debug_settings_manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ struct DebugVariables {
7373
template <DebugFunctionalityLevel DebugLevel>
7474
class DebugSettingsManager {
7575
public:
76-
DebugSettingsManager();
76+
DebugSettingsManager(const char *registryPath);
7777
~DebugSettingsManager();
7878

7979
DebugSettingsManager(const DebugSettingsManager &) = delete;
File renamed without changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright (C) 2018-2019 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "core/debug_settings/debug_variables_base.inl"

runtime/os_interface/definitions/translate_debug_settings.cpp renamed to core/debug_settings/definitions/translate_debug_settings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
*/
77

8-
#include "runtime/os_interface/definitions/translate_debug_settings.h"
8+
#include "core/debug_settings/definitions/translate_debug_settings.h"
99

1010
namespace NEO {
1111

runtime/os_interface/definitions/translate_debug_settings.h renamed to core/debug_settings/definitions/translate_debug_settings.h

File renamed without changes.

core/helpers/allow_deferred_deleter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*
66
*/
77

8+
#include "core/debug_settings/debug_settings_manager.h"
89
#include "core/helpers/deferred_deleter_helper.h"
9-
#include "runtime/os_interface/debug_settings_manager.h"
1010

1111
namespace NEO {
1212
bool isDeferredDeleterEnabled() {

0 commit comments

Comments
 (0)