jonhoo / inferno

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

Error in generated SVG: PCDATA invalid Char value (macos) #313

Closed yanns closed 6 months ago

yanns commented 7 months ago

This is to track https://github.com/flamegraph-rs/flamegraph/issues/166

I'm having the same issue on macos. The svg file is generated, but contains one invalid character:

<title>request_body-1513b174ac30212f`core::ptr::drop_in_place$LT$tower..util..map_future..MapFuture$LT$tower..util..map_response..MapResponse$LT$tower..util..map_request..MapRequest$LT$tower..util..map_err..MapErr$LT$tower..util..map_response..MapResponse$LT$tower_http..compression..service..Compression$LT$tower_http..decompression..request..service..RequestDecompression$LT$axum..routing..route..Route$GT$$GT$$C$$LT$http..response..Response$LT$tower_http..compression..body..CompressionBody$LT$tower_http..body..UnsyncBoxBody$LT$bytes..bytes..Bytes$C$alloc..boxed..Box$LT$dyn$u20$core..error..Error$u2b$core..marker..Send$u2b$core..marker..Sync$GT$$GT$$GT$$GT$$u20$as$u20$axum_core..response..into_response..IntoResponse$GT$..into_response$GT$$C$$LT$core..convert..Infallible$u20$as$u20$core..convert..Into$LT$core..convert..Infallible$GT$$GT$..into$GT$$C$axum..routing..route..Route..layer$LT$tower..builder..ServiceBuilder$LT$tower_layer..stack..Stack$LT$tower_http..decompression..request..layer..RequestDecompressionLayer$C$tower_layer..stack..Stack$LT$t (2 samples, 0.01%)</title>

There seems to be the non escaped char <0x1b>.

jonhoo commented 7 months ago

Hmm, interesting. As I pointed out in that issue, inferno seems to actually be doing the right thing here in the sense of passing through what the input provided, which suggests the issue is actually in the input provided to inferno. Could you provide the raw input data corresponding to the indicated problematic output?

yanns commented 7 months ago

Which raw file are you exactly interested into? I've used cargo flamegraph --open ... to directly use the svg file.

jonhoo commented 7 months ago

I'd need the file that gets passed to inferno-collapse-*. Usually that's something like the output of perf script.

yanns commented 7 months ago

On mac, I guess dtrace is being used. I cannot reproduce this issue right now, and I don't have the files anymore. We can either close this issue for now, and I'll re-open it if I can reproduce it. Or we can leave it open. As you want.

jonhoo commented 6 months ago

I'll close it for now then, but feel free to re-open when/if you can reproduce!