mirror of
https://github.com/intel/compute-runtime.git
synced 2025-06-28 17:58:30 +08:00

This Patch adds support for collecting IP Metrics using StreamerOpen, StreamerClose and StreamerReadData Related-To: LOCI-2755 Related-To: LOCI-2756 Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
34 lines
973 B
C++
34 lines
973 B
C++
/*
|
|
* Copyright (C) 2022 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "level_zero/tools/source/metrics/metric.h"
|
|
#include "level_zero/tools/source/metrics/os_metric_ip_sampling.h"
|
|
|
|
namespace L0 {
|
|
|
|
class IpSamplingMetricSourceImp;
|
|
|
|
struct IpSamplingMetricStreamerImp : MetricStreamer {
|
|
|
|
IpSamplingMetricStreamerImp(IpSamplingMetricSourceImp &ipSamplingSource) : ipSamplingSource(ipSamplingSource) {}
|
|
~IpSamplingMetricStreamerImp() override{};
|
|
ze_result_t readData(uint32_t maxReportCount, size_t *pRawDataSize, uint8_t *pRawData) override;
|
|
ze_result_t close() override;
|
|
Event::State getNotificationState() override;
|
|
ze_result_t appendStreamerMarker(CommandList &commandList, uint32_t value) override;
|
|
void attachEvent(ze_event_handle_t hNotificationEvent);
|
|
void detachEvent();
|
|
|
|
protected:
|
|
Event *pNotificationEvent = nullptr;
|
|
IpSamplingMetricSourceImp &ipSamplingSource;
|
|
};
|
|
|
|
} // namespace L0
|