ARGOBOTS  c6511494322293e01714f56f341b8d2b22c1e3c1
 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 
504 ABTU_ret_err static int print_all_thread_stacks(FILE *fp);
505 
506 #define PRINT_STACK_FLAG_UNSET 0
507 #define PRINT_STACK_FLAG_INITIALIZE 1
508 #define PRINT_STACK_FLAG_WAIT 2
509 #define PRINT_STACK_FLAG_FINALIZE 3
510 
511 static ABTD_atomic_uint32 print_stack_flag =
512  ABTD_ATOMIC_UINT32_STATIC_INITIALIZER(PRINT_STACK_FLAG_UNSET);
513 static FILE *print_stack_fp = NULL;
514 static double print_stack_timeout = 0.0;
515 static void (*print_cb_func)(ABT_bool, void *) = NULL;
516 static void *print_arg = NULL;
517 static ABTD_atomic_uint32 print_stack_barrier =
518  ABTD_ATOMIC_UINT32_STATIC_INITIALIZER(0);
519 
520 void ABTI_info_check_print_all_thread_stacks(void)
521 {
522  if (ABTD_atomic_acquire_load_uint32(&print_stack_flag) !=
524  return;
525 
526  /* Wait for the other execution streams using a barrier mechanism. */
527  uint32_t self_value = ABTD_atomic_fetch_add_uint32(&print_stack_barrier, 1);
528  if (self_value == 0) {
529  /* This ES becomes the main ES. */
530  double start_time = ABTI_get_wtime();
531  ABT_bool force_print = ABT_FALSE;
532 
533  /* xstreams_lock is acquired to avoid dynamic ES creation while
534  * printing data. */
535  ABTI_spinlock_acquire(&gp_ABTI_global->xstream_list_lock);
536  while (1) {
537  if (ABTD_atomic_acquire_load_uint32(&print_stack_barrier) >=
538  gp_ABTI_global->num_xstreams) {
539  break;
540  }
541  if (print_stack_timeout >= 0.0 &&
542  (ABTI_get_wtime() - start_time) >= print_stack_timeout) {
543  force_print = ABT_TRUE;
544  break;
545  }
546  ABTI_spinlock_release(&gp_ABTI_global->xstream_list_lock);
547  ABTD_atomic_pause();
548  ABTI_spinlock_acquire(&gp_ABTI_global->xstream_list_lock);
549  }
550  /* All the available ESs are (supposed to be) stopped. We *assume* that
551  * no ES is calling and will call Argobots functions except this
552  * function while printing stack information. */
553  if (force_print) {
554  fprintf(print_stack_fp,
555  "ABT_info_trigger_print_all_thread_stacks: "
556  "timeout (only %d ESs stop)\n",
557  (int)ABTD_atomic_acquire_load_uint32(&print_stack_barrier));
558  }
559  int abt_errno = print_all_thread_stacks(print_stack_fp);
560  if (ABTI_IS_ERROR_CHECK_ENABLED && abt_errno != ABT_SUCCESS) {
561  fprintf(print_stack_fp, "ABT_info_trigger_print_all_thread_stacks: "
562  "failed because of an internal error.\n");
563  }
564  /* Release the lock that protects ES data. */
565  ABTI_spinlock_release(&gp_ABTI_global->xstream_list_lock);
566  if (print_cb_func)
567  print_cb_func(force_print, print_arg);
568  /* Update print_stack_flag to 3. */
569  ABTD_atomic_release_store_uint32(&print_stack_flag,
571  } else {
572  /* Wait for the main ES's work. */
573  while (ABTD_atomic_acquire_load_uint32(&print_stack_flag) !=
575  ABTD_atomic_pause();
576  }
577  ABTI_ASSERT(ABTD_atomic_acquire_load_uint32(&print_stack_flag) ==
579 
580  /* Decrement the barrier value. */
581  uint32_t dec_value = ABTD_atomic_fetch_sub_uint32(&print_stack_barrier, 1);
582  if (dec_value == 0) {
583  /* The last execution stream resets the flag. */
584  ABTD_atomic_release_store_uint32(&print_stack_flag,
586  }
587 }
588 
589 void ABTI_info_print_config(FILE *fp)
590 {
591  ABTI_global *p_global = gp_ABTI_global;
592 
593  fprintf(fp, "Argobots Configuration:\n");
594  fprintf(fp, " - # of cores: %d\n", p_global->num_cores);
595  fprintf(fp, " - cache line size: %u\n", ABT_CONFIG_STATIC_CACHELINE_SIZE);
596  fprintf(fp, " - OS page size: %u\n", p_global->os_page_size);
597  fprintf(fp, " - huge page size: %u\n", p_global->huge_page_size);
598  fprintf(fp, " - max. # of ESs: %d\n", p_global->max_xstreams);
599  fprintf(fp, " - cur. # of ESs: %d\n", p_global->num_xstreams);
600  fprintf(fp, " - ES affinity: %s\n",
601  (p_global->set_affinity == ABT_TRUE) ? "on" : "off");
602  fprintf(fp, " - logging: %s\n",
603  (p_global->use_logging == ABT_TRUE) ? "on" : "off");
604  fprintf(fp, " - debug output: %s\n",
605  (p_global->use_debug == ABT_TRUE) ? "on" : "off");
606  fprintf(fp, " - key table entries: %d\n", p_global->key_table_size);
607  fprintf(fp, " - ULT stack size: %u KB\n",
608  (unsigned)(p_global->thread_stacksize / 1024));
609  fprintf(fp, " - scheduler stack size: %u KB\n",
610  (unsigned)(p_global->sched_stacksize / 1024));
611  fprintf(fp, " - scheduler event check frequency: %u\n",
612  p_global->sched_event_freq);
613 
614  fprintf(fp, " - timer function: "
615 #if defined(ABT_CONFIG_USE_CLOCK_GETTIME)
616  "clock_gettime"
617 #elif defined(ABT_CONFIG_USE_MACH_ABSOLUTE_TIME)
618  "mach_absolute_time"
619 #elif defined(ABT_CONFIG_USE_GETTIMEOFDAY)
620  "gettimeofday"
621 #endif
622  "\n");
623 
624 #ifdef ABT_CONFIG_USE_MEM_POOL
625  fprintf(fp, "Memory Pool:\n");
626  fprintf(fp, " - page size for allocation: %u KB\n",
627  p_global->mem_page_size / 1024);
628  fprintf(fp, " - stack page size: %u KB\n", p_global->mem_sp_size / 1024);
629  fprintf(fp, " - max. # of stacks per ES: %u\n", p_global->mem_max_stacks);
630  switch (p_global->mem_lp_alloc) {
631  case ABTI_MEM_LP_MALLOC:
632  fprintf(fp, " - large page allocation: malloc\n");
633  break;
634  case ABTI_MEM_LP_MMAP_RP:
635  fprintf(fp, " - large page allocation: mmap regular pages\n");
636  break;
637  case ABTI_MEM_LP_MMAP_HP_RP:
638  fprintf(fp, " - large page allocation: mmap huge pages + "
639  "regular pages\n");
640  break;
641  case ABTI_MEM_LP_MMAP_HP_THP:
642  fprintf(fp, " - large page allocation: mmap huge pages + THPs\n");
643  break;
644  case ABTI_MEM_LP_THP:
645  fprintf(fp, " - large page allocation: THPs\n");
646  break;
647  }
648 #endif /* ABT_CONFIG_USE_MEM_POOL */
649 
650  fflush(fp);
651 }
652 
653 /*****************************************************************************/
654 /* Internal static functions */
655 /*****************************************************************************/
656 
658  FILE *fp;
660 };
661 
664  size_t num;
665  size_t len;
666 };
667 
668 static void info_print_unit(void *arg, ABT_unit unit)
669 {
670  /* This function may not have any side effect on unit because it is passed
671  * to p_print_all. */
672  struct info_print_unit_arg_t *p_arg;
673  p_arg = (struct info_print_unit_arg_t *)arg;
674  FILE *fp = p_arg->fp;
675  ABT_pool pool = p_arg->pool;
676  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
677  ABT_unit_type type = p_pool->u_get_type(unit);
678 
679  if (type == ABT_UNIT_TYPE_THREAD) {
680  fprintf(fp, "=== ULT (%p) ===\n", (void *)unit);
681  ABT_thread thread = p_pool->u_get_thread(unit);
682  ABTI_ythread *p_ythread = ABTI_ythread_get_ptr(thread);
683  ABT_unit_id thread_id = ABTI_thread_get_id(&p_ythread->thread);
684  fprintf(fp,
685  "id : %" PRIu64 "\n"
686  "ctx : %p\n",
687  (uint64_t)thread_id, (void *)&p_ythread->ctx);
688  ABTD_ythread_print_context(p_ythread, fp, 2);
689  fprintf(fp,
690  "stack : %p\n"
691  "stacksize : %" PRIu64 "\n",
692  p_ythread->p_stack, (uint64_t)p_ythread->stacksize);
693  ABTI_ythread_print_stack(p_ythread, fp);
694  } else if (type == ABT_UNIT_TYPE_TASK) {
695  fprintf(fp, "=== tasklet (%p) ===\n", (void *)unit);
696  } else {
697  fprintf(fp, "=== unknown (%p) ===\n", (void *)unit);
698  }
699 }
700 
702  ABTI_pool *p_pool)
703 {
704  ABT_pool pool = ABTI_pool_get_handle(p_pool);
705 
706  if (!p_pool->p_print_all) {
707  return ABT_ERR_POOL;
708  }
709  fprintf(fp, "== pool (%p) ==\n", (void *)p_pool);
710  struct info_print_unit_arg_t arg;
711  arg.fp = fp;
712  arg.pool = pool;
713  p_pool->p_print_all(pool, &arg, info_print_unit);
714  return ABT_SUCCESS;
715 }
716 
717 ABTU_ret_err static inline int
719 {
720  size_t default_len = 16;
721  int abt_errno =
722  ABTU_malloc(sizeof(ABT_pool) * default_len, (void **)&p_set->pools);
723  ABTI_CHECK_ERROR(abt_errno);
724  p_set->num = 0;
725  p_set->len = default_len;
726  return ABT_SUCCESS;
727 }
728 
729 static inline void info_finalize_pool_set(struct info_pool_set_t *p_set)
730 {
731  ABTU_free(p_set->pools);
732 }
733 
735  struct info_pool_set_t *p_set)
736 {
737  size_t i;
738  for (i = 0; i < p_set->num; i++) {
739  if (p_set->pools[i] == pool)
740  return ABT_SUCCESS;
741  }
742  /* Add pool to p_set. */
743  if (p_set->num == p_set->len) {
744  size_t new_len = p_set->len * 2;
745  int abt_errno =
746  ABTU_realloc(sizeof(ABT_pool) * p_set->len,
747  sizeof(ABT_pool) * new_len, (void **)&p_set->pools);
748  ABTI_CHECK_ERROR(abt_errno);
749  p_set->len = new_len;
750  }
751  p_set->pools[p_set->num++] = pool;
752  return ABT_SUCCESS;
753 }
754 
756  FILE *fp, double timeout, void (*cb_func)(ABT_bool, void *), void *arg)
757 {
758  /* This function is signal-safe, so it may not call other functions unless
759  * you really know what the called functions do. */
760  if (ABTD_atomic_acquire_load_uint32(&print_stack_flag) ==
762  if (ABTD_atomic_bool_cas_strong_uint32(&print_stack_flag,
765  /* Save fp and timeout. */
766  print_stack_fp = fp;
767  print_stack_timeout = timeout;
768  print_cb_func = cb_func;
769  print_arg = arg;
770  /* Here print_stack_barrier must be 0. */
771  ABTI_ASSERT(ABTD_atomic_acquire_load_uint32(&print_stack_barrier) ==
772  0);
773  ABTD_atomic_release_store_uint32(&print_stack_flag,
775  }
776  }
777 }
778 
780 {
781  int i, abt_errno;
782  struct info_pool_set_t pool_set;
783 
784  abt_errno = info_initialize_pool_set(&pool_set);
785  ABTI_CHECK_ERROR(abt_errno);
786  ABTI_xstream *p_xstream = gp_ABTI_global->p_xstream_head;
787  while (p_xstream) {
788  ABTI_sched *p_main_sched = p_xstream->p_main_sched;
789  fprintf(fp, "= xstream[%d] (%p) =\n", p_xstream->rank,
790  (void *)p_xstream);
791  fprintf(fp, "main_sched : %p\n", (void *)p_main_sched);
792  if (!p_main_sched)
793  continue;
794  for (i = 0; i < p_main_sched->num_pools; i++) {
795  ABT_pool pool = p_main_sched->pools[i];
796  ABTI_ASSERT(pool != ABT_POOL_NULL);
797  fprintf(fp, " pools[%d] : %p\n", i,
798  (void *)ABTI_pool_get_ptr(pool));
799  abt_errno = info_add_pool_set(pool, &pool_set);
800  if (ABTI_IS_ERROR_CHECK_ENABLED && abt_errno != ABT_SUCCESS) {
801  info_finalize_pool_set(&pool_set);
802  ABTI_HANDLE_ERROR(abt_errno);
803  }
804  }
805  p_xstream = p_xstream->p_next;
806  }
807  for (i = 0; i < pool_set.num; i++) {
808  ABT_pool pool = pool_set.pools[i];
809  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
810  abt_errno = info_print_thread_stacks_in_pool(fp, p_pool);
811  if (abt_errno != ABT_SUCCESS)
812  fprintf(fp, " Failed to print (errno = %d).\n", abt_errno);
813  }
814  info_finalize_pool_set(&pool_set);
815  return ABT_SUCCESS;
816 }
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:659
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:509
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:664
#define PRINT_STACK_FLAG_INITIALIZE
Definition: info.c:507
static double print_stack_timeout
Definition: info.c:514
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:734
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:755
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:129
static FILE * print_stack_fp
Definition: info.c:513
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:508
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:152
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:515
static void * print_arg
Definition: info.c:516
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:665
#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:701
static void info_print_unit(void *arg, ABT_unit unit)
Definition: info.c:668
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:718
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:511
static ABTU_ret_err int print_all_thread_stacks(FILE *fp)
Definition: info.c:779
static void info_finalize_pool_set(struct info_pool_set_t *p_set)
Definition: info.c:729
ABT_info_query_kind
Definition: abt.h:180
ABT_pool * pools
Definition: info.c:663
static void ABTU_free(void *ptr)
Definition: abtu.h:122
#define ABT_ERR_POOL
Definition: abt.h:99
static ABTD_atomic_uint32 print_stack_barrier
Definition: info.c:517
#define PRINT_STACK_FLAG_UNSET
Definition: info.c:506
#define ABTU_ret_err
Definition: abtu.h:49
#define ABT_CONFIG_USE_CLOCK_GETTIME
Definition: abt_config.h:66