diff --git a/src/flamegraph/merge.rs b/src/flamegraph/merge.rs
index dfd66e80..85c605fe 100644
--- a/src/flamegraph/merge.rs
+++ b/src/flamegraph/merge.rs
@@ -124,9 +124,6 @@ where
let mut prev_line = None;
for line in lines {
let mut line = line.trim();
- if line.is_empty() {
- continue;
- }
if !suppress_sort_check {
if let Some(prev_line) = prev_line {
diff --git a/src/flamegraph/mod.rs b/src/flamegraph/mod.rs
index 2e84df70..35c4c36f 100644
--- a/src/flamegraph/mod.rs
+++ b/src/flamegraph/mod.rs
@@ -394,6 +394,11 @@ where
W: Write,
{
let mut reversed = StrStack::new();
+ let lines = lines
+ .into_iter()
+ .map(|line| line.trim())
+ .filter(|line| !(line.is_empty() || line.starts_with("# ")));
+
let (mut frames, time, ignored, delta_max) = if opt.reverse_stack_order {
if opt.no_sort {
warn!(
diff --git a/tests/data/flamegraph/austin/flame.svg b/tests/data/flamegraph/austin/flame.svg
new file mode 100644
index 00000000..d19591cc
--- /dev/null
+++ b/tests/data/flamegraph/austin/flame.svg
@@ -0,0 +1,114 @@
+
diff --git a/tests/data/flamegraph/austin/flames.txt b/tests/data/flamegraph/austin/flames.txt
new file mode 100644
index 00000000..ff14155f
--- /dev/null
+++ b/tests/data/flamegraph/austin/flames.txt
@@ -0,0 +1,8 @@
+# austin: 3.3.0
+# interval: 100
+# mode: wall
+
+P6360;T6360;:_install_external_importers:1187;:_find_and_load:1007;:_find_and_load_unlocked:986;:_load_unlocked:680;:exec_module:838;::35;:_find_and_load:1007;:_find_and_load_unlocked:986;:_load_unlocked:680;:exec_module:768;:_call_with_frames_removed:228 105
+P6360;T6360;:_install_external_importers:1187;:_find_and_load:1007;:_find_and_load_unlocked:986;:_load_unlocked:680;:exec_module:838;::828 186
+
+# duration: 23873
diff --git a/tests/data/flamegraph/bad-lines/bad-lines.txt b/tests/data/flamegraph/bad-lines/bad-lines.txt
index 872e1f6d..aaa878e6 100644
--- a/tests/data/flamegraph/bad-lines/bad-lines.txt
+++ b/tests/data/flamegraph/bad-lines/bad-lines.txt
@@ -6,3 +6,5 @@ cksum;main;cksum 19
THIS IS A BAD FRACTIONAL LINE 12V.43
noploop;[unknown] 2
noploop;main 274
+
+noploop;main 274
diff --git a/tests/flamegraph.rs b/tests/flamegraph.rs
index 9ce8ae77..5ce9a9af 100644
--- a/tests/flamegraph.rs
+++ b/tests/flamegraph.rs
@@ -883,3 +883,11 @@ fn flamegraph_flamechart() {
test_flamegraph(input_file, expected_result_file, opts).unwrap();
}
+
+#[test]
+fn flamegraph_austin() {
+ let input_file = "./tests/data/flamegraph/austin/flames.txt";
+ let expected_result_file = "./tests/data/flamegraph/austin/flame.svg";
+ let opts = flamegraph::Options::default();
+ test_flamegraph(input_file, expected_result_file, opts).unwrap();
+}