#include "kmp.h"
#include "kmp_i18n.h"
#include "kmp_str.h"
#include "kmp_error.h"
Go to the source code of this file.
Defines | |
#define | get_src(ident) ( (ident) == NULL ? NULL : (ident)->psource ) |
#define | MIN_STACK 100 |
#define | POP_MSG(p) |
#define | PUSH_MSG(ct, ident) "\tpushing on stack: %s (%s)\n", cons_text_c[ (ct) ], get_src( (ident) ) |
Functions | |
struct cons_header * | __kmp_allocate_cons_stack (int gtid) |
void | __kmp_check_barrier (int gtid, enum cons_type ct, ident_t const *ident) |
static void | __kmp_check_null_func (void) |
void | __kmp_check_sync (int gtid, enum cons_type ct, ident_t const *ident, kmp_user_lock_p lck) |
void | __kmp_check_workshare (int gtid, enum cons_type ct, ident_t const *ident) |
void | __kmp_error_construct (kmp_i18n_id_t id, enum cons_type ct, ident_t const *ident) |
void | __kmp_error_construct2 (kmp_i18n_id_t id, enum cons_type ct, ident_t const *ident, struct cons_data const *cons) |
static void | __kmp_expand_cons_stack (int gtid, struct cons_header *p) |
void | __kmp_free_cons_stack (void *ptr) |
void | __kmp_pop_parallel (int gtid, ident_t const *ident) |
void | __kmp_pop_sync (int gtid, enum cons_type ct, ident_t const *ident) |
enum cons_type | __kmp_pop_workshare (int gtid, enum cons_type ct, ident_t const *ident) |
static char const * | __kmp_pragma (enum cons_type ct, ident_t const *ident) |
void | __kmp_push_parallel (int gtid, ident_t const *ident) |
void | __kmp_push_sync (int gtid, enum cons_type ct, ident_t const *ident, kmp_user_lock_p lck) |
void | __kmp_push_workshare (int gtid, enum cons_type ct, ident_t const *ident) |
static void | dump_cons_stack (int gtid, struct cons_header *p) |
Variables | |
static char const * | cons_text_c [] |
static int const | cons_text_c_num = sizeof( cons_text_c ) / sizeof( char const * ) |
static char const * | cons_text_fort [] |
static int const | cons_text_fort_num = sizeof( cons_text_fort ) / sizeof( char const * ) |
Definition at line 95 of file kmp_error.c.
Referenced by dump_cons_stack().
#define MIN_STACK 100 |
Definition at line 55 of file kmp_error.c.
Referenced by __kmp_allocate_cons_stack().
#define POP_MSG | ( | p | ) |
"\tpopping off stack: %s (%s)\n", \ cons_text_c[ (p)->stack_data[ tos ].type ], \ get_src( (p)->stack_data[ tos ].ident )
Definition at line 99 of file kmp_error.c.
Referenced by __kmp_pop_parallel(), __kmp_pop_sync(), and __kmp_pop_workshare().
#define PUSH_MSG | ( | ct, | |||
ident | ) | "\tpushing on stack: %s (%s)\n", cons_text_c[ (ct) ], get_src( (ident) ) |
Definition at line 97 of file kmp_error.c.
Referenced by __kmp_push_parallel(), __kmp_push_sync(), and __kmp_push_workshare().
struct cons_header* __kmp_allocate_cons_stack | ( | int | gtid | ) | [read] |
Definition at line 207 of file kmp_error.c.
References __kmp_allocate, __kmp_check_null_func(), ct_none, cons_data::ident, KE_TRACE, MIN_STACK, cons_header::p_top, cons_data::prev, cons_header::s_top, cons_header::stack_data, cons_header::stack_size, cons_header::stack_top, cons_data::type, and cons_header::w_top.
Referenced by __kmp_launch_thread(), and __kmp_register_root().
Definition at line 526 of file kmp_error.c.
References __kmp_check_null_func(), __kmp_error_construct2(), __kmp_get_gtid, __kmp_threads, KE_TRACE, cons_header::p_top, cons_header::s_top, cons_header::stack_data, and cons_header::w_top.
Referenced by __kmpc_barrier(), __kmpc_barrier_master(), and __kmpc_barrier_master_nowait().
static void __kmp_check_null_func | ( | void | ) | [static] |
Definition at line 112 of file kmp_error.c.
Referenced by __kmp_allocate_cons_stack(), __kmp_check_barrier(), __kmp_expand_cons_stack(), __kmp_pop_sync(), and __kmp_pop_workshare().
void __kmp_check_sync | ( | int | gtid, | |
enum cons_type | ct, | |||
ident_t const * | ident, | |||
kmp_user_lock_p | lck | |||
) |
Definition at line 321 of file kmp_error.c.
References __kmp_error_construct(), __kmp_error_construct2(), __kmp_expand_cons_stack(), __kmp_get_gtid, __kmp_get_user_lock_owner(), __kmp_threads, ct_critical, ct_master, ct_ordered_in_parallel, ct_ordered_in_pdo, ct_ordered_in_taskq, ct_reduce, ct_taskq, ident::flags, cons_data::ident, IS_CONS_TYPE_ORDERED, KE_TRACE, KMP_ASSERT, KMP_IDENT_KMPC, cons_data::name, cons_header::p_top, cons_data::prev, cons_header::s_top, cons_header::stack_data, cons_header::stack_size, cons_header::stack_top, cons_data::type, and cons_header::w_top.
Referenced by __kmp_push_sync(), and __kmpc_master().
Definition at line 281 of file kmp_error.c.
References __kmp_error_construct2(), __kmp_expand_cons_stack(), __kmp_get_gtid, __kmp_threads, IS_CONS_TYPE_TASKQ, KE_TRACE, KMP_DEBUG_ASSERT, cons_header::p_top, cons_header::s_top, cons_header::stack_data, cons_header::stack_size, cons_header::stack_top, cons_data::type, and cons_header::w_top.
Referenced by __kmp_dispatch_init(), __kmp_enter_single(), and __kmp_push_workshare().
Definition at line 181 of file kmp_error.c.
References __kmp_msg(), __kmp_msg_format(), __kmp_msg_null, __kmp_pragma(), KMP_INTERNAL_FREE, and kmp_ms_fatal.
Referenced by __kmp_check_sync(), __kmp_dispatch_init(), __kmp_for_static_init(), __kmp_pop_parallel(), __kmp_pop_sync(), and __kmp_pop_workshare().
void __kmp_error_construct2 | ( | kmp_i18n_id_t | id, | |
enum cons_type | ct, | |||
ident_t const * | ident, | |||
struct cons_data const * | cons | |||
) |
Definition at line 192 of file kmp_error.c.
References __kmp_msg(), __kmp_msg_format(), __kmp_msg_null, __kmp_pragma(), cons_data::ident, KMP_INTERNAL_FREE, kmp_ms_fatal, and cons_data::type.
Referenced by __kmp_check_barrier(), __kmp_check_sync(), __kmp_check_workshare(), __kmp_dispatch_deo(), __kmp_dispatch_dxo(), __kmp_pop_parallel(), __kmp_pop_sync(), and __kmp_pop_workshare().
static void __kmp_expand_cons_stack | ( | int | gtid, | |
struct cons_header * | p | |||
) | [static] |
Definition at line 118 of file kmp_error.c.
References __kmp_allocate, __kmp_check_null_func(), __kmp_get_gtid, i, KE_TRACE, cons_header::stack_data, cons_header::stack_size, and cons_header::stack_top.
Referenced by __kmp_check_sync(), __kmp_check_workshare(), and __kmp_push_parallel().
void __kmp_free_cons_stack | ( | void * | ptr | ) |
Definition at line 228 of file kmp_error.c.
References __kmp_free, and cons_header::stack_data.
Referenced by __kmp_reap_thread().
void __kmp_pop_parallel | ( | int | gtid, | |
ident_t const * | ident | |||
) |
Definition at line 435 of file kmp_error.c.
References __kmp_error_construct(), __kmp_error_construct2(), __kmp_get_gtid, __kmp_threads, ct_none, ct_parallel, dump_cons_stack(), cons_data::ident, KE_DUMP, KE_TRACE, cons_header::p_top, POP_MSG, cons_data::prev, cons_header::stack_data, cons_header::stack_top, and cons_data::type.
Referenced by __kmp_run_after_invoked_task(), and __kmpc_end_serialized_parallel().
Definition at line 495 of file kmp_error.c.
References __kmp_check_null_func(), __kmp_error_construct(), __kmp_error_construct2(), __kmp_get_gtid, __kmp_threads, ct_none, dump_cons_stack(), cons_data::ident, KE_DUMP, KE_TRACE, POP_MSG, cons_data::prev, cons_header::s_top, cons_header::stack_data, cons_header::stack_top, and cons_data::type.
Referenced by __kmp_dispatch_dxo(), __kmp_dispatch_dxo_error(), __kmp_end_critical_section_reduce_block(), __kmp_parallel_dxo(), __kmp_taskq_xo(), __kmpc_barrier_master_nowait(), __kmpc_end_critical(), __kmpc_end_master(), __kmpc_end_reduce(), __kmpc_end_reduce_nowait(), __kmpc_reduce(), and __kmpc_reduce_nowait().
Definition at line 460 of file kmp_error.c.
References __kmp_check_null_func(), __kmp_error_construct(), __kmp_error_construct2(), __kmp_get_gtid, __kmp_threads, ct_none, ct_pdo, ct_pdo_ordered, ct_task, ct_task_ordered, dump_cons_stack(), cons_data::ident, KE_DUMP, KE_TRACE, POP_MSG, cons_data::prev, cons_header::stack_data, cons_header::stack_top, cons_data::type, and cons_header::w_top.
Referenced by __kmp_dispatch_next(), __kmp_execute_task_from_queue(), __kmp_exit_single(), __kmpc_end_taskq_task(), __kmpc_for_static_fini(), and __kmpc_taskq_task().
Definition at line 144 of file kmp_error.c.
References __kmp_msg_format(), __kmp_str_buf_free(), __kmp_str_buf_init, __kmp_str_buf_print(), __kmp_str_split(), cons_text_c, KMP_DEBUG_ASSERT, ident::psource, kmp_msg::str, and kmp_str_buf::str.
Referenced by __kmp_error_construct(), and __kmp_error_construct2().
void __kmp_push_parallel | ( | int | gtid, | |
ident_t const * | ident | |||
) |
Definition at line 260 of file kmp_error.c.
References __kmp_expand_cons_stack(), __kmp_get_gtid, __kmp_threads, ct_parallel, dump_cons_stack(), cons_data::ident, KE_DUMP, KE_TRACE, KMP_DEBUG_ASSERT, cons_data::name, cons_header::p_top, cons_data::prev, PUSH_MSG, cons_header::stack_data, cons_header::stack_size, cons_header::stack_top, and cons_data::type.
Referenced by __kmp_run_before_invoked_task(), and __kmpc_serialized_parallel().
void __kmp_push_sync | ( | int | gtid, | |
enum cons_type | ct, | |||
ident_t const * | ident, | |||
kmp_user_lock_p | lck | |||
) |
Definition at line 414 of file kmp_error.c.
References __kmp_check_sync(), __kmp_get_gtid, __kmp_threads, dump_cons_stack(), cons_data::ident, KE_DUMP, KE_TRACE, KMP_ASSERT, cons_data::name, cons_data::prev, PUSH_MSG, cons_header::s_top, cons_header::stack_data, cons_header::stack_top, and cons_data::type.
Referenced by __kmp_dispatch_deo(), __kmp_dispatch_deo_error(), __kmp_enter_critical_section_reduce_block(), __kmp_parallel_deo(), __kmp_taskq_eo(), __kmpc_critical(), __kmpc_master(), __kmpc_reduce(), and __kmpc_reduce_nowait().
Definition at line 304 of file kmp_error.c.
References __kmp_check_workshare(), __kmp_get_gtid, __kmp_threads, dump_cons_stack(), cons_data::ident, KE_DUMP, KE_TRACE, cons_data::name, cons_data::prev, PUSH_MSG, cons_header::stack_data, cons_header::stack_top, cons_data::type, and cons_header::w_top.
Referenced by __kmp_dispatch_init(), __kmp_enter_single(), __kmp_execute_task_from_queue(), __kmp_for_static_init(), and __kmpc_taskq().
static void dump_cons_stack | ( | int | gtid, | |
struct cons_header * | p | |||
) | [static] |
Definition at line 241 of file kmp_error.c.
References __kmp_debug_printf(), __kmp_str_buf_free(), __kmp_str_buf_init, __kmp_str_buf_print(), cons_text_c, get_src, i, cons_data::ident, cons_data::name, cons_header::p_top, cons_data::prev, cons_header::s_top, cons_header::stack_data, cons_header::stack_top, kmp_str_buf::str, cons_data::type, and cons_header::w_top.
Referenced by __kmp_pop_parallel(), __kmp_pop_sync(), __kmp_pop_workshare(), __kmp_push_parallel(), __kmp_push_sync(), and __kmp_push_workshare().
char const* cons_text_c[] [static] |
{ "(none)", "\"parallel\"", "work-sharing", "\"ordered\" work-sharing", "\"sections\"", "work-sharing", "\"taskq\"", "\"taskq\"", "\"taskq ordered\"", "\"critical\"", "\"ordered\"", "\"ordered\"", "\"ordered\"", "\"master\"", "\"reduce\"", "\"barrier\"" }
Definition at line 76 of file kmp_error.c.
Referenced by __kmp_pragma(), and dump_cons_stack().
int const cons_text_c_num = sizeof( cons_text_c ) / sizeof( char const * ) [static] |
Definition at line 105 of file kmp_error.c.
char const* cons_text_fort[] [static] |
{ "(none)", "PARALLEL", "work-sharing", "ORDERED work-sharing", "SECTIONS", "work-sharing", "TASKQ", "TASKQ", "TASKQ ORDERED", "CRITICAL", "ORDERED", "ORDERED", "ORDERED", "MASTER", "REDUCE", "BARRIER" }
Definition at line 57 of file kmp_error.c.
int const cons_text_fort_num = sizeof( cons_text_fort ) / sizeof( char const * ) [static] |
Definition at line 104 of file kmp_error.c.