Skip to content

Commit

Permalink
[OMPT] Rename ompt_frame_t to omp_frame_t
Browse files Browse the repository at this point in the history
Rename ompt_frame_t to omp_frame_t, as defined in the spec.

Differential Revision: https://reviews.llvm.org/D43568

llvm-svn: 333367
  • Loading branch information
jprotze committed May 28, 2018
1 parent 9b9c701 commit c583606
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 36 deletions.
12 changes: 6 additions & 6 deletions openmp/runtime/src/include/50/ompt.h.var
Expand Up @@ -179,13 +179,13 @@ static const ompt_wait_id_t ompt_wait_id_none = 0;
typedef void ompt_device_t;

/*---------------------
* ompt_frame_t
* omp_frame_t
*---------------------*/

typedef struct ompt_frame_t {
typedef struct omp_frame_t {
void *exit_frame; /* next frame is user code */
void *enter_frame; /* previous frame is user code */
} ompt_frame_t;
} omp_frame_t;


/*---------------------
Expand Down Expand Up @@ -308,7 +308,7 @@ typedef void (*ompt_callback_implicit_task_t) (

typedef void (*ompt_callback_parallel_begin_t) (
ompt_data_t *encountering_task_data, /* data of encountering task */
const ompt_frame_t *encountering_task_frame, /* frame data of encountering task */
const omp_frame_t *encountering_task_frame, /* frame data of encountering task */
ompt_data_t *parallel_data, /* data of parallel region */
unsigned int requested_team_size, /* requested number of threads in team */
ompt_invoker_t invoker, /* invoker of master task */
Expand Down Expand Up @@ -350,7 +350,7 @@ typedef void (*ompt_callback_task_schedule_t) (

typedef void (*ompt_callback_task_create_t) (
ompt_data_t *encountering_task_data, /* data of parent task */
const ompt_frame_t *encountering_task_frame, /* frame data for parent task */
const omp_frame_t *encountering_task_frame, /* frame data for parent task */
ompt_data_t *new_task_data, /* data of created task */
int type, /* type of created task */
int has_dependences, /* created task has dependences */
Expand Down Expand Up @@ -587,7 +587,7 @@ OMPT_API_FUNCTION(int, ompt_get_task_info, (
int ancestor_level,
int *type,
ompt_data_t **task_data,
ompt_frame_t **task_frame,
omp_frame_t **task_frame,
ompt_data_t **parallel_data,
int *thread_num
));
Expand Down
20 changes: 10 additions & 10 deletions openmp/runtime/src/kmp_csupport.cpp
Expand Up @@ -276,7 +276,7 @@ void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...) {
va_start(ap, microtask);

#if OMPT_SUPPORT
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
kmp_info_t *master_th = __kmp_threads[gtid];
kmp_team_t *parent_team = master_th->th.th_team;
Expand Down Expand Up @@ -677,7 +677,7 @@ void __kmpc_barrier(ident_t *loc, kmp_int32 global_tid) {
}

#if OMPT_SUPPORT
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
if (ompt_frame->enter_frame == NULL)
Expand Down Expand Up @@ -1563,7 +1563,7 @@ kmp_int32 __kmpc_barrier_master(ident_t *loc, kmp_int32 global_tid) {
__kmp_check_barrier(global_tid, ct_barrier, loc);

#if OMPT_SUPPORT
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
if (ompt_frame->enter_frame == NULL)
Expand Down Expand Up @@ -1625,7 +1625,7 @@ kmp_int32 __kmpc_barrier_master_nowait(ident_t *loc, kmp_int32 global_tid) {
}

#if OMPT_SUPPORT
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
if (ompt_frame->enter_frame == NULL)
Expand Down Expand Up @@ -1975,7 +1975,7 @@ void __kmpc_copyprivate(ident_t *loc, kmp_int32 gtid, size_t cpy_size,
*data_ptr = cpy_data;

#if OMPT_SUPPORT
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
if (ompt_frame->enter_frame == NULL)
Expand Down Expand Up @@ -3359,7 +3359,7 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
// JP: as long as there is a barrier in the implementation, OMPT should and
// will provide the barrier events
// so we set-up the necessary frame/return addresses.
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
if (ompt_frame->enter_frame == NULL)
Expand Down Expand Up @@ -3540,7 +3540,7 @@ kmp_int32 __kmpc_reduce(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
// this barrier should be visible to a customer and to the threading profile
// tool (it's a terminating barrier on constructs if NOWAIT not specified)
#if OMPT_SUPPORT
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
if (ompt_frame->enter_frame == NULL)
Expand Down Expand Up @@ -3626,7 +3626,7 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,

// TODO: implicit barrier: should be exposed
#if OMPT_SUPPORT
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
if (ompt_frame->enter_frame == NULL)
Expand All @@ -3650,7 +3650,7 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,

// TODO: implicit barrier: should be exposed
#if OMPT_SUPPORT
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
if (ompt_frame->enter_frame == NULL)
Expand All @@ -3671,7 +3671,7 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,
} else if (packed_reduction_method == atomic_reduce_block) {

#if OMPT_SUPPORT
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
if (ompt_frame->enter_frame == NULL)
Expand Down
20 changes: 10 additions & 10 deletions openmp/runtime/src/kmp_gsupport.cpp
Expand Up @@ -32,7 +32,7 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_BARRIER)(void) {
MKLOC(loc, "GOMP_barrier");
KA_TRACE(20, ("GOMP_barrier: T#%d\n", gtid));
#if OMPT_SUPPORT && OMPT_OPTIONAL
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1);
Expand Down Expand Up @@ -178,7 +178,7 @@ void *KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SINGLE_COPY_START)(void) {
// and for all other threads to reach this point.

#if OMPT_SUPPORT && OMPT_OPTIONAL
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1);
Expand Down Expand Up @@ -214,7 +214,7 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SINGLE_COPY_END)(void *data) {
// propagated to all threads before trying to reuse the t_copypriv_data field.
__kmp_team_from_gtid(gtid)->t.t_copypriv_data = data;
#if OMPT_SUPPORT && OMPT_OPTIONAL
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1);
Expand Down Expand Up @@ -284,7 +284,7 @@ static
void *data) {
#if OMPT_SUPPORT
kmp_info_t *thr;
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
omp_state_t enclosing_state;

if (ompt_enabled.enabled) {
Expand Down Expand Up @@ -331,7 +331,7 @@ static

#if OMPT_SUPPORT
kmp_info_t *thr;
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
omp_state_t enclosing_state;

if (ompt_enabled.enabled) {
Expand Down Expand Up @@ -422,7 +422,7 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_START)(void (*task)(void *),
int gtid = __kmp_entry_gtid();

#if OMPT_SUPPORT
ompt_frame_t *parent_frame, *frame;
omp_frame_t *parent_frame, *frame;

if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &parent_frame, NULL, NULL);
Expand Down Expand Up @@ -639,7 +639,7 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_END)(void) {
KA_TRACE(20, ("GOMP_loop_end: T#%d\n", gtid))

#if OMPT_SUPPORT && OMPT_OPTIONAL
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1);
Expand Down Expand Up @@ -834,7 +834,7 @@ LOOP_NEXT_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT),
#if OMPT_SUPPORT && OMPT_OPTIONAL

#define OMPT_LOOP_PRE() \
ompt_frame_t *parent_frame; \
omp_frame_t *parent_frame; \
if (ompt_enabled.enabled) { \
__ompt_get_task_info_internal(0, NULL, NULL, &parent_frame, NULL, NULL); \
parent_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); \
Expand Down Expand Up @@ -1062,7 +1062,7 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START)(
int gtid = __kmp_entry_gtid();

#if OMPT_SUPPORT
ompt_frame_t *parent_frame;
omp_frame_t *parent_frame;

if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &parent_frame, NULL, NULL);
Expand Down Expand Up @@ -1102,7 +1102,7 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SECTIONS_END)(void) {
KA_TRACE(20, ("GOMP_sections_end: T#%d\n", gtid))

#if OMPT_SUPPORT
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
if (ompt_enabled.enabled) {
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1);
Expand Down
2 changes: 1 addition & 1 deletion openmp/runtime/src/kmp_runtime.cpp
Expand Up @@ -1462,7 +1462,7 @@ int __kmp_fork_call(ident_t *loc, int gtid,
ompt_data_t ompt_parallel_data;
ompt_parallel_data.ptr = NULL;
ompt_data_t *parent_task_data;
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
ompt_data_t *implicit_task_data;
void *return_address = NULL;

Expand Down
2 changes: 1 addition & 1 deletion openmp/runtime/src/kmp_tasking.cpp
Expand Up @@ -845,7 +845,7 @@ static void __kmpc_omp_task_complete_if0_template(ident_t *loc_ref,
#if OMPT_SUPPORT
if (ompt) {
__ompt_task_finish(task, NULL);
ompt_frame_t *ompt_frame;
omp_frame_t *ompt_frame;
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
ompt_frame->enter_frame = NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion openmp/runtime/src/ompt-general.cpp
Expand Up @@ -502,7 +502,7 @@ OMPT_API_ROUTINE ompt_data_t *ompt_get_thread_data(void) {

OMPT_API_ROUTINE int ompt_get_task_info(int ancestor_level, int *type,
ompt_data_t **task_data,
ompt_frame_t **task_frame,
omp_frame_t **task_frame,
ompt_data_t **parallel_data,
int *thread_num) {
return __ompt_get_task_info_internal(ancestor_level, type, task_data,
Expand Down
2 changes: 1 addition & 1 deletion openmp/runtime/src/ompt-internal.h
Expand Up @@ -53,7 +53,7 @@ typedef struct ompt_callbacks_active_s {
(info->td_flags.merged_if0 ? ompt_task_mergeable : 0x0)

typedef struct {
ompt_frame_t frame;
omp_frame_t frame;
ompt_data_t task_data;
struct kmp_taskdata *scheduling_parent;
int thread_num;
Expand Down
2 changes: 1 addition & 1 deletion openmp/runtime/src/ompt-specific.cpp
Expand Up @@ -328,7 +328,7 @@ void __ompt_lw_taskteam_unlink(kmp_info_t *thr) {

int __ompt_get_task_info_internal(int ancestor_level, int *type,
ompt_data_t **task_data,
ompt_frame_t **task_frame,
omp_frame_t **task_frame,
ompt_data_t **parallel_data,
int *thread_num) {
if (__kmp_get_gtid() < 0)
Expand Down
2 changes: 1 addition & 1 deletion openmp/runtime/src/ompt-specific.h
Expand Up @@ -47,7 +47,7 @@ int __ompt_get_parallel_info_internal(int ancestor_level,

int __ompt_get_task_info_internal(int ancestor_level, int *type,
ompt_data_t **task_data,
ompt_frame_t **task_frame,
omp_frame_t **task_frame,
ompt_data_t **parallel_data, int *thread_num);

ompt_data_t *__ompt_get_thread_data_internal();
Expand Down
8 changes: 4 additions & 4 deletions openmp/runtime/test/ompt/callback.h
Expand Up @@ -74,7 +74,7 @@ static ompt_enumerate_mutex_impls_t ompt_enumerate_mutex_impls;
static void print_ids(int level)
{
int task_type, thread_num;
ompt_frame_t *frame;
omp_frame_t *frame;
ompt_data_t *task_parallel_data;
ompt_data_t *task_data;
int exists_task = ompt_get_task_info(level, &task_type, &task_data, &frame,
Expand Down Expand Up @@ -571,7 +571,7 @@ on_ompt_callback_master(
static void
on_ompt_callback_parallel_begin(
ompt_data_t *encountering_task_data,
const ompt_frame_t *encountering_task_frame,
const omp_frame_t *encountering_task_frame,
ompt_data_t* parallel_data,
uint32_t requested_team_size,
ompt_invoker_t invoker,
Expand All @@ -596,7 +596,7 @@ on_ompt_callback_parallel_end(
static void
on_ompt_callback_task_create(
ompt_data_t *encountering_task_data,
const ompt_frame_t *encountering_task_frame,
const omp_frame_t *encountering_task_frame,
ompt_data_t* new_task_data,
int type,
int has_dependences,
Expand Down Expand Up @@ -678,7 +678,7 @@ on_ompt_callback_control_tool(
void *arg,
const void *codeptr_ra)
{
ompt_frame_t* omptTaskFrame;
omp_frame_t* omptTaskFrame;
ompt_get_task_info(0, NULL, (ompt_data_t**) NULL, &omptTaskFrame, NULL, NULL);
printf("%" PRIu64 ": ompt_event_control_tool: command=%" PRIu64 ", modifier=%" PRIu64 ", arg=%p, codeptr_ra=%p, current_task_frame.exit=%p, current_task_frame.reenter=%p \n", ompt_get_thread_data()->value, command, modifier, arg, codeptr_ra, omptTaskFrame->exit_frame, omptTaskFrame->enter_frame);
return 0; //success
Expand Down

0 comments on commit c583606

Please sign in to comment.