Add profiling calculation from timestamp packets

Change-Id: Ie7f8c703ca5ea5eb1f5207871ef94cbc7ece18b7
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
Jobczyk, Lukasz
2019-01-21 11:44:56 +01:00
committed by sys_ocldev
parent 3fe78d263b
commit c1cb1f9be6
7 changed files with 175 additions and 47 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -99,4 +99,21 @@ struct MyEvent : public Event {
uint64_t getCompleteTimeStamp() {
return this->completeTimeStamp;
}
uint64_t getGlobalStartTimestamp() const {
return this->globalStartTimestamp;
}
bool getDataCalcStatus() const {
return this->dataCalculated;
}
void calcProfilingData(uint64_t contextStartTS, uint64_t contextEndTS, uint64_t *contextCompleteTS, uint64_t globalStartTS) override {
if (DebugManager.flags.ReturnRawGpuTimestamps.get()) {
globalStartTimestamp = globalStartTS;
}
Event::calcProfilingData(contextStartTS, contextEndTS, contextCompleteTS, globalStartTS);
}
uint64_t globalStartTimestamp;
};