File: pmt_helper.cpp

package info (click to toggle)
intel-compute-runtime 25.44.36015.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 79,632 kB
  • sloc: cpp: 931,547; lisp: 2,074; sh: 719; makefile: 162; python: 21
file content (25 lines) | stat: -rw-r--r-- 774 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright (C) 2021-2025 Intel Corporation
 *
 * SPDX-License-Identifier: MIT
 *
 */

#include "level_zero/tools/source/sysman/linux/pmt/pmt.h"
#include "level_zero/tools/source/sysman/linux/pmt/pmt_xml_offsets.h"

namespace L0 {

ze_result_t PlatformMonitoringTech::getKeyOffsetMap(std::string guid, std::map<std::string, uint64_t> &keyOffsetMap) {
    ze_result_t retVal = ZE_RESULT_ERROR_UNKNOWN;
    auto keyOffsetMapEntry = guidToKeyOffsetMap.find(guid);
    if (keyOffsetMapEntry == guidToKeyOffsetMap.end()) {
        // We did not have any entry for this guid in guidToKeyOffsetMap
        retVal = ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
        return retVal;
    }
    keyOffsetMap = keyOffsetMapEntry->second;
    return ZE_RESULT_SUCCESS;
}

} // namespace L0