jonhoo / inferno

A Rust port of FlameGraph
Other
1.64k stars 117 forks source link

`Input data ends in the middle of a stack.` when using on result of attaching #292

Closed HKalbasi closed 1 year ago

HKalbasi commented 1 year ago

When I use perf script | inferno-collapse-dtrace > stacks.folded on a file generated by perf record --call-graph dwarf -p <pid> -g which is used to generate perf data for an already open process, I get this error:

Error: Custom { kind: InvalidData, error: "Input data ends in the middle of a stack." }

Which is probably telling truth, but is it possible to recover from this state instead of bailing out?

jonhoo commented 1 year ago

Ah, this is because you're trying to use perf script with the dtrace collapser. You'll want to use the perf collapser instead:

$ perf script | inferno-collapse-perf > stacks.folded