From 8f2e64ec05324e3ba5e10082eaf134bc2188972a Mon Sep 17 00:00:00 2001 From: Brendan Gregg Date: Thu, 17 Aug 2017 17:42:22 -0700 Subject: [PATCH] fix #140 --- flamegraph.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flamegraph.pl b/flamegraph.pl index 261c5794..43ae8e3d 100755 --- a/flamegraph.pl +++ b/flamegraph.pl @@ -978,10 +978,11 @@ sub flow { // Step through frames saving only the biggest bottom-up frames // thanks to the sort order. This relies on the tree property // where children are always smaller than their parents. + var fudge = 0.0001; // JavaScript floating point for (var k in keys) { var x = parseFloat(keys[k]); var w = matches[keys[k]]; - if (x >= lastx + lastw) { + if (x >= lastx + lastw - fudge) { count += w; lastx = x; lastw = w;