Skip to content

Commit f89fbbb

Browse files
committedAug 31, 2015
Remove fork_context argument from __kmp_join_call() when OMPT is off
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
1 parent 984fefd commit f89fbbb

File tree

4 files changed

+28
-7
lines changed

4 files changed

+28
-7
lines changed
 

‎openmp/runtime/src/kmp.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -3102,7 +3102,10 @@ extern int __kmp_fork_call( ident_t *loc, int gtid, enum fork_context_e fork_con
31023102
#endif
31033103
);
31043104

3105-
extern void __kmp_join_call( ident_t *loc, int gtid, enum fork_context_e fork_context
3105+
extern void __kmp_join_call( ident_t *loc, int gtid
3106+
#if OMPT_SUPPORT
3107+
, enum fork_context_e fork_context
3108+
#endif
31063109
#if OMP_40_ENABLED
31073110
, int exit_teams = 0
31083111
#endif

‎openmp/runtime/src/kmp_csupport.c

+10-2
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,11 @@ __kmpc_fork_call(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...)
330330
#if INCLUDE_SSC_MARKS
331331
SSC_MARK_JOINING();
332332
#endif
333-
__kmp_join_call( loc, gtid, fork_context_intel );
333+
__kmp_join_call( loc, gtid
334+
#if OMPT_SUPPORT
335+
, fork_context_intel
336+
#endif
337+
);
334338

335339
va_end( ap );
336340

@@ -421,7 +425,11 @@ __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...)
421425
ap
422426
#endif
423427
);
424-
__kmp_join_call( loc, gtid, fork_context_intel );
428+
__kmp_join_call( loc, gtid
429+
#if OMPT_SUPPORT
430+
, fork_context_intel
431+
#endif
432+
);
425433

426434
#if OMPT_SUPPORT
427435
if (ompt_status & ompt_status_track) {

‎openmp/runtime/src/kmp_gsupport.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,11 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_END)(void)
535535
}
536536
#endif
537537

538-
__kmp_join_call(&loc, gtid, fork_context_gnu);
539-
538+
__kmp_join_call(&loc, gtid
539+
#if OMPT_SUPPORT
540+
, fork_context_gnu
541+
#endif
542+
);
540543
#if OMPT_SUPPORT
541544
if (ompt_status & ompt_status_track) {
542545
ompt_frame->reenter_runtime_frame = NULL;

‎openmp/runtime/src/kmp_runtime.c

+9-2
Original file line numberDiff line numberDiff line change
@@ -2282,7 +2282,10 @@ __kmp_join_ompt(
22822282
#endif
22832283

22842284
void
2285-
__kmp_join_call(ident_t *loc, int gtid, enum fork_context_e fork_context
2285+
__kmp_join_call(ident_t *loc, int gtid
2286+
#if OMPT_SUPPORT
2287+
, enum fork_context_e fork_context
2288+
#endif
22862289
#if OMP_40_ENABLED
22872290
, int exit_teams
22882291
#endif /* OMP_40_ENABLED */
@@ -6984,7 +6987,11 @@ __kmp_teams_master( int gtid )
69846987

69856988
// AC: last parameter "1" eliminates join barrier which won't work because
69866989
// worker threads are in a fork barrier waiting for more parallel regions
6987-
__kmp_join_call( loc, gtid, fork_context_intel, 1 );
6990+
__kmp_join_call( loc, gtid
6991+
#if OMPT_SUPPORT
6992+
, fork_context_intel
6993+
#endif
6994+
, 1 );
69886995
}
69896996

69906997
int

0 commit comments

Comments
 (0)
Please sign in to comment.