You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just posting this idea before I forget it. The first thing I look at in a CPU flame graph is the sample count, as if it's low (e.g., <100) then something likely went wrong based on the common frequency of CPU profiling. This happens when the workload stops but the end user doesn't realize it, and they create a flame graph of an idle system by mistake, but still don't realize it and spend time examining idle initialization and kernel code paths.
The idea is to at least print a warning during flame graph generation about low sample counts, e.g., using the warn function:
my $stackcount = scalar @Data;
warn "Stack count is low ($stackcount) did something go wrong?\n" if $stackcount < 100;
Maybe it should be visible in the SVG too? Would have to play with it to see. Note that not all flame graphs are CPU stack samples, some are time based where it's more plausible to have fewer than 100 unique stacks. Maybe we can tell the two apart by seeing if --countname option was used.
The text was updated successfully, but these errors were encountered:
OK, I implemented this in #321. Pretty simple implementation, but I made one small modification: instead of warning on the number of stacks, it warns on the total number of samples.
I could see this being improved slightly by also warning in the SVG: this could be done by modifying $samples_txt further down to include a warning.
Just posting this idea before I forget it. The first thing I look at in a CPU flame graph is the sample count, as if it's low (e.g., <100) then something likely went wrong based on the common frequency of CPU profiling. This happens when the workload stops but the end user doesn't realize it, and they create a flame graph of an idle system by mistake, but still don't realize it and spend time examining idle initialization and kernel code paths.
The idea is to at least print a warning during flame graph generation about low sample counts, e.g., using the warn function:
Maybe it should be visible in the SVG too? Would have to play with it to see. Note that not all flame graphs are CPU stack samples, some are time based where it's more plausible to have fewer than 100 unique stacks. Maybe we can tell the two apart by seeing if --countname option was used.
The text was updated successfully, but these errors were encountered: