2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2022-02-04 13:59:01 +00:00
|
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/memory_manager/graphics_allocation.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
#include <cinttypes>
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2021-03-24 18:21:13 +00:00
|
|
|
class HwTimeStamps : public TagTypeBase {
|
|
|
|
|
public:
|
2018-08-30 13:37:39 +02:00
|
|
|
void initialize() {
|
|
|
|
|
GlobalStartTS = 0;
|
|
|
|
|
ContextStartTS = 0;
|
|
|
|
|
GlobalEndTS = 0;
|
|
|
|
|
ContextEndTS = 0;
|
|
|
|
|
GlobalCompleteTS = 0;
|
|
|
|
|
ContextCompleteTS = 0;
|
|
|
|
|
}
|
2020-04-23 10:38:14 +02:00
|
|
|
|
2022-02-04 13:59:01 +00:00
|
|
|
static constexpr AllocationType getAllocationType() {
|
|
|
|
|
return AllocationType::PROFILING_TAG_BUFFER;
|
2019-02-08 10:27:48 +01:00
|
|
|
}
|
2021-03-24 18:21:13 +00:00
|
|
|
|
|
|
|
|
static constexpr TagNodeType getTagNodeType() { return TagNodeType::HwTimeStamps; }
|
|
|
|
|
|
|
|
|
|
uint64_t getContextStartValue(uint32_t) const { return ContextStartTS; }
|
|
|
|
|
uint64_t getGlobalStartValue(uint32_t) const { return GlobalStartTS; }
|
|
|
|
|
uint64_t getContextEndValue(uint32_t) const { return ContextEndTS; }
|
|
|
|
|
uint64_t getGlobalEndValue(uint32_t) const { return GlobalEndTS; }
|
|
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
uint64_t GlobalStartTS;
|
|
|
|
|
uint64_t ContextStartTS;
|
|
|
|
|
uint64_t GlobalEndTS;
|
|
|
|
|
uint64_t ContextEndTS;
|
|
|
|
|
uint64_t GlobalCompleteTS;
|
|
|
|
|
uint64_t ContextCompleteTS;
|
|
|
|
|
};
|
2021-03-24 18:21:13 +00:00
|
|
|
|
|
|
|
|
static_assert((6 * sizeof(uint64_t)) == sizeof(HwTimeStamps),
|
|
|
|
|
"This structure is consumed by GPU and has to follow specific restrictions for padding and size");
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|