mirror of
https://github.com/sstefani/mtrace.git
synced 2025-12-06 16:56:41 +08:00
do not show leaked info when no leaked bytes detected
This commit is contained in:
parent
eaab4f5aad
commit
7850511cf2
@ -942,19 +942,22 @@ static void _process_dump(struct process *process, int (*sortby)(const struct rb
|
||||
"Stack (%s):\n"
|
||||
" bytes used: %llu\n"
|
||||
" number of open allocations: %llu\n"
|
||||
" total number of allocations: %llu\n"
|
||||
" leaked allocations: %lu (%llu bytes)\n"
|
||||
" tsc: %llu\n",
|
||||
" total number of allocations: %llu\n",
|
||||
str_operation(stack->stack->operation),
|
||||
stack->bytes_used,
|
||||
stack->n_allocations,
|
||||
stack->total_allocations,
|
||||
stack->leaks,
|
||||
stack->bytes_leaked,
|
||||
stack->tsc
|
||||
stack->total_allocations
|
||||
) == -1)
|
||||
break;
|
||||
|
||||
if (stack->leaks) {
|
||||
if (dump_printf( " leaked allocations: %lu (%llu bytes)\n", stack->leaks, stack->bytes_leaked) == -1)
|
||||
break;
|
||||
}
|
||||
|
||||
if (dump_printf(" tsc: %llu\n", stack->tsc) == -1)
|
||||
break;
|
||||
|
||||
process_dump_stack(process, stack);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user