ARGOBOTS  66b1c39742507d8df30e8d28c54839b961a14814
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
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 
9  ABTI_pool *p_pool);
11  FILE *fp, double timeout, void (*cb_func)(ABT_bool, void *), void *arg);
12 
116 int ABT_info_query_config(ABT_info_query_kind query_kind, void *val)
117 {
118  ABTI_SETUP_WITH_INIT_CHECK();
119 
120  switch (query_kind) {
122  *((ABT_bool *)val) = gp_ABTI_global->use_debug;
123  break;
125 #ifdef ABT_CONFIG_PRINT_ABT_ERRNO
126  *((ABT_bool *)val) = ABT_TRUE;
127 #else
128  *((ABT_bool *)val) = ABT_FALSE;
129 #endif
130  break;
132  *((ABT_bool *)val) = gp_ABTI_global->use_logging;
133  break;
135 #ifdef HAVE_VALGRIND_SUPPORT
136  *((ABT_bool *)val) = ABT_TRUE;
137 #else
138  *((ABT_bool *)val) = ABT_FALSE;
139 #endif
140  break;
142 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
143  *((ABT_bool *)val) = ABT_TRUE;
144 #else
145  *((ABT_bool *)val) = ABT_FALSE;
146 #endif
147  break;
149  *((ABT_bool *)val) = ABT_FALSE;
150  break;
152  *((ABT_bool *)val) = ABT_FALSE;
153  break;
155 #ifdef ABTD_FCONTEXT_PRESERVE_FPU
156  *((ABT_bool *)val) = ABT_TRUE;
157 #else
158  *((ABT_bool *)val) = ABT_FALSE;
159 #endif
160  break;
162 #ifndef ABT_CONFIG_DISABLE_THREAD_CANCEL
163  *((ABT_bool *)val) = ABT_TRUE;
164 #else
165  *((ABT_bool *)val) = ABT_FALSE;
166 #endif
167  break;
169 #ifndef ABT_CONFIG_DISABLE_TASK_CANCEL
170  *((ABT_bool *)val) = ABT_TRUE;
171 #else
172  *((ABT_bool *)val) = ABT_FALSE;
173 #endif
174  break;
176 #ifndef ABT_CONFIG_DISABLE_MIGRATION
177  *((ABT_bool *)val) = ABT_TRUE;
178 #else
179  *((ABT_bool *)val) = ABT_FALSE;
180 #endif
181  break;
183  *((ABT_bool *)val) = ABT_TRUE;
184  break;
186 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD
187  *((ABT_bool *)val) = ABT_TRUE;
188 #else
189  *((ABT_bool *)val) = ABT_FALSE;
190 #endif
191  break;
193 #ifdef ABT_CONFIG_USE_SCHED_SLEEP
194  *((ABT_bool *)val) = ABT_TRUE;
195 #else
196  *((ABT_bool *)val) = ABT_FALSE;
197 #endif
198  break;
200  *((ABT_bool *)val) = gp_ABTI_global->print_config;
201  break;
203  *((ABT_bool *)val) = gp_ABTI_global->set_affinity;
204  break;
206  *((unsigned int *)val) = gp_ABTI_global->max_xstreams;
207  break;
209  *((size_t *)val) = gp_ABTI_global->thread_stacksize;
210  break;
212  *((size_t *)val) = gp_ABTI_global->sched_stacksize;
213  break;
215  *((uint64_t *)val) = gp_ABTI_global->sched_event_freq;
216  break;
218  *((uint64_t *)val) = gp_ABTI_global->sched_sleep_nsec;
219  break;
221 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
222  *((ABT_bool *)val) = ABT_TRUE;
223 #else
224  *((ABT_bool *)val) = ABT_FALSE;
225 #endif
226  break;
227  default:
228  ABTI_HANDLE_ERROR(ABT_ERR_INV_QUERY_KIND);
229  break;
230  }
231  return ABT_SUCCESS;
232 }
233 
247 {
248  ABTI_SETUP_WITH_INIT_CHECK();
249 
250  ABTI_info_print_config(fp);
251  return ABT_SUCCESS;
252 }
253 
267 {
268  ABTI_SETUP_WITH_INIT_CHECK();
269 
270  ABTI_global *p_global = gp_ABTI_global;
271 
272  ABTI_spinlock_acquire(&p_global->xstream_list_lock);
273 
274  fprintf(fp, "# of created ESs: %d\n", p_global->num_xstreams);
275 
276  ABTI_xstream *p_xstream = p_global->p_xstream_head;
277  while (p_xstream) {
278  ABTI_xstream_print(p_xstream, fp, 0, ABT_FALSE);
279  p_xstream = p_xstream->p_next;
280  }
281 
282  ABTI_spinlock_release(&p_global->xstream_list_lock);
283 
284  fflush(fp);
285  return ABT_SUCCESS;
286 }
287 
300 int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream)
301 {
302  ABTI_xstream *p_xstream = ABTI_xstream_get_ptr(xstream);
303  ABTI_CHECK_NULL_XSTREAM_PTR(p_xstream);
304 
305  ABTI_xstream_print(p_xstream, fp, 0, ABT_FALSE);
306  return ABT_SUCCESS;
307 }
308 
321 int ABT_info_print_sched(FILE *fp, ABT_sched sched)
322 {
323  ABTI_sched *p_sched = ABTI_sched_get_ptr(sched);
324  ABTI_CHECK_NULL_SCHED_PTR(p_sched);
325 
326  ABTI_sched_print(p_sched, fp, 0, ABT_TRUE);
327  return ABT_SUCCESS;
328 }
329 
342 int ABT_info_print_pool(FILE *fp, ABT_pool pool)
343 {
344  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
345  ABTI_CHECK_NULL_POOL_PTR(p_pool);
346 
347  ABTI_pool_print(p_pool, fp, 0);
348  return ABT_SUCCESS;
349 }
350 
363 int ABT_info_print_thread(FILE *fp, ABT_thread thread)
364 {
365  ABTI_thread *p_thread = ABTI_thread_get_ptr(thread);
366  ABTI_CHECK_NULL_THREAD_PTR(p_thread);
367 
368  ABTI_thread_print(p_thread, fp, 0);
369  return ABT_SUCCESS;
370 }
371 
386 {
387  ABTI_thread_attr *p_attr = ABTI_thread_attr_get_ptr(attr);
388  ABTI_CHECK_NULL_THREAD_ATTR_PTR(p_attr);
389 
390  ABTI_thread_attr_print(p_attr, fp, 0);
391  return ABT_SUCCESS;
392 }
393 
394 #ifdef ABT_CONFIG_USE_DOXYGEN
395 
407 int ABT_info_print_task(FILE *fp, ABT_task task);
408 #endif
409 
423 {
424  ABTI_thread *p_thread = ABTI_thread_get_ptr(thread);
425  ABTI_CHECK_NULL_THREAD_PTR(p_thread);
426  ABTI_ythread *p_ythread;
427  ABTI_CHECK_YIELDABLE(p_thread, &p_ythread, ABT_ERR_INV_THREAD);
428 
429  ABTI_ythread_print_stack(p_ythread, fp);
430  return ABT_SUCCESS;
431 }
432 
447 {
448  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
449  ABTI_CHECK_NULL_POOL_PTR(p_pool);
450 
451  int abt_errno = info_print_thread_stacks_in_pool(fp, p_pool);
452  ABTI_CHECK_ERROR(abt_errno);
453  return ABT_SUCCESS;
454 }
455 
492 int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout,
493  void (*cb_func)(ABT_bool, void *),
494  void *arg)
495 {
496  info_trigger_print_all_thread_stacks(fp, timeout, cb_func, arg);
497  return ABT_SUCCESS;
498 }
499 
500 /*****************************************************************************/
501 /* Private APIs */
502 /*****************************************************************************/
503 
505  FILE *fp;
507 };
508 
511  size_t num;
512  size_t len;
513 };
514 
515 ABTU_ret_err static inline int
517 ABTU_ret_err static inline int info_add_pool_set(ABT_pool pool,
518  struct info_pool_set_t *p_set);
519 static inline void info_finalize_pool_set(struct info_pool_set_t *p_set);
520 
521 #define PRINT_STACK_FLAG_UNSET 0
522 #define PRINT_STACK_FLAG_INITIALIZE 1
523 #define PRINT_STACK_FLAG_WAIT 2
524 #define PRINT_STACK_FLAG_FINALIZE 3
525 
526 static ABTD_atomic_uint32 print_stack_flag =
527  ABTD_ATOMIC_UINT32_STATIC_INITIALIZER(PRINT_STACK_FLAG_UNSET);
528 static FILE *print_stack_fp = NULL;
529 static double print_stack_timeout = 0.0;
530 static void (*print_cb_func)(ABT_bool, void *) = NULL;
531 static void *print_arg = NULL;
532 static ABTD_atomic_uint32 print_stack_barrier =
533  ABTD_ATOMIC_UINT32_STATIC_INITIALIZER(0);
534 
535 void ABTI_info_check_print_all_thread_stacks(void)
536 {
537  if (ABTD_atomic_acquire_load_uint32(&print_stack_flag) !=
539  return;
540 
541  /* Wait for the other execution streams using a barrier mechanism. */
542  uint32_t self_value = ABTD_atomic_fetch_add_uint32(&print_stack_barrier, 1);
543  if (self_value == 0) {
544  /* This ES becomes the main ES. */
545  double start_time = ABTI_get_wtime();
546  ABT_bool force_print = ABT_FALSE;
547 
548  /* xstreams_lock is acquired to avoid dynamic ES creation while
549  * printing data. */
550  ABTI_spinlock_acquire(&gp_ABTI_global->xstream_list_lock);
551  while (1) {
552  if (ABTD_atomic_acquire_load_uint32(&print_stack_barrier) >=
553  gp_ABTI_global->num_xstreams) {
554  break;
555  }
556  if (print_stack_timeout >= 0.0 &&
557  (ABTI_get_wtime() - start_time) >= print_stack_timeout) {
558  force_print = ABT_TRUE;
559  break;
560  }
561  ABTI_spinlock_release(&gp_ABTI_global->xstream_list_lock);
562  ABTD_atomic_pause();
563  ABTI_spinlock_acquire(&gp_ABTI_global->xstream_list_lock);
564  }
565  /* All the available ESs are (supposed to be) stopped. We *assume* that
566  * no ES is calling and will call Argobots functions except this
567  * function while printing stack information. */
568  int i, abt_errno;
569 
570  FILE *fp = print_stack_fp;
571  if (force_print) {
572  fprintf(fp,
573  "ABT_info_trigger_print_all_thread_stacks: "
574  "timeout (only %d ESs stop)\n",
575  (int)ABTD_atomic_acquire_load_uint32(&print_stack_barrier));
576  }
577 
578  struct info_pool_set_t pool_set;
579  abt_errno = info_initialize_pool_set(&pool_set);
580  if (ABTI_IS_ERROR_CHECK_ENABLED && abt_errno != ABT_SUCCESS)
581  goto print_fail;
582  ABTI_xstream *p_xstream = gp_ABTI_global->p_xstream_head;
583  while (p_xstream) {
584  ABTI_sched *p_main_sched = p_xstream->p_main_sched;
585  fprintf(fp, "= xstream[%d] (%p) =\n", p_xstream->rank,
586  (void *)p_xstream);
587  fprintf(fp, "main_sched : %p\n", (void *)p_main_sched);
588  if (!p_main_sched)
589  continue;
590  for (i = 0; i < p_main_sched->num_pools; i++) {
591  ABT_pool pool = p_main_sched->pools[i];
592  ABTI_ASSERT(pool != ABT_POOL_NULL);
593  fprintf(fp, " pools[%d] : %p\n", i,
594  (void *)ABTI_pool_get_ptr(pool));
595  abt_errno = info_add_pool_set(pool, &pool_set);
596  if (ABTI_IS_ERROR_CHECK_ENABLED && abt_errno != ABT_SUCCESS) {
597  info_finalize_pool_set(&pool_set);
598  goto print_fail;
599  }
600  }
601  p_xstream = p_xstream->p_next;
602  }
603  for (i = 0; i < pool_set.num; i++) {
604  ABT_pool pool = pool_set.pools[i];
605  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
606  abt_errno = info_print_thread_stacks_in_pool(fp, p_pool);
607  if (abt_errno != ABT_SUCCESS)
608  fprintf(fp, " Failed to print (errno = %d).\n", abt_errno);
609  }
610  info_finalize_pool_set(&pool_set);
611  goto print_exit;
612 
613  print_fail:
614  fprintf(fp, "ABT_info_trigger_print_all_thread_stacks: "
615  "failed because of memory error.\n");
616  print_exit:
617  /* Release the lock that protects ES data. */
618  ABTI_spinlock_release(&gp_ABTI_global->xstream_list_lock);
619  if (print_cb_func)
620  print_cb_func(force_print, print_arg);
621  /* Update print_stack_flag to 3. */
622  ABTD_atomic_release_store_uint32(&print_stack_flag,
624  } else {
625  /* Wait for the main ES's work. */
626  while (ABTD_atomic_acquire_load_uint32(&print_stack_flag) !=
628  ABTD_atomic_pause();
629  }
630  ABTI_ASSERT(ABTD_atomic_acquire_load_uint32(&print_stack_flag) ==
632 
633  /* Decrement the barrier value. */
634  uint32_t dec_value = ABTD_atomic_fetch_sub_uint32(&print_stack_barrier, 1);
635  if (dec_value == 0) {
636  /* The last execution stream resets the flag. */
637  ABTD_atomic_release_store_uint32(&print_stack_flag,
639  }
640 }
641 
642 void ABTI_info_print_config(FILE *fp)
643 {
644  ABTI_global *p_global = gp_ABTI_global;
645 
646  fprintf(fp, "Argobots Configuration:\n");
647  fprintf(fp, " - # of cores: %d\n", p_global->num_cores);
648  fprintf(fp, " - cache line size: %u\n", ABT_CONFIG_STATIC_CACHELINE_SIZE);
649  fprintf(fp, " - OS page size: %u\n", p_global->os_page_size);
650  fprintf(fp, " - huge page size: %u\n", p_global->huge_page_size);
651  fprintf(fp, " - max. # of ESs: %d\n", p_global->max_xstreams);
652  fprintf(fp, " - cur. # of ESs: %d\n", p_global->num_xstreams);
653  fprintf(fp, " - ES affinity: %s\n",
654  (p_global->set_affinity == ABT_TRUE) ? "on" : "off");
655  fprintf(fp, " - logging: %s\n",
656  (p_global->use_logging == ABT_TRUE) ? "on" : "off");
657  fprintf(fp, " - debug output: %s\n",
658  (p_global->use_debug == ABT_TRUE) ? "on" : "off");
659  fprintf(fp, " - key table entries: %d\n", p_global->key_table_size);
660  fprintf(fp, " - ULT stack size: %u KB\n",
661  (unsigned)(p_global->thread_stacksize / 1024));
662  fprintf(fp, " - scheduler stack size: %u KB\n",
663  (unsigned)(p_global->sched_stacksize / 1024));
664  fprintf(fp, " - scheduler event check frequency: %u\n",
665  p_global->sched_event_freq);
666 
667  fprintf(fp, " - timer function: "
668 #if defined(ABT_CONFIG_USE_CLOCK_GETTIME)
669  "clock_gettime"
670 #elif defined(ABT_CONFIG_USE_MACH_ABSOLUTE_TIME)
671  "mach_absolute_time"
672 #elif defined(ABT_CONFIG_USE_GETTIMEOFDAY)
673  "gettimeofday"
674 #endif
675  "\n");
676 
677 #ifdef ABT_CONFIG_USE_MEM_POOL
678  fprintf(fp, "Memory Pool:\n");
679  fprintf(fp, " - page size for allocation: %u KB\n",
680  p_global->mem_page_size / 1024);
681  fprintf(fp, " - stack page size: %u KB\n", p_global->mem_sp_size / 1024);
682  fprintf(fp, " - max. # of stacks per ES: %u\n", p_global->mem_max_stacks);
683  switch (p_global->mem_lp_alloc) {
684  case ABTI_MEM_LP_MALLOC:
685  fprintf(fp, " - large page allocation: malloc\n");
686  break;
687  case ABTI_MEM_LP_MMAP_RP:
688  fprintf(fp, " - large page allocation: mmap regular pages\n");
689  break;
690  case ABTI_MEM_LP_MMAP_HP_RP:
691  fprintf(fp, " - large page allocation: mmap huge pages + "
692  "regular pages\n");
693  break;
694  case ABTI_MEM_LP_MMAP_HP_THP:
695  fprintf(fp, " - large page allocation: mmap huge pages + THPs\n");
696  break;
697  case ABTI_MEM_LP_THP:
698  fprintf(fp, " - large page allocation: THPs\n");
699  break;
700  }
701 #endif /* ABT_CONFIG_USE_MEM_POOL */
702 
703  fflush(fp);
704 }
705 
706 /*****************************************************************************/
707 /* Internal static functions */
708 /*****************************************************************************/
709 
710 static void info_print_unit(void *arg, ABT_unit unit)
711 {
712  /* This function may not have any side effect on unit because it is passed
713  * to p_print_all. */
714  struct info_print_unit_arg_t *p_arg;
715  p_arg = (struct info_print_unit_arg_t *)arg;
716  FILE *fp = p_arg->fp;
717  ABT_pool pool = p_arg->pool;
718  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
719  ABT_unit_type type = p_pool->u_get_type(unit);
720 
721  if (type == ABT_UNIT_TYPE_THREAD) {
722  fprintf(fp, "=== ULT (%p) ===\n", (void *)unit);
723  ABT_thread thread = p_pool->u_get_thread(unit);
724  ABTI_ythread *p_ythread = ABTI_ythread_get_ptr(thread);
725  ABT_unit_id thread_id = ABTI_thread_get_id(&p_ythread->thread);
726  fprintf(fp,
727  "id : %" PRIu64 "\n"
728  "ctx : %p\n",
729  (uint64_t)thread_id, (void *)&p_ythread->ctx);
730  ABTD_ythread_print_context(p_ythread, fp, 2);
731  fprintf(fp,
732  "stack : %p\n"
733  "stacksize : %" PRIu64 "\n",
734  p_ythread->p_stack, (uint64_t)p_ythread->stacksize);
735  ABTI_ythread_print_stack(p_ythread, fp);
736  } else if (type == ABT_UNIT_TYPE_TASK) {
737  fprintf(fp, "=== tasklet (%p) ===\n", (void *)unit);
738  } else {
739  fprintf(fp, "=== unknown (%p) ===\n", (void *)unit);
740  }
741 }
742 
744  ABTI_pool *p_pool)
745 {
746  ABT_pool pool = ABTI_pool_get_handle(p_pool);
747 
748  if (!p_pool->p_print_all) {
749  return ABT_ERR_POOL;
750  }
751  fprintf(fp, "== pool (%p) ==\n", (void *)p_pool);
752  struct info_print_unit_arg_t arg;
753  arg.fp = fp;
754  arg.pool = pool;
755  p_pool->p_print_all(pool, &arg, info_print_unit);
756  return ABT_SUCCESS;
757 }
758 
759 ABTU_ret_err static inline int
761 {
762  size_t default_len = 16;
763  int abt_errno =
764  ABTU_malloc(sizeof(ABT_pool) * default_len, (void **)&p_set->pools);
765  ABTI_CHECK_ERROR(abt_errno);
766  p_set->num = 0;
767  p_set->len = default_len;
768  return ABT_SUCCESS;
769 }
770 
771 static inline void info_finalize_pool_set(struct info_pool_set_t *p_set)
772 {
773  ABTU_free(p_set->pools);
774 }
775 
776 ABTU_ret_err static inline int info_add_pool_set(ABT_pool pool,
777  struct info_pool_set_t *p_set)
778 {
779  size_t i;
780  for (i = 0; i < p_set->num; i++) {
781  if (p_set->pools[i] == pool)
782  return ABT_SUCCESS;
783  }
784  /* Add pool to p_set. */
785  if (p_set->num == p_set->len) {
786  size_t new_len = p_set->len * 2;
787  int abt_errno =
788  ABTU_realloc(sizeof(ABT_pool) * p_set->len,
789  sizeof(ABT_pool) * new_len, (void **)&p_set->pools);
790  ABTI_CHECK_ERROR(abt_errno);
791  p_set->len = new_len;
792  }
793  p_set->pools[p_set->num++] = pool;
794  return ABT_SUCCESS;
795 }
796 
798  FILE *fp, double timeout, void (*cb_func)(ABT_bool, void *), void *arg)
799 {
800  /* This function is signal-safe, so it may not call other functions unless
801  * you really know what the called functions do. */
802  if (ABTD_atomic_acquire_load_uint32(&print_stack_flag) ==
804  if (ABTD_atomic_bool_cas_strong_uint32(&print_stack_flag,
807  /* Save fp and timeout. */
808  print_stack_fp = fp;
809  print_stack_timeout = timeout;
810  print_cb_func = cb_func;
811  print_arg = arg;
812  /* Here print_stack_barrier must be 0. */
813  ABTI_ASSERT(ABTD_atomic_acquire_load_uint32(&print_stack_barrier) ==
814  0);
815  ABTD_atomic_release_store_uint32(&print_stack_flag,
817  }
818  }
819 }
struct ABT_thread_attr_opaque * ABT_thread_attr
Definition: abt.h:345
struct ABT_unit_opaque * ABT_unit
Definition: abt.h:337
#define ABT_POOL_NULL
Definition: abt.h:413
uint64_t ABT_unit_id
Definition: abt.h:341
int ABT_info_print_sched(FILE *fp, ABT_sched sched) ABT_API_PUBLIC
Write the information of the target scheduler to the output stream.
Definition: info.c:321
struct ABT_xstream_opaque * ABT_xstream
Definition: abt.h:313
struct ABT_sched_opaque * ABT_sched
Definition: abt.h:319
ABT_pool pool
Definition: info.c:506
int ABT_info_print_thread_stacks_in_pool(FILE *fp, ABT_pool pool) ABT_API_PUBLIC
Dump stack information of all the threads in the target pool.
Definition: info.c:446
int ABT_info_print_config(FILE *fp) ABT_API_PUBLIC
Write the configuration information to the output stream.
Definition: info.c:246
#define PRINT_STACK_FLAG_FINALIZE
Definition: info.c:524
int ABT_info_print_pool(FILE *fp, ABT_pool pool) ABT_API_PUBLIC
Write the information of the target pool to the output stream.
Definition: info.c:342
#define ABT_ERR_INV_QUERY_KIND
Definition: abt.h:92
size_t num
Definition: info.c:511
#define PRINT_STACK_FLAG_INITIALIZE
Definition: info.c:522
static double print_stack_timeout
Definition: info.c:529
struct ABT_thread_opaque * ABT_task
Definition: abt.h:353
#define ABT_ERR_INV_THREAD
Definition: abt.h:80
static ABTU_ret_err int info_add_pool_set(ABT_pool pool, struct info_pool_set_t *p_set)
Definition: info.c:776
int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC
Write the information of the target ES to the output stream.
Definition: info.c:300
int ABT_bool
Definition: abt.h:373
#define ABT_CONFIG_STATIC_CACHELINE_SIZE
Definition: abt_config.h:57
static void info_trigger_print_all_thread_stacks(FILE *fp, double timeout, void(*cb_func)(ABT_bool, void *), void *arg)
Definition: info.c:797
struct ABT_pool_opaque * ABT_pool
Definition: abt.h:329
static ABTU_ret_err int ABTU_malloc(size_t size, void **p_ptr)
Definition: abtu.h:142
static FILE * print_stack_fp
Definition: info.c:528
int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout, void(*cb_func)(ABT_bool, void *), void *arg) ABT_API_PUBLIC
Dump stacks of threads in pools existing in Argobots.
Definition: info.c:492
int ABT_info_print_thread_attr(FILE *fp, ABT_thread_attr attr) ABT_API_PUBLIC
Write the information of the target ULT attribute to the output stream.
Definition: info.c:385
#define ABT_FALSE
Definition: abt.h:285
#define PRINT_STACK_FLAG_WAIT
Definition: info.c:523
struct ABT_thread_opaque * ABT_thread
Definition: abt.h:343
static ABTU_ret_err int ABTU_realloc(size_t old_size, size_t new_size, void **p_ptr)
Definition: abtu.h:165
int ABT_info_print_all_xstreams(FILE *fp) ABT_API_PUBLIC
Write the information of all created ESs to the output stream.
Definition: info.c:266
static void(* print_cb_func)(ABT_bool, void *)
Definition: info.c:530
static void * print_arg
Definition: info.c:531
int ABT_info_print_task(FILE *fp, ABT_task task)
Write the information of the target tasklet to the output stream.
int ABT_info_query_config(ABT_info_query_kind query_kind, void *val) ABT_API_PUBLIC
Get the configuration information associated with query_kind.
Definition: info.c:116
ABTI_global * gp_ABTI_global
Definition: global.c:18
#define ABT_SUCCESS
Definition: abt.h:64
size_t len
Definition: info.c:512
#define ABT_TRUE
Definition: abt.h:284
ABT_unit_type
Definition: abt.h:169
static ABTU_ret_err int info_print_thread_stacks_in_pool(FILE *fp, ABTI_pool *p_pool)
Definition: info.c:743
static void info_print_unit(void *arg, ABT_unit unit)
Definition: info.c:710
int ABT_info_print_thread_stack(FILE *fp, ABT_thread thread) ABT_API_PUBLIC
Dump the stack of the target thread to the output stream.
Definition: info.c:422
static ABTU_ret_err int info_initialize_pool_set(struct info_pool_set_t *p_set)
Definition: info.c:760
int ABT_info_print_thread(FILE *fp, ABT_thread thread) ABT_API_PUBLIC
Write the information of the target ULT to the output stream.
Definition: info.c:363
static ABTD_atomic_uint32 print_stack_flag
Definition: info.c:526
static void info_finalize_pool_set(struct info_pool_set_t *p_set)
Definition: info.c:771
ABT_info_query_kind
Definition: abt.h:180
ABT_pool * pools
Definition: info.c:510
static void ABTU_free(void *ptr)
Definition: abtu.h:135
#define ABT_ERR_POOL
Definition: abt.h:99
static ABTD_atomic_uint32 print_stack_barrier
Definition: info.c:532
#define PRINT_STACK_FLAG_UNSET
Definition: info.c:521
#define ABTU_ret_err
Definition: abtu.h:49
#define ABT_CONFIG_USE_CLOCK_GETTIME
Definition: abt_config.h:66