mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
[4/n] Log allocation placement.
Change-Id: I300be5f09b6ee77aa89584a6bddf4c7e57aa54f1
This commit is contained in:
committed by
sys_ocldev
parent
378bd28bab
commit
842fb5dadc
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018 Intel Corporation
|
||||
# Copyright (C) 2018-2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -14,6 +14,7 @@ set(RUNTIME_SRCS_OS_INTERFACE_LINUX
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_factory_linux.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/driver_info.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drm_32bit_memory.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drm_allocation.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drm_allocation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drm_buffer_object.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drm_buffer_object.h
|
||||
|
||||
21
runtime/os_interface/linux/drm_allocation.cpp
Normal file
21
runtime/os_interface/linux/drm_allocation.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "runtime/os_interface/linux/drm_allocation.h"
|
||||
#include "runtime/os_interface/linux/drm_buffer_object.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace OCLRT {
|
||||
std::string DrmAllocation::getAllocationInfoString() const {
|
||||
std::stringstream ss;
|
||||
if (bo != nullptr) {
|
||||
ss << " Handle: " << bo->peekHandle();
|
||||
}
|
||||
return ss.str();
|
||||
}
|
||||
} // namespace OCLRT
|
||||
@@ -24,6 +24,8 @@ class DrmAllocation : public GraphicsAllocation {
|
||||
this->memoryPool = pool;
|
||||
}
|
||||
|
||||
std::string getAllocationInfoString() const override;
|
||||
|
||||
BufferObject *getBO() const {
|
||||
if (fragmentsStorage.fragmentCount) {
|
||||
return fragmentsStorage.fragmentStorageData[0].osHandleStorage->bo;
|
||||
|
||||
@@ -83,10 +83,9 @@ class WddmAllocation : public GraphicsAllocation {
|
||||
void setCpuAddress(void *cpuPtr) { this->cpuPtr = cpuPtr; }
|
||||
bool needsMakeResidentBeforeLock = false;
|
||||
|
||||
std::string getAllocationInfoString() const {
|
||||
std::string getAllocationInfoString() const override {
|
||||
std::stringstream ss;
|
||||
ss << " Handle: " << handle;
|
||||
ss << std::endl;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user