Some applications require the capability to trace events with user-defined timestamps and frequencies different from the timestamps and frequencies generated by a CPU, for example, to instrument events that occur on a GPU. For the purpose you can create a clock domain.
To create a clock domain, use the following primitive:
__itt_clock_domain * ITTAPI __itt_clock_domain_create(__itt_get_clock_info_fn fn, void* fn_data)
Parameters of the primitive:
Pointer to a callback function that retrieves alternative CPU timestamps and frequencies and stores the timestamps and frequencies data in the clock domain structure field __itt_clock_info
Argument of a callback function; can be NULL
Tasks issued from different clock domains are shown on the same timeline by synchronizing a referenced clock domain base timestamp captured at the moment of clock domain creation and a CPU timestamp captured at the same time.
To recalculate clock domain base timestamps and frequencies, if necessary, for example, when a GPU frequency changes, use the following primitive: