You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for enabling/disabling tracing layer during runtime
* Add support for enabling/disabling tracing layer during runtime
Related-To: VLCLJ-2093
- Added new apis zelEnableTracingLayer & zelDisableTracingLayer to
enable the tracing layer during runtime without needing to set
ZE_ENABLE_TRACING_LAYER=1.
- Tracing Layer Library is now always loaded by the Loader enabling
for tracing to be enabled dynamically.
Signed-off-by: Spruit, Neil R <[email protected]>
Copy file name to clipboardexpand all lines: doc/loader_api.md
+9
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,18 @@ To solve this issue, `zelLoaderTranslateHandle` is used to retrieve the raw driv
35
35
-__**handleOut__ Output location to store the translated handle
36
36
37
37
38
+
### zelEnableTracingLayer
38
39
40
+
When a user wants to enable the Tracing Layer for API Tracing, one usually set `ZE_ENABLE_TRACING_LAYER=1` before the call to zeInit(), however if one wanted to enable and disable tracing during runtime, the only way previously would be to enable tracing with the tracers disabled. This causes a performance hit due to the tracing layer intercepts.
39
41
42
+
To resolve this, the tracing layer additionally can be enabled thru this new api `zelEnableTracingLayer`. This will enable the api tracing layer until the program exits or the user calls `zelDisableTracingLayer`.
40
43
44
+
This call enables the tracing layer for all calls to the Loader after this call completes for all initialized drivers.
41
45
46
+
### zelDisableTracingLayer
42
47
48
+
Disables the tracing layer intercepts at runtime by restoring the previous call path thru the loader before tracing was enabled.
43
49
50
+
This does not unload the tracing layer library such that one can call `zelEnableTracingLayer` and `zelDisableTracingLayer` as many times one needs to during the application.
51
+
52
+
NOTE: The each call to `zelEnableTracingLayer` tracks a reference count of how many calls to enable have been seen. The Tracing Layer intercepts will not be removed until the reference count has reached 0 indicating that all users of the tracing layer have called `zelDisableTracingLayer`.
0 commit comments