HOME
| OPENMP API Specification: Version 5.0 November 2018

4.4.3  Tracing

OpenMP provides type definitions that support tracing with OMPT.

4.4.3.1 Record Type

SummaryThe ompt_record_t enumeration type indicates the integer codes used to identify OpenMP trace record formats.

Format

SVG-Viewer needed.

 

 
typedef enum ompt_record_t { 
  ompt_record_ompt               = 1, 
  ompt_record_native             = 2, 
  ompt_record_invalid            = 3 
} ompt_record_t;  

SVG-Viewer needed.

4.4.3.2 Native Record Kind

SummaryThe ompt_record_native_t enumeration type indicates the integer codes used to identify OpenMP native trace record contents.

Format

SVG-Viewer needed.

 

 
typedef enum ompt_record_native_t { 
  ompt_record_native_info  = 1, 
  ompt_record_native_event = 2 
} ompt_record_native_t;  

SVG-Viewer needed.

4.4.3.3 Native Record Abstract Type

SummaryThe ompt_record_abstract_t type provides an abstract trace record format that is used to summarize native device trace records.

Format

SVG-Viewer needed.

 

 
typedef struct ompt_record_abstract_t { 
  ompt_record_native_t rclass; 
  const char *type; 
  ompt_device_time_t start_time; 
  ompt_device_time_t end_time; 
  ompt_hwid_t hwid; 
} ompt_record_abstract_t;  

SVG-Viewer needed.

Description An ompt_record_abstract_t record contains information that a tool can use to process a native record that it may not fully understand. The rclass field indicates that the record is informational or that it represents an event; this information can help a tool determine how to present the record. The record type field points to a statically-allocated, immutable character string that provides a meaningful name that a tool can use to describe the event to a user. The start_time and end_time fields are used to place an event in time. The times are relative to the device clock. If an event does not have an associated start_time (end_time), the value of the start_time (end_time) field is ompt_time_none. The hardware identifier field, hwid, indicates the location on the device where the event occurred. A hwid may represent a hardware abstraction such as a core or a hardware thread identifier. The meaning of a hwid value for a device is implementation defined. If no hardware abstraction is associated with the record then the value of hwid is ompt_hwid_none.

4.4.3.4 Record Type

SummaryThe ompt_record_ompt_t type provides an standard complete trace record format.

Format

SVG-Viewer needed.

 

 
typedef struct ompt_record_ompt_t { 
  ompt_callbacks_t type; 
  ompt_device_time_t time; 
  ompt_id_t thread_id; 
  ompt_id_t target_id; 
  union { 
    ompt_record_thread_begin_t thread_begin; 
    ompt_record_parallel_begin_t parallel_begin; 
    ompt_record_parallel_end_t parallel_end; 
    ompt_record_work_t work; 
    ompt_record_dispatch_t dispatch; 
    ompt_record_task_create_t task_create; 
    ompt_record_dependences_t dependences; 
    ompt_record_task_dependence_t task_dependence; 
    ompt_record_task_schedule_t task_schedule; 
    ompt_record_implicit_task_t implicit_task; 
    ompt_record_master_t master; 
    ompt_record_sync_region_t sync_region; 
    ompt_record_mutex_acquire_t mutex_acquire; 
    ompt_record_mutex_t mutex; 
    ompt_record_nest_lock_t nest_lock; 
    ompt_record_flush_t flush; 
    ompt_record_cancel_t cancel; 
    ompt_record_target_t target; 
    ompt_record_target_data_op_t target_data_op; 
    ompt_record_target_map_t target_map; 
    ompt_record_target_kernel_t target_kernel; 
    ompt_record_control_tool_t control_tool; 
  } record; 
} ompt_record_ompt_t;  

SVG-Viewer needed.

DescriptionThe field type specifies the type of record provided by this structure. According to the type, event specific information is stored in the matching record entry.

RestrictionsThe ompt_record_ompt_t type has the following restriction: