1/*========================== begin_copyright_notice ============================
2
3Copyright (C) 2021 Intel Corporation
4
5SPDX-License-Identifier: MIT
6
7============================= end_copyright_notice ===========================*/
8
9syntax = "proto3";
10
11import "Metrics/proto_schema/variable_info.proto";
12import "Metrics/proto_schema/kernel_arguments.proto";
13import "Metrics/proto_schema/parallelization_enum.proto";
14import "Metrics/proto_schema/function_calls.proto";
15import "Metrics/proto_schema/instruction_stats.proto";
16import "Metrics/proto_schema/emulated_calls.proto";
17import "Metrics/proto_schema/mem_alloc_stats.proto";
18import "Metrics/proto_schema/code_reference.proto";
19import "Metrics/proto_schema/local_reg_stats.proto";
20import "Metrics/proto_schema/cfg_stats.proto";
21
22package IGC_METRICS;
23
24  enum FunctionType {
25    KERNEL = 0;
26    FUNCTION = 1;
27  }
28
29message Function
30{
31  string name = 1;
32
33  CodeRef funcLoc = 2;
34
35  FunctionType type = 3;
36
37  repeated VarInfo variables = 4;
38// Only for Kernels
39  repeated KernelArg arguments = 5;
40
41// Only for DPC++ and OpenMP
42  optional ParallelizationType parallelization = 6;
43
44  repeated FuncCalls functionCalls = 7;
45  repeated FuncEmuCalls emuFunctionCalls = 8;
46
47  InstrStats instruction_stats = 9;
48
49  MemAllocStats memory_stats = 10;
50
51  LocalRegStats local_reg_stats = 11;
52
53  CFGStats cfg_stats = 12;
54}