avoid default argument in get_trace
use mutable and more const function