mirror of
https://github.com/sstefani/mtrace.git
synced 2025-12-07 01:06: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"
|
"Stack (%s):\n"
|
||||||
" bytes used: %llu\n"
|
" bytes used: %llu\n"
|
||||||
" number of open allocations: %llu\n"
|
" number of open allocations: %llu\n"
|
||||||
" total number of allocations: %llu\n"
|
" total number of allocations: %llu\n",
|
||||||
" leaked allocations: %lu (%llu bytes)\n"
|
|
||||||
" tsc: %llu\n",
|
|
||||||
str_operation(stack->stack->operation),
|
str_operation(stack->stack->operation),
|
||||||
stack->bytes_used,
|
stack->bytes_used,
|
||||||
stack->n_allocations,
|
stack->n_allocations,
|
||||||
stack->total_allocations,
|
stack->total_allocations
|
||||||
stack->leaks,
|
|
||||||
stack->bytes_leaked,
|
|
||||||
stack->tsc
|
|
||||||
) == -1)
|
) == -1)
|
||||||
break;
|
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);
|
process_dump_stack(process, stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user