Skip to content

Commit efda64e

Browse files
Source Level Debugger - debugger library interface
- interface to debugger dynamic library - code is included when source level debugger header exists, otherwise implementation is exluded from build - unit tests do not load real dynamic library, instead test version (DebbugerLibrary) of OsLibrary is used. Change-Id: Id3229c77963352e8001043ee41b7d48c6b180a59
1 parent b79be3d commit efda64e

27 files changed

+849
-10
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ if(NOT KMDAF_HEADERS_DIR)
127127
endif()
128128
endif(NOT KMDAF_HEADERS_DIR)
129129

130+
if(NOT SOURCE_LEVEL_DEBUGGER_HEADERS_DIR)
131+
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../internal/source_level_debugger/igfx_debug_interchange_types.h")
132+
get_filename_component(SOURCE_LEVEL_DEBUGGER_HEADERS_DIR "../internal/source_level_debugger/" ABSOLUTE)
133+
message(STATUS "Source Level Debugger headers dir: ${SOURCE_LEVEL_DEBUGGER_HEADERS_DIR}")
134+
endif()
135+
endif(NOT SOURCE_LEVEL_DEBUGGER_HEADERS_DIR)
136+
130137
if(LIBDRM_DIR)
131138
get_filename_component(I915_INCLUDES_DIR "${LIBDRM_DIR}/include" ABSOLUTE)
132139
else()

manifests/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ components:
3636
internal:
3737
branch: master
3838
dest_dir: internal
39-
revision: 5f0194eb176cce396b9bed04c98bf2f4c7779ded
39+
revision: 16a7c3b8a4aff96b1911e3b0c917a14d1f8fe582
4040
type: git
4141
khronos:
4242
branch: master

offline_compiler/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ set(CLOC_SRCS_LIB
3737
if(WIN32)
3838
list(APPEND CLOC_SRCS_LIB
3939
${IGDRCL_SOURCE_DIR}/runtime/os_interface/windows/os_library.cpp
40-
${IGDRCL_SOURCE_DIR}/runtime/os_interface/windows/options.cpp
40+
${IGDRCL_SOURCE_DIR}/runtime/dll/windows/options.cpp
4141
)
4242
else()
4343
list(APPEND CLOC_SRCS_LIB
4444
${IGDRCL_SOURCE_DIR}/runtime/os_interface/linux/os_library.cpp
45-
${IGDRCL_SOURCE_DIR}/runtime/os_interface/linux/options.cpp
45+
${IGDRCL_SOURCE_DIR}/runtime/dll/linux/options.cpp
4646
)
4747
endif()
4848

runtime/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ target_include_directories(${NEO_STATIC_LIB_NAME} PUBLIC
8383
${IGDRCL__IGC_INCLUDE_DIR}
8484
${THIRD_PARTY_DIR}
8585
${UMKM_SHAREDDATA_INCLUDE_PATHS}
86+
${SOURCE_LEVEL_DEBUGGER_HEADERS_DIR}
8687
)
8788

8889
if(WIN32)

runtime/dll/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ set(RUNTIME_SRCS_DLL_BASE
3030
${CMAKE_CURRENT_SOURCE_DIR}/create_deferred_deleter.cpp
3131
${CMAKE_CURRENT_SOURCE_DIR}/create_tbx_sockets.cpp
3232
${CMAKE_CURRENT_SOURCE_DIR}/options.cpp
33+
${CMAKE_CURRENT_SOURCE_DIR}/source_level_debugger.cpp
3334

3435
${IGDRCL_SOURCE_DIR}/runtime/api/api.cpp
3536
${IGDRCL_SOURCE_DIR}/runtime/gmm_helper/resource_info.cpp
@@ -44,10 +45,12 @@ set(RUNTIME_SRCS_DLL_BASE
4445
)
4546

4647
set(RUNTIME_SRCS_DLL_LINUX
48+
${CMAKE_CURRENT_SOURCE_DIR}/linux/options.cpp
4749
${CMAKE_CURRENT_SOURCE_DIR}/linux/drm_neo_create.cpp
4850
)
4951

5052
set(RUNTIME_SRCS_DLL_WINDOWS
53+
${CMAKE_CURRENT_SOURCE_DIR}/windows/options.cpp
5154
${IGDRCL_SOURCE_DIR}/runtime/gmm_helper/gmm_memory.cpp
5255
${IGDRCL_SOURCE_DIR}/runtime/gmm_helper/page_table_mngr.cpp
5356
${IGDRCL_SOURCE_DIR}/runtime/os_interface/windows/sys_calls.cpp
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2018, Intel Corporation
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*/
22+
23+
#include "runtime/source_level_debugger/source_level_debugger.h"
24+
25+
using namespace std;
26+
27+
namespace OCLRT {
28+
29+
OsLibrary *SourceLevelDebugger::loadDebugger() {
30+
return OsLibrary::load(SourceLevelDebugger::dllName);
31+
}
32+
} // namespace OCLRT
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, Intel Corporation
2+
* Copyright (c) 2017 - 2018, Intel Corporation
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),
@@ -30,4 +30,4 @@ const char *igcDllName = "igc32.dll";
3030
#endif
3131

3232
const char *gdiDllName = "gdi32.dll";
33-
}
33+
} // namespace Os

runtime/os_interface/linux/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ set(RUNTIME_SRCS_OS_INTERFACE_LINUX
4444
${CMAKE_CURRENT_SOURCE_DIR}/drm_null_device.h
4545
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config.cpp
4646
${CMAKE_CURRENT_SOURCE_DIR}/linux_inc.cpp
47-
${CMAKE_CURRENT_SOURCE_DIR}/options.cpp
4847
${CMAKE_CURRENT_SOURCE_DIR}/os_inc.h
4948
${CMAKE_CURRENT_SOURCE_DIR}/os_interface.cpp
5049
${CMAKE_CURRENT_SOURCE_DIR}/os_interface.h
@@ -55,6 +54,7 @@ set(RUNTIME_SRCS_OS_INTERFACE_LINUX
5554
${CMAKE_CURRENT_SOURCE_DIR}/performance_counters_linux.cpp
5655
${CMAKE_CURRENT_SOURCE_DIR}/performance_counters_linux.h
5756
${CMAKE_CURRENT_SOURCE_DIR}/print.cpp
57+
${CMAKE_CURRENT_SOURCE_DIR}/source_level_debugger_linux.cpp
5858
)
5959

6060
if(UNIX)

runtime/os_interface/linux/os_interface.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, Intel Corporation
2+
* Copyright (c) 2017 - 2018, Intel Corporation
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),
@@ -42,4 +42,8 @@ bool OSInterface::are64kbPagesEnabled() {
4242
return osEnabled64kbPages;
4343
}
4444

45+
uint32_t OSInterface::getDeviceHandle() const {
46+
return 0;
47+
}
48+
4549
} // namespace OCLRT

0 commit comments

Comments
 (0)