Skip to content

Commit

Permalink
info: fix ULTs stacks dump works only once
Browse files Browse the repository at this point in the history
1/one returned value must be tested instead of 0 to detect that last
"parked" XStream is done in ABTI_info_check_print_all_thread_stacks()
and thus that print_stack_flag can be reset to PRINT_STACK_FLAG_UNSET to
allow for a next dump to be started.

DAOS-14248 ticket, Argobots issue pmodels#393.

Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@intel.com>
Co-authored-by: Bruno Faccini <bruno.faccini@intel.com>
  • Loading branch information
2 people authored and knard-intel committed May 15, 2024
1 parent 6d216a9 commit 411e5b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,8 @@ void ABTI_info_check_print_all_thread_stacks(void)

/* Decrement the barrier value. */
int dec_value = ABTD_atomic_fetch_sub_int(&print_stack_barrier, 1);
if (dec_value == 0) {
/* previous value should be 1 ! */
if (dec_value == 1) {
/* The last execution stream resets the flag. */
ABTD_atomic_release_store_int(&print_stack_flag,
PRINT_STACK_FLAG_UNSET);
Expand Down

0 comments on commit 411e5b3

Please sign in to comment.