-
Notifications
You must be signed in to change notification settings - Fork 249
/
Copy pathtracing_api.h
86 lines (70 loc) · 2.55 KB
/
tracing_api.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* Copyright (C) 2019-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "opencl/source/tracing/tracing_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/*!
Function creates a tracing handle object
\param[in] device Device to create tracing handle for
\param[in] callback User-defined callback that will be called along with
traced API function
\param[in] userData Pointer to any data user would like to pass into the
callback, can be zero
\param[out] handle Tracing handle object that describes current tracing
session
\return Status code for current operation
Thread Safety: yes
*/
cl_int CL_API_CALL clCreateTracingHandleINTEL(cl_device_id device, cl_tracing_callback callback, void *userData, cl_tracing_handle *handle);
/*!
Function allows to specify which target API call should be traced.
By default function will NOT be traced
\param[in] handle Tracing handle object
\param[in] fid Target function identifier
\param[in] enable Flag to enable/disable tracing for target function
\return Status code for current operation
Thread Safety: no
*/
cl_int CL_API_CALL clSetTracingPointINTEL(cl_tracing_handle handle, ClFunctionId fid, cl_bool enable);
/*!
Function destroys the tracing handle object and releases all the associated
resources
\param[in] handle Tracing handle object
\return Status code for current operation
Thread Safety: no
*/
cl_int CL_API_CALL clDestroyTracingHandleINTEL(cl_tracing_handle handle);
/*!
Function enables the tracing process for the handle. Multiple handles
can be enabled at a time
\param[in] handle Tracing handle object
\return Status code for current operation
Thread Safety: yes
*/
cl_int CL_API_CALL clEnableTracingINTEL(cl_tracing_handle handle);
/*!
Function disables the tracing process for the handle. It will wait until
all currently running callbacks are done
\param[in] handle Tracing handle object
\return Status code for current operation
Thread Safety: yes
*/
cl_int CL_API_CALL clDisableTracingINTEL(cl_tracing_handle handle);
/*!
Function requests the tracing state for the handle
\param[in] handle Tracing handle object
\param[out] enable Returns TRUE if tracing handle is in use and
FALSE otherwise
\return Status code for current operation
Thread Safety: yes
*/
cl_int CL_API_CALL clGetTracingStateINTEL(cl_tracing_handle handle, cl_bool *enable);
#ifdef __cplusplus
}
#endif