misc: fix tracedump API to match CLI behavior