@@ -3265,6 +3265,7 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueReadBuffer)(
32653265 ptr,
32663266 eventWaitListString.c_str () );
32673267 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
3268+ GET_TIMING_TAG_BLOCKING ( blocking_read );
32683269 DEVICE_PERFORMANCE_TIMING_START ( event );
32693270 HOST_PERFORMANCE_TIMING_START ();
32703271
@@ -3297,11 +3298,11 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueReadBuffer)(
32973298 event );
32983299 }
32993300
3300- HOST_PERFORMANCE_TIMING_END_BLOCKING ( blocking_read );
3301+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
33013302 DEVICE_PERFORMANCE_TIMING_END ( command_queue, event );
33023303 CHECK_ERROR ( retVal );
33033304 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
3304- CALL_LOGGING_EXIT_BLOCKING_EVENT ( retVal, blocking_read , event );
3305+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
33053306 ADD_EVENT ( event ? event[0 ] : NULL );
33063307
33073308 if ( blocking_read )
@@ -3377,6 +3378,7 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueReadBufferRect)(
33773378 eventWaitListString.c_str () );
33783379 }
33793380 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
3381+ GET_TIMING_TAG_BLOCKING ( blocking_read );
33803382 DEVICE_PERFORMANCE_TIMING_START ( event );
33813383 HOST_PERFORMANCE_TIMING_START ();
33823384
@@ -3398,11 +3400,11 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueReadBufferRect)(
33983400 event_wait_list,
33993401 event );
34003402
3401- HOST_PERFORMANCE_TIMING_END_BLOCKING ( blocking_read );
3403+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
34023404 DEVICE_PERFORMANCE_TIMING_END ( command_queue, event );
34033405 CHECK_ERROR ( retVal );
34043406 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
3405- CALL_LOGGING_EXIT_BLOCKING_EVENT ( retVal, blocking_read , event );
3407+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
34063408 ADD_EVENT ( event ? event[0 ] : NULL );
34073409
34083410 if ( blocking_read )
@@ -3459,6 +3461,7 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueWriteBuffer)(
34593461 ptr,
34603462 eventWaitListString.c_str () );
34613463 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
3464+ GET_TIMING_TAG_BLOCKING ( blocking_write );
34623465 DEVICE_PERFORMANCE_TIMING_START ( event );
34633466 HOST_PERFORMANCE_TIMING_START ();
34643467
@@ -3491,11 +3494,11 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueWriteBuffer)(
34913494 event );
34923495 }
34933496
3494- HOST_PERFORMANCE_TIMING_END_BLOCKING ( blocking_write );
3497+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
34953498 DEVICE_PERFORMANCE_TIMING_END ( command_queue, event );
34963499 CHECK_ERROR ( retVal );
34973500 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
3498- CALL_LOGGING_EXIT_BLOCKING_EVENT ( retVal, blocking_write , event );
3501+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
34993502 ADD_EVENT ( event ? event[0 ] : NULL );
35003503
35013504 if ( blocking_write )
@@ -3571,6 +3574,7 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueWriteBufferRect)(
35713574 eventWaitListString.c_str () );
35723575 }
35733576 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
3577+ GET_TIMING_TAG_BLOCKING ( blocking_write );
35743578 DEVICE_PERFORMANCE_TIMING_START ( event );
35753579 HOST_PERFORMANCE_TIMING_START ();
35763580
@@ -3592,11 +3596,11 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueWriteBufferRect)(
35923596 event_wait_list,
35933597 event );
35943598
3595- HOST_PERFORMANCE_TIMING_END_BLOCKING ( blocking_write );
3599+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
35963600 DEVICE_PERFORMANCE_TIMING_END ( command_queue, event );
35973601 CHECK_ERROR ( retVal );
35983602 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
3599- CALL_LOGGING_EXIT_BLOCKING_EVENT ( retVal, blocking_write , event );
3603+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
36003604 ADD_EVENT ( event ? event[0 ] : NULL );
36013605
36023606 if ( blocking_write )
@@ -3913,6 +3917,7 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueReadImage)(
39133917 eventWaitListString.c_str () );
39143918 }
39153919 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
3920+ GET_TIMING_TAG_BLOCKING ( blocking_read );
39163921 DEVICE_PERFORMANCE_TIMING_START ( event );
39173922 HOST_PERFORMANCE_TIMING_START ();
39183923
@@ -3949,11 +3954,11 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueReadImage)(
39493954 event );
39503955 }
39513956
3952- HOST_PERFORMANCE_TIMING_END_BLOCKING ( blocking_read );
3957+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
39533958 DEVICE_PERFORMANCE_TIMING_END ( command_queue, event );
39543959 CHECK_ERROR ( retVal );
39553960 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
3956- CALL_LOGGING_EXIT_BLOCKING_EVENT ( retVal, blocking_read , event );
3961+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
39573962 ADD_EVENT ( event ? event[0 ] : NULL );
39583963
39593964 if ( blocking_read )
@@ -4010,6 +4015,7 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueWriteImage)(
40104015 ptr,
40114016 eventWaitListString.c_str () );
40124017 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
4018+ GET_TIMING_TAG_BLOCKING ( blocking_write );
40134019 DEVICE_PERFORMANCE_TIMING_START ( event );
40144020 HOST_PERFORMANCE_TIMING_START ();
40154021
@@ -4046,11 +4052,11 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueWriteImage)(
40464052 event );
40474053 }
40484054
4049- HOST_PERFORMANCE_TIMING_END_BLOCKING ( blocking_write );
4055+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
40504056 DEVICE_PERFORMANCE_TIMING_END ( command_queue, event );
40514057 CHECK_ERROR ( retVal );
40524058 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
4053- CALL_LOGGING_EXIT_BLOCKING_EVENT ( retVal, blocking_write , event );
4059+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
40544060 ADD_EVENT ( event ? event[0 ] : NULL );
40554061
40564062 if ( blocking_write )
@@ -4399,8 +4405,9 @@ CL_API_ENTRY void* CL_API_CALL CLIRN(clEnqueueMapBuffer)(
43994405 cb,
44004406 eventWaitListString.c_str () );
44014407 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
4402- DEVICE_PERFORMANCE_TIMING_START ( event );
44034408 CHECK_ERROR_INIT ( errcode_ret );
4409+ GET_TIMING_TAGS_MAP ( blocking_map, map_flags );
4410+ DEVICE_PERFORMANCE_TIMING_START ( event );
44044411 HOST_PERFORMANCE_TIMING_START ();
44054412
44064413 ITT_ADD_PARAM_AS_METADATA ( blocking_map );
@@ -4417,8 +4424,8 @@ CL_API_ENTRY void* CL_API_CALL CLIRN(clEnqueueMapBuffer)(
44174424 event,
44184425 errcode_ret );
44194426
4420- HOST_PERFORMANCE_TIMING_END_BLOCKING ( blocking_map );
4421- DEVICE_PERFORMANCE_TIMING_END ( command_queue, event );
4427+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
4428+ DEVICE_PERFORMANCE_TIMING_END_WITH_TAG ( command_queue, event );
44224429 DUMP_BUFFER_AFTER_MAP ( command_queue, buffer, blocking_map, map_flags, retVal, offset, cb );
44234430 CHECK_ERROR ( errcode_ret[0 ] );
44244431 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
@@ -4432,7 +4439,7 @@ CL_API_ENTRY void* CL_API_CALL CLIRN(clEnqueueMapBuffer)(
44324439 &map_count,
44334440 NULL );
44344441 }
4435- CALL_LOGGING_EXIT_BLOCKING_EVENT ( errcode_ret[0 ], blocking_map , event,
4442+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( errcode_ret[0 ], event,
44364443 " [ map count = %d ] returned %p" ,
44374444 map_count,
44384445 retVal );
@@ -4524,8 +4531,9 @@ CL_API_ENTRY void* CL_API_CALL CLIRN(clEnqueueMapImage)(
45244531 eventWaitListString.c_str () );
45254532 }
45264533 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
4527- DEVICE_PERFORMANCE_TIMING_START ( event );
45284534 CHECK_ERROR_INIT ( errcode_ret );
4535+ GET_TIMING_TAGS_MAP ( blocking_map, map_flags );
4536+ DEVICE_PERFORMANCE_TIMING_START ( event );
45294537 HOST_PERFORMANCE_TIMING_START ();
45304538
45314539 ITT_ADD_PARAM_AS_METADATA ( blocking_map );
@@ -4544,8 +4552,8 @@ CL_API_ENTRY void* CL_API_CALL CLIRN(clEnqueueMapImage)(
45444552 event,
45454553 errcode_ret );
45464554
4547- HOST_PERFORMANCE_TIMING_END_BLOCKING ( blocking_map );
4548- DEVICE_PERFORMANCE_TIMING_END ( command_queue, event );
4555+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
4556+ DEVICE_PERFORMANCE_TIMING_END_WITH_TAG ( command_queue, event );
45494557 CHECK_ERROR ( errcode_ret[0 ] );
45504558 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
45514559 if ( pIntercept->config ().CallLogging )
@@ -4558,7 +4566,7 @@ CL_API_ENTRY void* CL_API_CALL CLIRN(clEnqueueMapImage)(
45584566 &map_count,
45594567 NULL );
45604568 }
4561- CALL_LOGGING_EXIT_BLOCKING_EVENT ( errcode_ret[0 ], blocking_map , event,
4569+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( errcode_ret[0 ], event,
45624570 " [ map count = %d ] returned %p" ,
45634571 map_count,
45644572 retVal );
@@ -4788,6 +4796,13 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueNDRangeKernel)(
47884796 argsString.c_str () );
47894797
47904798 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
4799+ GET_TIMING_TAGS_KERNEL (
4800+ command_queue,
4801+ kernel,
4802+ work_dim,
4803+ global_work_offset,
4804+ global_work_size,
4805+ local_work_size );
47914806 DEVICE_PERFORMANCE_TIMING_START ( event );
47924807 HOST_PERFORMANCE_TIMING_START ();
47934808
@@ -4838,18 +4853,11 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueNDRangeKernel)(
48384853 event );
48394854 }
48404855
4841- HOST_PERFORMANCE_TIMING_END_KERNEL (kernel);
4842- DEVICE_PERFORMANCE_TIMING_END_KERNEL (
4843- command_queue,
4844- event,
4845- kernel,
4846- work_dim,
4847- global_work_offset,
4848- global_work_size,
4849- local_work_size );
4856+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ();
4857+ DEVICE_PERFORMANCE_TIMING_END_WITH_TAG ( command_queue, event );
48504858 CHECK_ERROR ( retVal );
48514859 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
4852- CALL_LOGGING_EXIT_KERNEL_EVENT ( retVal, kernel , event );
4860+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
48534861 ADD_EVENT ( event ? event[0 ] : NULL );
48544862 }
48554863
@@ -4896,6 +4904,7 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueTask)(
48964904 kernel,
48974905 eventWaitListString.c_str ());
48984906 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
4907+ GET_TIMING_TAGS_KERNEL ( command_queue, kernel, 0 , NULL , NULL , NULL );
48994908 DEVICE_PERFORMANCE_TIMING_START ( event );
49004909 HOST_PERFORMANCE_TIMING_START ();
49014910
@@ -4906,18 +4915,11 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueTask)(
49064915 event_wait_list,
49074916 event );
49084917
4909- HOST_PERFORMANCE_TIMING_END_KERNEL (kernel);
4910- DEVICE_PERFORMANCE_TIMING_END_KERNEL (
4911- command_queue,
4912- event,
4913- kernel,
4914- 0 ,
4915- NULL ,
4916- NULL ,
4917- NULL );
4918+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ();
4919+ DEVICE_PERFORMANCE_TIMING_END_WITH_TAG ( command_queue, event );
49184920 CHECK_ERROR ( retVal );
49194921 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
4920- CALL_LOGGING_EXIT_KERNEL_EVENT ( retVal, kernel , event );
4922+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
49214923 ADD_EVENT ( event ? event[0 ] : NULL );
49224924 }
49234925
@@ -6361,6 +6363,7 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueSVMMemcpy) (
63616363 size,
63626364 eventWaitListString.c_str () );
63636365 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
6366+ GET_TIMING_TAG_BLOCKING ( blocking_copy );
63646367 DEVICE_PERFORMANCE_TIMING_START ( event );
63656368 HOST_PERFORMANCE_TIMING_START ();
63666369
@@ -6374,11 +6377,11 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueSVMMemcpy) (
63746377 event_wait_list,
63756378 event );
63766379
6377- HOST_PERFORMANCE_TIMING_END_BLOCKING ( blocking_copy );
6380+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
63786381 DEVICE_PERFORMANCE_TIMING_END ( command_queue, event );
63796382 CHECK_ERROR ( retVal );
63806383 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
6381- CALL_LOGGING_EXIT_BLOCKING_EVENT ( retVal, blocking_copy , event );
6384+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
63826385 ADD_EVENT ( event ? event[0 ] : NULL );
63836386
63846387 if ( blocking_copy )
@@ -6500,6 +6503,7 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueSVMMap) (
65006503 size,
65016504 eventWaitListString.c_str () );
65026505 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
6506+ GET_TIMING_TAGS_MAP ( blocking_map, map_flags );
65036507 DEVICE_PERFORMANCE_TIMING_START ( event );
65046508 HOST_PERFORMANCE_TIMING_START ();
65056509
@@ -6513,11 +6517,11 @@ CL_API_ENTRY cl_int CL_API_CALL CLIRN(clEnqueueSVMMap) (
65136517 event_wait_list,
65146518 event );
65156519
6516- HOST_PERFORMANCE_TIMING_END_BLOCKING ( blocking_map );
6517- DEVICE_PERFORMANCE_TIMING_END ( command_queue, event );
6520+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
6521+ DEVICE_PERFORMANCE_TIMING_END_WITH_TAG ( command_queue, event );
65186522 CHECK_ERROR ( retVal );
65196523 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
6520- CALL_LOGGING_EXIT_BLOCKING_EVENT ( retVal, blocking_map , event );
6524+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
65216525 ADD_EVENT ( event ? event[0 ] : NULL );
65226526
65236527 if ( blocking_map )
@@ -9857,6 +9861,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueMemsetINTEL( // Deprecated
98579861 size,
98589862 eventWaitListString.c_str () );
98599863 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
9864+ GET_TIMING_TAGS_MEMFILL ( queue, dst_ptr );
98609865 DEVICE_PERFORMANCE_TIMING_START ( event );
98619866 HOST_PERFORMANCE_TIMING_START ();
98629867
@@ -9869,11 +9874,11 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueMemsetINTEL( // Deprecated
98699874 event_wait_list,
98709875 event );
98719876
9872- HOST_PERFORMANCE_TIMING_END_MEMFILL ( queue, dst_ptr );
9873- DEVICE_PERFORMANCE_TIMING_END_MEMFILL ( queue, event, dst_ptr );
9877+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
9878+ DEVICE_PERFORMANCE_TIMING_END_WITH_TAG ( queue, event );
98749879 CHECK_ERROR ( retVal );
98759880 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
9876- CALL_LOGGING_EXIT_MEMFILL_EVENT ( retVal, queue, dst_ptr , event );
9881+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
98779882 ADD_EVENT ( event ? event[0 ] : NULL );
98789883 }
98799884
@@ -9926,6 +9931,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueMemFillINTEL(
99269931 size,
99279932 eventWaitListString.c_str () );
99289933 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
9934+ GET_TIMING_TAGS_MEMFILL ( queue, dst_ptr );
99299935 DEVICE_PERFORMANCE_TIMING_START ( event );
99309936 HOST_PERFORMANCE_TIMING_START ();
99319937
@@ -9939,11 +9945,11 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueMemFillINTEL(
99399945 event_wait_list,
99409946 event );
99419947
9942- HOST_PERFORMANCE_TIMING_END_MEMFILL ( queue, dst_ptr );
9943- DEVICE_PERFORMANCE_TIMING_END_MEMFILL ( queue, event, dst_ptr );
9948+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
9949+ DEVICE_PERFORMANCE_TIMING_END_WITH_TAG ( queue, event );
99449950 CHECK_ERROR ( retVal );
99459951 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
9946- CALL_LOGGING_EXIT_MEMFILL_EVENT ( retVal, queue, dst_ptr , event );
9952+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
99479953 ADD_EVENT ( event ? event[0 ] : NULL );
99489954 }
99499955
@@ -9997,6 +10003,7 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueMemcpyINTEL(
999710003 size,
999810004 eventWaitListString.c_str () );
999910005 CHECK_EVENT_LIST ( num_events_in_wait_list, event_wait_list, event );
10006+ GET_TIMING_TAGS_MEMCPY ( queue, blocking, dst_ptr, src_ptr );
1000010007 DEVICE_PERFORMANCE_TIMING_START ( event );
1000110008 HOST_PERFORMANCE_TIMING_START ();
1000210009
@@ -10010,11 +10017,11 @@ CL_API_ENTRY cl_int CL_API_CALL clEnqueueMemcpyINTEL(
1001010017 event_wait_list,
1001110018 event );
1001210019
10013- HOST_PERFORMANCE_TIMING_END_MEMCPY ( queue, blocking, dst_ptr, src_ptr );
10014- DEVICE_PERFORMANCE_TIMING_END_MEMCPY ( queue, event, dst_ptr, src_ptr );
10020+ HOST_PERFORMANCE_TIMING_END_WITH_TAG ( );
10021+ DEVICE_PERFORMANCE_TIMING_END_WITH_TAG ( queue, event );
1001510022 CHECK_ERROR ( retVal );
1001610023 ADD_OBJECT_ALLOCATION ( event ? event[0 ] : NULL );
10017- CALL_LOGGING_EXIT_MEMCPY_EVENT ( retVal, queue, blocking, dst_ptr, src_ptr , event );
10024+ CALL_LOGGING_EXIT_EVENT_WITH_TAG ( retVal, event );
1001810025 ADD_EVENT ( event ? event[0 ] : NULL );
1001910026
1002010027 if ( blocking )
0 commit comments