stack_zero is not needed before stack_save

The man page was recently clarified to commit to this contract.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Eric van Gyzen 2022-03-07 10:01:45 -06:00
parent a65bee6705
commit aca2a7faca
6 changed files with 0 additions and 7 deletions

View File

@ -2618,7 +2618,6 @@ linux_dump_stack(void)
#ifdef STACK
struct stack st;
stack_zero(&st);
stack_save(&st);
stack_print(&st);
#endif

View File

@ -857,7 +857,6 @@ void ocs_print_stack(void)
#if defined(STACK)
struct stack st;
stack_zero(&st);
stack_save(&st);
stack_print(&st);
#endif

View File

@ -74,7 +74,6 @@ xendebug_filter(void *arg __unused)
#if defined(STACK) && defined(DDB)
struct stack st;
stack_zero(&st);
stack_save(&st);
mtx_lock_spin(&lock);

View File

@ -195,7 +195,6 @@ epoch_trace_report(const char *fmt, ...)
va_list ap;
struct stackentry se, *new;
stack_zero(&se.se_stack); /* XXX: is it really needed? */
stack_save(&se.se_stack);
/* Tree is never reduced - go lockless. */

View File

@ -438,7 +438,6 @@ kdb_backtrace(void)
struct stack st;
printf("KDB: stack backtrace:\n");
stack_zero(&st);
stack_save(&st);
stack_print_ddb(&st);
}

View File

@ -3081,7 +3081,6 @@ witness_lock_order_add(struct witness *parent, struct witness *child)
data->wlod_key = key;
w_lohash.wloh_array[hash] = data;
w_lohash.wloh_count++;
stack_zero(&data->wlod_stack);
stack_save(&data->wlod_stack);
return (1);
}
@ -3118,7 +3117,6 @@ witness_debugger(int cond, const char *msg)
sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN);
sbuf_set_drain(&sb, witness_output_drain, NULL);
stack_zero(&st);
stack_save(&st);
witness_output("stack backtrace:\n");
stack_sbuf_print_ddb(&sb, &st);