commit cd9ee4c4449775a2f867acf31c84b7fe4b132ad5
parent c353d1aaebdcea5137c17254195616c9864d04cc
Author: Brendan Gregg <brendan.d.gregg@gmail.com>
Date: Wed, 8 Nov 2023 10:26:19 +1100
Merge pull request #321 from matthew-olson-intel/low_sample_warn
Warn if low stack counts
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/flamegraph.pl b/flamegraph.pl
@@ -718,6 +718,12 @@ foreach (@SortedData) {
}
flow($last, [], $time, $delta);
+if ($countname eq "samples") {
+ # If $countname is used, it's likely that we're not measuring in stack samples
+ # (e.g. time could be the unit), so don't warn.
+ warn "Stack count is low ($time). Did something go wrong?\n" if $time < 100;
+}
+
warn "Ignored $ignored lines with invalid format\n" if $ignored;
unless ($time) {
warn "ERROR: No stack counts found\n";