Two fixes for handling of demangled C++ symbols #4

Merged
merged 2 commits into from Jun 15, 2012

Projects

None yet

2 participants

@rysto32

Here a two small fixes that make FlameGraph handle demangled symbols better. The first uses semicolons instead of commas to separate frames in the flamegraph.pl input, so avoid an ambiguity with a frame like foo(int, int). The second escapes <> in the output after the string is truncated. Currently it truncates after escaping, and I have seen cases where the string is truncated half-way through an escape sequence, causing malformed output.

Ryan Stone added some commits Jun 14, 2012
Ryan Stone Use a semicolon to separate frames
Use a semicolon instead of a comma to separate frames in the
flamegraph input.  Commas can appear in demangled C++ function
names (e.g. foo(int, int) ) so using commas to separate frames
can confuse the parser.
02b07ad
Ryan Stone Escape strings after they have been truncated.
Don't truncate strings after they have been escaped.  If you do,
there is a chance you will happen to truncate half-way through
an escape sequence, causing malformed output.
93f5b19
@brendangregg brendangregg merged commit fc4a545 into brendangregg:master Jun 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment