mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add profiling calculation from timestamp packets
Change-Id: Ie7f8c703ca5ea5eb1f5207871ef94cbc7ece18b7 Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
3fe78d263b
commit
c1cb1f9be6
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user