ARGOBOTS
info.c
Go to the documentation of this file.
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  * See COPYRIGHT in top-level directory.
4  */
5 
6 #include "abti.h"
7 
108 int ABT_info_query_config(ABT_info_query_kind query_kind, void *val)
109 {
110  int abt_errno = ABT_SUCCESS;
111  ABTI_CHECK_INITIALIZED();
112 
113  switch (query_kind) {
115  *((ABT_bool *)val) = gp_ABTI_global->use_debug;
116  break;
118 #ifdef ABT_CONFIG_PRINT_ABT_ERRNO
119  *((ABT_bool *)val) = ABT_TRUE;
120 #else
121  *((ABT_bool *)val) = ABT_FALSE;
122 #endif
123  break;
125  *((ABT_bool *)val) = gp_ABTI_global->use_logging;
126  break;
128 #ifdef HAVE_VALGRIND_SUPPORT
129  *((ABT_bool *)val) = ABT_TRUE;
130 #else
131  *((ABT_bool *)val) = ABT_FALSE;
132 #endif
133  break;
135 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
136  *((ABT_bool *)val) = ABT_TRUE;
137 #else
138  *((ABT_bool *)val) = ABT_FALSE;
139 #endif
140  break;
142 #ifndef ABT_CONFIG_DISABLE_POOL_PRODUCER_CHECK
143  *((ABT_bool *)val) = ABT_TRUE;
144 #else
145  *((ABT_bool *)val) = ABT_FALSE;
146 #endif
147  break;
149 #ifndef ABT_CONFIG_DISABLE_POOL_CONSUMER_CHECK
150  *((ABT_bool *)val) = ABT_TRUE;
151 #else
152  *((ABT_bool *)val) = ABT_FALSE;
153 #endif
154  break;
156 #ifdef ABTD_FCONTEXT_PRESERVE_FPU
157  *((ABT_bool *)val) = ABT_TRUE;
158 #else
159  *((ABT_bool *)val) = ABT_FALSE;
160 #endif
161  break;
163 #ifndef ABT_CONFIG_DISABLE_THREAD_CANCEL
164  *((ABT_bool *)val) = ABT_TRUE;
165 #else
166  *((ABT_bool *)val) = ABT_FALSE;
167 #endif
168  break;
170 #ifndef ABT_CONFIG_DISABLE_TASK_CANCEL
171  *((ABT_bool *)val) = ABT_TRUE;
172 #else
173  *((ABT_bool *)val) = ABT_FALSE;
174 #endif
175  break;
177 #ifndef ABT_CONFIG_DISABLE_MIGRATION
178  *((ABT_bool *)val) = ABT_TRUE;
179 #else
180  *((ABT_bool *)val) = ABT_FALSE;
181 #endif
182  break;
184 #ifndef ABT_CONFIG_DISABLE_STACKABLE_SCHED
185  *((ABT_bool *)val) = ABT_TRUE;
186 #else
187  *((ABT_bool *)val) = ABT_FALSE;
188 #endif
189  break;
191 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD
192  *((ABT_bool *)val) = ABT_TRUE;
193 #else
194  *((ABT_bool *)val) = ABT_FALSE;
195 #endif
196  break;
198 #ifdef ABT_CONFIG_USE_SCHED_SLEEP
199  *((ABT_bool *)val) = ABT_TRUE;
200 #else
201  *((ABT_bool *)val) = ABT_FALSE;
202 #endif
203  break;
205  *((ABT_bool *)val) = gp_ABTI_global->print_config;
206  break;
208  *((ABT_bool *)val) = gp_ABTI_global->set_affinity;
209  break;
211  *((unsigned int *)val) = gp_ABTI_global->max_xstreams;
212  break;
214  *((size_t *)val) = gp_ABTI_global->thread_stacksize;
215  break;
217  *((size_t *)val) = gp_ABTI_global->sched_stacksize;
218  break;
220  *((uint64_t *)val) = gp_ABTI_global->sched_event_freq;
221  break;
223  *((uint64_t *)val) = gp_ABTI_global->sched_sleep_nsec;
224  break;
225  default:
226  abt_errno = ABT_ERR_INV_QUERY_KIND;
227  ABTI_CHECK_ERROR(abt_errno);
228  break;
229  }
230 
231 fn_exit:
232  return abt_errno;
233 
234 fn_fail:
235  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
236  goto fn_exit;
237 }
238 
252 {
253  return ABTI_info_print_config(fp);
254 }
255 
269 {
270  int abt_errno = ABT_SUCCESS;
271  ABTI_CHECK_INITIALIZED();
272 
273  ABTI_global *p_global = gp_ABTI_global;
274  int i;
275 
276  ABTI_spinlock_acquire(&p_global->xstreams_lock);
277 
278  fprintf(fp, "# of created ESs: %d\n", p_global->num_xstreams);
279  for (i = 0; i < p_global->num_xstreams; i++) {
280  ABTI_xstream *p_xstream = p_global->p_xstreams[i];
281  if (p_xstream) {
282  ABTI_xstream_print(p_xstream, fp, 0, ABT_FALSE);
283  }
284  }
285 
286  ABTI_spinlock_release(&p_global->xstreams_lock);
287 
288  fflush(fp);
289 
290 fn_exit:
291  return abt_errno;
292 
293 fn_fail:
294  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
295  goto fn_exit;
296 }
297 
310 int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream)
311 {
312  int abt_errno = ABT_SUCCESS;
313  ABTI_xstream *p_xstream = ABTI_xstream_get_ptr(xstream);
314  ABTI_CHECK_NULL_XSTREAM_PTR(p_xstream);
315 
316  ABTI_xstream_print(p_xstream, fp, 0, ABT_FALSE);
317 
318 fn_exit:
319  return abt_errno;
320 
321 fn_fail:
322  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
323  goto fn_exit;
324 }
325 
338 int ABT_info_print_sched(FILE *fp, ABT_sched sched)
339 {
340  int abt_errno = ABT_SUCCESS;
341  ABTI_sched *p_sched = ABTI_sched_get_ptr(sched);
342  ABTI_CHECK_NULL_SCHED_PTR(p_sched);
343 
344  ABTI_sched_print(p_sched, fp, 0, ABT_FALSE);
345 
346 fn_exit:
347  return abt_errno;
348 
349 fn_fail:
350  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
351  goto fn_exit;
352 }
353 
366 int ABT_info_print_pool(FILE *fp, ABT_pool pool)
367 {
368  int abt_errno = ABT_SUCCESS;
369  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
370  ABTI_CHECK_NULL_POOL_PTR(p_pool);
371 
372  ABTI_pool_print(p_pool, fp, 0);
373 
374 fn_exit:
375  return abt_errno;
376 
377 fn_fail:
378  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
379  goto fn_exit;
380 }
381 
394 int ABT_info_print_thread(FILE *fp, ABT_thread thread)
395 {
396  int abt_errno = ABT_SUCCESS;
397  ABTI_thread *p_thread = ABTI_thread_get_ptr(thread);
398  ABTI_CHECK_NULL_THREAD_PTR(p_thread);
399 
400  ABTI_thread_print(p_thread, fp, 0);
401 
402 fn_exit:
403  return abt_errno;
404 
405 fn_fail:
406  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
407  goto fn_exit;
408 }
409 
424 {
425  int abt_errno = ABT_SUCCESS;
426  ABTI_thread_attr *p_attr = ABTI_thread_attr_get_ptr(attr);
427  ABTI_CHECK_NULL_THREAD_ATTR_PTR(p_attr);
428 
429  ABTI_thread_attr_print(p_attr, fp, 0);
430 
431 fn_exit:
432  return abt_errno;
433 
434 fn_fail:
435  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
436  goto fn_exit;
437 }
438 
451 int ABT_info_print_task(FILE *fp, ABT_task task)
452 {
453  int abt_errno = ABT_SUCCESS;
454  ABTI_task *p_task = ABTI_task_get_ptr(task);
455  ABTI_CHECK_NULL_TASK_PTR(p_task);
456 
457  ABTI_task_print(p_task, fp, 0);
458 
459 fn_exit:
460  return abt_errno;
461 
462 fn_fail:
463  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
464  goto fn_exit;
465 }
466 
480 {
481  int abt_errno = ABT_SUCCESS;
482  ABTI_thread *p_thread = ABTI_thread_get_ptr(thread);
483  ABTI_CHECK_NULL_THREAD_PTR(p_thread);
484 
485  abt_errno = ABTI_thread_print_stack(p_thread, fp);
486 
487 fn_exit:
488  return abt_errno;
489 
490 fn_fail:
491  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
492  goto fn_exit;
493 }
494 
495 struct ABTI_info_print_unit_arg_t {
496  FILE *fp;
497  ABT_pool pool;
498 };
499 
500 static void ABTI_info_print_unit(void *arg, ABT_unit unit)
501 {
502  /* This function may not have any side effect on unit because it is passed
503  * to p_print_all. */
504  struct ABTI_info_print_unit_arg_t *p_arg;
505  p_arg = (struct ABTI_info_print_unit_arg_t *)arg;
506  FILE *fp = p_arg->fp;
507  ABT_pool pool = p_arg->pool;
508  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
509  ABT_unit_type type = p_pool->u_get_type(unit);
510 
511  if (type == ABT_UNIT_TYPE_THREAD) {
512  fprintf(fp, "=== ULT (%p) ===\n", (void *)unit);
513  ABT_thread thread = p_pool->u_get_thread(unit);
514  ABTI_thread *p_thread = ABTI_thread_get_ptr(thread);
515  ABT_thread_id thread_id = ABTI_thread_get_id(p_thread);
516  fprintf(fp,
517  "id : %" PRIu64 "\n"
518  "ctx : %p\n",
519  (uint64_t)thread_id, (void *)&p_thread->ctx);
520  ABTD_thread_print_context(p_thread, fp, 2);
521  fprintf(fp,
522  "stack : %p\n"
523  "stacksize : %" PRIu64 "\n",
524  p_thread->attr.p_stack, (uint64_t)p_thread->attr.stacksize);
525  int abt_errno = ABTI_thread_print_stack(p_thread, fp);
526  if (abt_errno != ABT_SUCCESS)
527  fprintf(fp, "Failed to print stack.\n");
528  } else if (type == ABT_UNIT_TYPE_TASK) {
529  fprintf(fp, "=== tasklet (%p) ===\n", (void *)unit);
530  } else {
531  fprintf(fp, "=== unknown (%p) ===\n", (void *)unit);
532  }
533 }
534 
535 int ABTI_info_print_thread_stacks_in_pool(FILE *fp, ABTI_pool *p_pool);
536 
551 {
552  int abt_errno = ABT_SUCCESS;
553  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
554  ABTI_CHECK_NULL_POOL_PTR(p_pool);
555 
556  abt_errno = ABTI_info_print_thread_stacks_in_pool(fp, p_pool);
557  ABTI_CHECK_ERROR(abt_errno);
558 
559 fn_exit:
560  return abt_errno;
561 
562 fn_fail:
563  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
564  goto fn_exit;
565 }
566 
567 int ABTI_info_print_thread_stacks_in_pool(FILE *fp, ABTI_pool *p_pool)
568 {
569  int abt_errno = ABT_SUCCESS;
570  ABT_pool pool = ABTI_pool_get_handle(p_pool);
571 
572  if (!p_pool->p_print_all) {
573  abt_errno = ABT_ERR_POOL;
574  goto fn_fail;
575  }
576  fprintf(fp, "== pool (%p) ==\n", (void *)p_pool);
577  struct ABTI_info_print_unit_arg_t arg;
578  arg.fp = fp;
579  arg.pool = pool;
580  p_pool->p_print_all(pool, &arg, ABTI_info_print_unit);
581 
582 fn_exit:
583  return abt_errno;
584 
585 fn_fail:
586  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
587  goto fn_exit;
588 }
589 
590 struct ABTI_info_pool_set_t {
591  ABT_pool *pools;
592  size_t num;
593  size_t len;
594 };
595 
596 static inline void
597 ABTI_info_initialize_pool_set(struct ABTI_info_pool_set_t *p_set)
598 {
599  size_t default_len = 16;
600  p_set->pools = (ABT_pool *)ABTU_malloc(sizeof(ABT_pool) * default_len);
601  p_set->num = 0;
602  p_set->len = default_len;
603 }
604 
605 static inline void
606 ABTI_info_finalize_pool_set(struct ABTI_info_pool_set_t *p_set)
607 {
608  ABTU_free(p_set->pools);
609 }
610 
611 static inline void ABTI_info_add_pool_set(ABT_pool pool,
612  struct ABTI_info_pool_set_t *p_set)
613 {
614  size_t i;
615  for (i = 0; i < p_set->num; i++) {
616  if (p_set->pools[i] == pool)
617  return;
618  }
619  /* Add pool to p_set. */
620  if (p_set->num == p_set->len) {
621  size_t new_len = p_set->len * 2;
622  p_set->pools = (ABT_pool *)ABTU_realloc(p_set->pools,
623  sizeof(ABT_pool) * p_set->len,
624  sizeof(ABT_pool) * new_len);
625  p_set->len = new_len;
626  }
627  p_set->pools[p_set->num++] = pool;
628 }
629 
630 #define PRINT_STACK_FLAG_UNSET 0
631 #define PRINT_STACK_FLAG_INITIALIZE 1
632 #define PRINT_STACK_FLAG_WAIT 2
633 #define PRINT_STACK_FLAG_FINALIZE 3
634 
635 static ABTD_atomic_uint32 print_stack_flag =
636  ABTD_ATOMIC_UINT32_STATIC_INITIALIZER(PRINT_STACK_FLAG_UNSET);
637 static FILE *print_stack_fp = NULL;
638 static double print_stack_timeout = 0.0;
639 static void (*print_cb_func)(ABT_bool, void *) = NULL;
640 static void *print_arg = NULL;
641 static ABTD_atomic_uint32 print_stack_barrier =
642  ABTD_ATOMIC_UINT32_STATIC_INITIALIZER(0);
643 
680 int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout,
681  void (*cb_func)(ABT_bool, void *),
682  void *arg)
683 {
684  /* This function is signal-safe, so it may not call other functions unless
685  * you really know what the called functions do. */
686  if (ABTD_atomic_acquire_load_uint32(&print_stack_flag) ==
688  if (ABTD_atomic_bool_cas_strong_uint32(&print_stack_flag,
691  /* Save fp and timeout. */
692  print_stack_fp = fp;
693  print_stack_timeout = timeout;
694  print_cb_func = cb_func;
695  print_arg = arg;
696  /* Here print_stack_barrier must be 0. */
697  ABTI_ASSERT(ABTD_atomic_acquire_load_uint32(&print_stack_barrier) ==
698  0);
699  ABTD_atomic_release_store_uint32(&print_stack_flag,
701  }
702  }
703  return ABT_SUCCESS;
704 }
705 
706 void ABTI_info_check_print_all_thread_stacks(void)
707 {
708  if (ABTD_atomic_acquire_load_uint32(&print_stack_flag) !=
710  return;
711 
712  /* Wait for the other execution streams using a barrier mechanism. */
713  uint32_t self_value = ABTD_atomic_fetch_add_uint32(&print_stack_barrier, 1);
714  if (self_value == 0) {
715  /* This ES becomes a master. */
716  double start_time = ABTI_get_wtime();
717  ABT_bool force_print = ABT_FALSE;
718 
719  /* xstreams_lock is acquired to avoid dynamic ES creation while
720  * printing data. */
721  ABTI_spinlock_acquire(&gp_ABTI_global->xstreams_lock);
722  while (1) {
723  if (ABTD_atomic_acquire_load_uint32(&print_stack_barrier) >=
724  gp_ABTI_global->num_xstreams) {
725  break;
726  }
727  if (print_stack_timeout >= 0.0 &&
728  (ABTI_get_wtime() - start_time) >= print_stack_timeout) {
729  force_print = ABT_TRUE;
730  break;
731  }
732  ABTI_spinlock_release(&gp_ABTI_global->xstreams_lock);
733  ABTD_atomic_pause();
734  ABTI_spinlock_acquire(&gp_ABTI_global->xstreams_lock);
735  }
736  /* All the available ESs are (supposed to be) stopped. We *assume* that
737  * no ES is calling and will call Argobots functions except this
738  * function while printing stack information. */
739  int i, j;
740  struct ABTI_info_pool_set_t pool_set;
741  ABTI_info_initialize_pool_set(&pool_set);
742  FILE *fp = print_stack_fp;
743  if (force_print) {
744  fprintf(fp,
745  "ABT_info_trigger_print_all_thread_stacks: "
746  "timeout (only %d ESs stop)\n",
747  (int)ABTD_atomic_acquire_load_uint32(&print_stack_barrier));
748  }
749  for (i = 0; i < gp_ABTI_global->num_xstreams; i++) {
750  ABTI_xstream *p_xstream = gp_ABTI_global->p_xstreams[i];
751  ABTI_sched *p_main_sched = p_xstream->p_main_sched;
752  fprintf(fp, "= xstream[%d] (%p) =\n", i, (void *)p_xstream);
753  fprintf(fp, "main_sched : %p\n", (void *)p_main_sched);
754  if (!p_main_sched)
755  continue;
756  for (j = 0; j < p_main_sched->num_pools; j++) {
757  ABT_pool pool = p_main_sched->pools[j];
758  ABTI_ASSERT(pool != ABT_POOL_NULL);
759  fprintf(fp, " pools[%d] : %p\n", j,
760  (void *)ABTI_pool_get_ptr(pool));
761  ABTI_info_add_pool_set(pool, &pool_set);
762  }
763  }
764  for (i = 0; i < pool_set.num; i++) {
765  ABT_pool pool = pool_set.pools[i];
766  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
767  int abt_errno = ABTI_info_print_thread_stacks_in_pool(fp, p_pool);
768  if (abt_errno != ABT_SUCCESS)
769  fprintf(fp, " Failed to print (errno = %d).\n", abt_errno);
770  }
771  /* Release the lock that protects ES data. */
772  ABTI_spinlock_release(&gp_ABTI_global->xstreams_lock);
773 
774  if (print_cb_func)
775  print_cb_func(force_print, print_arg);
776  ABTI_info_finalize_pool_set(&pool_set);
777  /* Update print_stack_flag to 3. */
778  ABTD_atomic_release_store_uint32(&print_stack_flag,
780  } else {
781  /* Wait for the master's work. */
782  while (ABTD_atomic_acquire_load_uint32(&print_stack_flag) !=
784  ABTD_atomic_pause();
785  }
786  ABTI_ASSERT(ABTD_atomic_acquire_load_uint32(&print_stack_flag) ==
788 
789  /* Decrement the barrier value. */
790  uint32_t dec_value = ABTD_atomic_fetch_sub_uint32(&print_stack_barrier, 1);
791  if (dec_value == 0) {
792  /* The last execution stream resets the flag. */
793  ABTD_atomic_release_store_uint32(&print_stack_flag,
795  }
796 }
797 
798 int ABTI_info_print_config(FILE *fp)
799 {
800  int abt_errno = ABT_SUCCESS;
801  ABTI_CHECK_INITIALIZED();
802 
803  ABTI_global *p_global = gp_ABTI_global;
804 
805  fprintf(fp, "Argobots Configuration:\n");
806  fprintf(fp, " - # of cores: %d\n", p_global->num_cores);
807  fprintf(fp, " - cache line size: %u\n", ABT_CONFIG_STATIC_CACHELINE_SIZE);
808  fprintf(fp, " - OS page size: %u\n", p_global->os_page_size);
809  fprintf(fp, " - huge page size: %u\n", p_global->huge_page_size);
810  fprintf(fp, " - max. # of ESs: %d\n", p_global->max_xstreams);
811  fprintf(fp, " - cur. # of ESs: %d\n", p_global->num_xstreams);
812  fprintf(fp, " - ES affinity: %s\n",
813  (p_global->set_affinity == ABT_TRUE) ? "on" : "off");
814  fprintf(fp, " - logging: %s\n",
815  (p_global->use_logging == ABT_TRUE) ? "on" : "off");
816  fprintf(fp, " - debug output: %s\n",
817  (p_global->use_debug == ABT_TRUE) ? "on" : "off");
818  fprintf(fp, " - key table entries: %d\n", p_global->key_table_size);
819  fprintf(fp, " - ULT stack size: %u KB\n",
820  (unsigned)(p_global->thread_stacksize / 1024));
821  fprintf(fp, " - scheduler stack size: %u KB\n",
822  (unsigned)(p_global->sched_stacksize / 1024));
823  fprintf(fp, " - scheduler event check frequency: %u\n",
824  p_global->sched_event_freq);
825 
826  fprintf(fp, " - timer function: "
827 #if defined(ABT_CONFIG_USE_CLOCK_GETTIME)
828  "clock_gettime"
829 #elif defined(ABT_CONFIG_USE_MACH_ABSOLUTE_TIME)
830  "mach_absolute_time"
831 #elif defined(ABT_CONFIG_USE_GETTIMEOFDAY)
832  "gettimeofday"
833 #endif
834  "\n");
835 
836 #ifdef ABT_CONFIG_USE_MEM_POOL
837  fprintf(fp, "Memory Pool:\n");
838  fprintf(fp, " - page size for allocation: %u KB\n",
839  p_global->mem_page_size / 1024);
840  fprintf(fp, " - stack page size: %u KB\n", p_global->mem_sp_size / 1024);
841  fprintf(fp, " - max. # of stacks per ES: %u\n", p_global->mem_max_stacks);
842  switch (p_global->mem_lp_alloc) {
843  case ABTI_MEM_LP_MALLOC:
844  fprintf(fp, " - large page allocation: malloc\n");
845  break;
846  case ABTI_MEM_LP_MMAP_RP:
847  fprintf(fp, " - large page allocation: mmap regular pages\n");
848  break;
849  case ABTI_MEM_LP_MMAP_HP_RP:
850  fprintf(fp, " - large page allocation: mmap huge pages + "
851  "regular pages\n");
852  break;
853  case ABTI_MEM_LP_MMAP_HP_THP:
854  fprintf(fp, " - large page allocation: mmap huge pages + THPs\n");
855  break;
856  case ABTI_MEM_LP_THP:
857  fprintf(fp, " - large page allocation: THPs\n");
858  break;
859  }
860 #endif /* ABT_CONFIG_USE_MEM_POOL */
861 
862  fflush(fp);
863 
864 fn_exit:
865  return abt_errno;
866 
867 fn_fail:
868  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
869  goto fn_exit;
870 }
struct ABT_thread_attr_opaque * ABT_thread_attr
Definition: abt.h:281
struct ABT_unit_opaque * ABT_unit
Definition: abt.h:275
#define ABT_POOL_NULL
Definition: abt.h:341
int ABT_info_print_sched(FILE *fp, ABT_sched sched)
Write the information of the target scheduler to the output stream.
Definition: info.c:338
struct ABT_xstream_opaque * ABT_xstream
Definition: abt.h:251
struct ABT_sched_opaque * ABT_sched
Definition: abt.h:257
int ABT_info_print_thread_stacks_in_pool(FILE *fp, ABT_pool pool)
Dump stack information of all the threads in the target pool.
Definition: info.c:550
int ABT_info_print_config(FILE *fp)
Write the configuration information to the output stream.
Definition: info.c:251
#define PRINT_STACK_FLAG_FINALIZE
Definition: info.c:633
int ABT_info_print_pool(FILE *fp, ABT_pool pool)
Write the information of the target pool to the output stream.
Definition: info.c:366
#define ABT_ERR_INV_QUERY_KIND
Definition: abt.h:92
#define PRINT_STACK_FLAG_INITIALIZE
Definition: info.c:631
uint64_t ABT_thread_id
Definition: abt.h:287
static double print_stack_timeout
Definition: info.c:638
struct ABT_task_opaque * ABT_task
Definition: abt.h:289
static void * ABTU_malloc(size_t size)
Definition: abtu.h:39
int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream)
Write the information of the target ES to the output stream.
Definition: info.c:310
int ABT_bool
Definition: abt.h:309
#define ABT_CONFIG_STATIC_CACHELINE_SIZE
Definition: abt_config.h:51
struct ABT_pool_opaque * ABT_pool
Definition: abt.h:267
static FILE * print_stack_fp
Definition: info.c:637
int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout, void(*cb_func)(ABT_bool, void *), void *arg)
Dump stacks of threads in pools existing in Argobots.
Definition: info.c:680
int ABT_info_print_thread_attr(FILE *fp, ABT_thread_attr attr)
Write the information of the target ULT attribute to the output stream.
Definition: info.c:423
#define ABT_FALSE
Definition: abt.h:224
static void(* print_cb_func)(ABT_bool, void *)
Definition: info.c:639
#define PRINT_STACK_FLAG_WAIT
Definition: info.c:632
struct ABT_thread_opaque * ABT_thread
Definition: abt.h:279
int ABT_info_print_all_xstreams(FILE *fp)
Write the information of all created ESs to the output stream.
Definition: info.c:268
static void * print_arg
Definition: info.c:640
#define HANDLE_ERROR_FUNC_WITH_CODE(n)
Definition: abti_error.h:241
int ABT_info_print_task(FILE *fp, ABT_task task)
Write the information of the target tasklet to the output stream.
Definition: info.c:451
static void * ABTU_realloc(void *ptr, size_t old_size, size_t new_size)
Definition: abtu.h:56
int ABT_info_query_config(ABT_info_query_kind query_kind, void *val)
Get the configuration information associated with query_kind.
Definition: info.c:108
ABTI_global * gp_ABTI_global
Definition: global.c:14
#define ABT_SUCCESS
Definition: abt.h:64
#define ABT_TRUE
Definition: abt.h:223
ABT_unit_type
Definition: abt.h:170
int ABT_info_print_thread_stack(FILE *fp, ABT_thread thread)
Dump the stack of the target thread to the output stream.
Definition: info.c:479
int ABT_info_print_thread(FILE *fp, ABT_thread thread)
Write the information of the target ULT to the output stream.
Definition: info.c:394
static ABTD_atomic_uint32 print_stack_flag
Definition: info.c:635
ABT_info_query_kind
Definition: abt.h:177
static void ABTU_free(void *ptr)
Definition: abtu.h:32
#define ABT_ERR_POOL
Definition: abt.h:98
static ABTD_atomic_uint32 print_stack_barrier
Definition: info.c:641
#define PRINT_STACK_FLAG_UNSET
Definition: info.c:630
#define ABT_CONFIG_USE_CLOCK_GETTIME
Definition: abt_config.h:60