[Beignet] [PATCH 4/4] utests: event should be released

Pan, Xiuli xiuli.pan at intel.com
Fri Oct 9 00:25:08 PDT 2015


Ping for review, thx.

-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Pan Xiuli
Sent: Thursday, September 24, 2015 5:13 PM
To: beignet at lists.freedesktop.org
Cc: Pan, Xiuli <xiuli.pan at intel.com>
Subject: [Beignet] [PATCH 4/4] utests: event should be released

This is also gpgpu event, which can cause leakes.
Just release it.

Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
---
 utests/profiling_exec.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/utests/profiling_exec.cpp b/utests/profiling_exec.cpp index afa55ba..4232772 100644
--- a/utests/profiling_exec.cpp
+++ b/utests/profiling_exec.cpp
@@ -85,6 +85,7 @@ static void profiling_exec(void)
     OCL_CALL(clGetEventProfilingInfo, exec_event, CL_PROFILING_COMMAND_START, sizeof(cl_ulong), &time_start, NULL);
     OCL_CALL(clGetEventProfilingInfo, exec_event, CL_PROFILING_COMMAND_END, sizeof(cl_ulong), &time_end, NULL);
 
+    clReleaseEvent(exec_event);
     check_profiling_time(time_queue, time_submit, time_start, time_end);
 
     // Compare
--
2.1.4

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list