refactor: improve logging of allocations

add capability to measure total amount of allocated memory
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2024-09-11 20:46:36 +00:00
committed by Compute-Runtime-Automation
parent d18d58d4f7
commit da59b88122
8 changed files with 64 additions and 35 deletions

View File

@@ -20,6 +20,7 @@ namespace NEO {
class Kernel;
struct MultiDispatchInfo;
class GraphicsAllocation;
class MemoryManager;
static const int32_t maxErrorDescriptionSize = 1024;
const char *getAllocationTypeString(GraphicsAllocation const *graphicsAllocation);
@@ -40,7 +41,7 @@ class FileLogger {
void dumpKernel(const std::string &name, const std::string &src);
void logApiCall(const char *function, bool enter, int32_t errorCode);
void logAllocation(GraphicsAllocation const *graphicsAllocation);
void logAllocation(GraphicsAllocation const *graphicsAllocation, MemoryManager const *memoryManager);
size_t getInput(const size_t *input, int32_t index);
MOCKABLE_VIRTUAL void writeToFile(std::string filename, const char *str, size_t length, std::ios_base::openmode mode);