jonhoo / inferno

A Rust port of FlameGraph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't skip empty lines inside DTrace stracks

jonhoo opened this issue · comments

This if makes me think that empty lines within a stack (i.e., after a non-empty line and before a count) should not be skipped.

Do we have an example of a trace like that? I don't think the ustack helper can print empty lines.

I don't have an example of such a stack, but I could imagine it might happen if the user tried to include both ustack and kstack in the sampling for example. I don't know for sure though. It was more an observation that the original code explicitly handles empty stack lines, so that's probably for a reason.

I imagine it would look something like this:

              genunix`dnlc_lookup+0x9d
              zfs`zfs_lookup+0xaa

              genunix`fop_lookup+0xa2
              genunix`lookuppnvp+0x1f6
              genunix`lookuppnatcred+0x15e
              genunix`lookupnameatcred+0xad
              genunix`lookupnameat+0x39
              genunix`vn_openat+0x315
              genunix`copen+0x20c

              genunix`openat+0x2a
              genunix`open+0x25
              unix`sys_syscall+0x17a
                3