Changeset View
Changeset View
Standalone View
Standalone View
openmp/trunk/runtime/src/kmp_runtime.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 341 Lines • ▼ Show 20 Lines | if(gtid >= 0) { | ||||
node = __kmp_get_host_node(p1); | node = __kmp_get_host_node(p1); | ||||
if(node < 0) /* doesn't work, so don't try this next time */ | if(node < 0) /* doesn't work, so don't try this next time */ | ||||
__kmp_storage_map_verbose = FALSE; | __kmp_storage_map_verbose = FALSE; | ||||
else { | else { | ||||
char *last; | char *last; | ||||
int lastNode; | int lastNode; | ||||
int localProc = __kmp_get_cpu_from_gtid(gtid); | int localProc = __kmp_get_cpu_from_gtid(gtid); | ||||
p1 = (void *)( (size_t)p1 & ~((size_t)PAGE_SIZE - 1) ); | const int page_size = KMP_GET_PAGE_SIZE(); | ||||
p2 = (void *)( ((size_t) p2 - 1) & ~((size_t)PAGE_SIZE - 1) ); | |||||
p1 = (void *)( (size_t)p1 & ~((size_t)page_size - 1) ); | |||||
p2 = (void *)( ((size_t) p2 - 1) & ~((size_t)page_size - 1) ); | |||||
if(localProc >= 0) | if(localProc >= 0) | ||||
__kmp_printf_no_lock(" GTID %d localNode %d\n", gtid, localProc>>1); | __kmp_printf_no_lock(" GTID %d localNode %d\n", gtid, localProc>>1); | ||||
else | else | ||||
__kmp_printf_no_lock(" GTID %d\n", gtid); | __kmp_printf_no_lock(" GTID %d\n", gtid); | ||||
# if KMP_USE_PRCTL | # if KMP_USE_PRCTL | ||||
/* The more elaborate format is disabled for now because of the prctl hanging bug. */ | /* The more elaborate format is disabled for now because of the prctl hanging bug. */ | ||||
do { | do { | ||||
last = p1; | last = p1; | ||||
lastNode = node; | lastNode = node; | ||||
/* This loop collates adjacent pages with the same host node. */ | /* This loop collates adjacent pages with the same host node. */ | ||||
do { | do { | ||||
(char*)p1 += PAGE_SIZE; | (char*)p1 += page_size; | ||||
} while(p1 <= p2 && (node = __kmp_get_host_node(p1)) == lastNode); | } while(p1 <= p2 && (node = __kmp_get_host_node(p1)) == lastNode); | ||||
__kmp_printf_no_lock(" %p-%p memNode %d\n", last, | __kmp_printf_no_lock(" %p-%p memNode %d\n", last, | ||||
(char*)p1 - 1, lastNode); | (char*)p1 - 1, lastNode); | ||||
} while(p1 <= p2); | } while(p1 <= p2); | ||||
# else | # else | ||||
__kmp_printf_no_lock(" %p-%p memNode %d\n", p1, | __kmp_printf_no_lock(" %p-%p memNode %d\n", p1, | ||||
(char*)p1 + (PAGE_SIZE - 1), __kmp_get_host_node(p1)); | (char*)p1 + (page_size - 1), __kmp_get_host_node(p1)); | ||||
if(p1 < p2) { | if(p1 < p2) { | ||||
__kmp_printf_no_lock(" %p-%p memNode %d\n", p2, | __kmp_printf_no_lock(" %p-%p memNode %d\n", p2, | ||||
(char*)p2 + (PAGE_SIZE - 1), __kmp_get_host_node(p2)); | (char*)p2 + (page_size - 1), __kmp_get_host_node(p2)); | ||||
} | } | ||||
# endif | # endif | ||||
} | } | ||||
} | } | ||||
} else | } else | ||||
__kmp_printf_no_lock(" %s\n", KMP_I18N_STR( StorageMapWarning ) ); | __kmp_printf_no_lock(" %s\n", KMP_I18N_STR( StorageMapWarning ) ); | ||||
} | } | ||||
#endif /* KMP_PRINT_DATA_PLACEMENT */ | #endif /* KMP_PRINT_DATA_PLACEMENT */ | ||||
▲ Show 20 Lines • Show All 7,291 Lines • Show Last 20 Lines |