Add Wddm residency logging to upper layers

Related-To: NEO-4338

Change-Id: Ib36f4c8da5a2ea9d4f81063faa718a29fbc4b8d8
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2020-04-02 20:15:04 +02:00
parent 43dba9de4a
commit 1b884e3ea9
9 changed files with 307 additions and 36 deletions

View File

@@ -9,22 +9,15 @@
#include "shared/source/helpers/debug_helpers.h"
#include <ctime>
#include <iomanip>
namespace NEO {
DirectSubmissionDiagnosticsCollector::DirectSubmissionDiagnosticsCollector(uint32_t executions, bool storeExecutions)
: storeExecutions(storeExecutions) {
UNRECOVERABLE_IF(executions == 0);
executionList.resize(executions);
executionsCount = executions;
std::chrono::system_clock::time_point timeStamp = std::chrono::system_clock::now();
std::time_t dateTime = std::chrono::system_clock::to_time_t(timeStamp);
std::stringstream value;
value << std::dec << "executions-" << executions;
value << "_time-" << std::put_time(std::localtime(&dateTime), "%F-%T");
std::stringstream filename;
filename << "ulls_diagnostic_" << value.str() << ".log";
logFile = IoFunctions::fopenPtr(filename.str().c_str(), "at");