summaryrefslogtreecommitdiff
path: root/src/cl_event.h
diff options
context:
space:
mode:
authorJunyan He <junyan.he@linux.intel.com>2013-11-29 10:55:54 +0800
committerZhigang Gong <zhigang.gong@intel.com>2013-11-29 13:28:31 +0800
commit64f0c0bbe49eff76819f2b3ca378f57c5efba7c8 (patch)
tree50d6b9df5334355cd7309ae26344255594ad82d4 /src/cl_event.h
parenta5d58402693e6afd330a927bbbac4b44bd32a82d (diff)
downloadbeignet-64f0c0bbe49eff76819f2b3ca378f57c5efba7c8.tar.gz
Complete the feature of clGetEventProfilingInfo API
The profiling feature is now all supported. We use drm_intel_reg_read to get the current time of GPU when the event is queued and submitted, and use PIPI_CONTROL cmd to get the executing time of the GPU for kernel start and end. One trivial problem is that: The GPU timer counter is 36 bits with resolution of 80ns, so 2^36*80 = 5500s, about half an hour. Some test may last about 2~5 min and if it starts at about half an hour, this may cause a wrap back problem and cause the case fail. Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'src/cl_event.h')
-rw-r--r--src/cl_event.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cl_event.h b/src/cl_event.h
index 722486a6..3c611109 100644
--- a/src/cl_event.h
+++ b/src/cl_event.h
@@ -68,6 +68,7 @@ struct _cl_event {
enqueue_callback* enqueue_cb; /* This event's enqueue */
enqueue_callback* waits_head; /* The head of enqueues list wait on this event */
cl_bool emplict; /* Identify this event whether created by api emplict*/
+ cl_ulong timestamp[4];/* The time stamps for profiling. */
};
/* Create a new event object */
@@ -91,6 +92,6 @@ void cl_event_update_status(cl_event);
/* Create the marker event */
cl_int cl_event_marker(cl_command_queue, cl_event*);
/* Do the event profiling */
-cl_int cl_event_profiling(cl_event event, cl_profiling_info param_name, cl_ulong *ret_val);
+cl_int cl_event_get_timestamp(cl_event event, cl_profiling_info param_name);
#endif /* __CL_EVENT_H__ */