Skip to content

Commit

Permalink
Remove fork_context argument from __kmp_join_call() when OMPT is off
Browse files Browse the repository at this point in the history
Conditionally include the fork_context parameter to __kmp_join_call()
only if OMPT_SUPPORT=1

Differential Revision: http://reviews.llvm.org/D12495

llvm-svn: 246460
  • Loading branch information
jpeyton52 committed Aug 31, 2015
1 parent 984fefd commit f89fbbb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
5 changes: 4 additions & 1 deletion openmp/runtime/src/kmp.h
Expand Up @@ -3102,7 +3102,10 @@ extern int __kmp_fork_call( ident_t *loc, int gtid, enum fork_context_e fork_con
#endif
);

extern void __kmp_join_call( ident_t *loc, int gtid, enum fork_context_e fork_context
extern void __kmp_join_call( ident_t *loc, int gtid
#if OMPT_SUPPORT
, enum fork_context_e fork_context
#endif
#if OMP_40_ENABLED
, int exit_teams = 0
#endif
Expand Down
12 changes: 10 additions & 2 deletions openmp/runtime/src/kmp_csupport.c
Expand Up @@ -330,7 +330,11 @@ __kmpc_fork_call(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...)
#if INCLUDE_SSC_MARKS
SSC_MARK_JOINING();
#endif
__kmp_join_call( loc, gtid, fork_context_intel );
__kmp_join_call( loc, gtid
#if OMPT_SUPPORT
, fork_context_intel
#endif
);

va_end( ap );

Expand Down Expand Up @@ -421,7 +425,11 @@ __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...)
ap
#endif
);
__kmp_join_call( loc, gtid, fork_context_intel );
__kmp_join_call( loc, gtid
#if OMPT_SUPPORT
, fork_context_intel
#endif
);

#if OMPT_SUPPORT
if (ompt_status & ompt_status_track) {
Expand Down
7 changes: 5 additions & 2 deletions openmp/runtime/src/kmp_gsupport.c
Expand Up @@ -535,8 +535,11 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_END)(void)
}
#endif

__kmp_join_call(&loc, gtid, fork_context_gnu);

__kmp_join_call(&loc, gtid
#if OMPT_SUPPORT
, fork_context_gnu
#endif
);
#if OMPT_SUPPORT
if (ompt_status & ompt_status_track) {
ompt_frame->reenter_runtime_frame = NULL;
Expand Down
11 changes: 9 additions & 2 deletions openmp/runtime/src/kmp_runtime.c
Expand Up @@ -2282,7 +2282,10 @@ __kmp_join_ompt(
#endif

void
__kmp_join_call(ident_t *loc, int gtid, enum fork_context_e fork_context
__kmp_join_call(ident_t *loc, int gtid
#if OMPT_SUPPORT
, enum fork_context_e fork_context
#endif
#if OMP_40_ENABLED
, int exit_teams
#endif /* OMP_40_ENABLED */
Expand Down Expand Up @@ -6984,7 +6987,11 @@ __kmp_teams_master( int gtid )

// AC: last parameter "1" eliminates join barrier which won't work because
// worker threads are in a fork barrier waiting for more parallel regions
__kmp_join_call( loc, gtid, fork_context_intel, 1 );
__kmp_join_call( loc, gtid
#if OMPT_SUPPORT
, fork_context_intel
#endif
, 1 );
}

int
Expand Down

0 comments on commit f89fbbb

Please sign in to comment.