summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2024-11-13 22:46:44 -0800
committerVito Caputo <vcaputo@pengaru.com>2024-11-13 22:54:31 -0800
commit2ba5bd244dabfc425563cf7615c702c60deda584 (patch)
tree0e52f52ddb04bc0510fe9f04fdcfcd3201eb90ca
parentbc29b5fe35e5b9fae05b0ff78fb76d0e0f8e74cd (diff)
charts: fix skipped overlay render in stalls when deferred
The deferred pass only enters draw_chart() once regardless of this_sample_duration, with the idx always 0. So when this_sample_duration > 1 (stalls/repeated samples), the conditional draw_overlay_row() would only get entered in the non-deferred passes in deferred mode, which are short-circuited within draw_overlay_row() because we don't want to do render that stuff in those passes in deferred mode. The fix is trivial; always enter draw_overlay_row() for the deferred pass. This fixes a cosmetic artifact where you'd see stale / missing overlays in the hierarchy rows of output, when sample durations were falling behind schedule enough for this_sample_duration to be greater than 1.
-rw-r--r--src/charts.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/charts.c b/src/charts.c
index 29547f7..0e000df 100644
--- a/src/charts.c
+++ b/src/charts.c
@@ -958,9 +958,10 @@ static void draw_chart_rest(vwm_charts_t *charts, vwm_chart_t *chart, vmon_proc_
charts->inv_total_delta);
}
- /* only try draw the overlay on the last draw within a duration */
- if (sample_duration_idx == (charts->this_sample_duration - 1))
+ /* unless a deferred pass, only try draw the overlay on the last draw within a duration */
+ if (deferred_pass || sample_duration_idx == (charts->this_sample_duration - 1))
draw_overlay_row(charts, chart, proc, *depth, *row, deferred_pass);
+
(*row)++;
/* recur any threads first, then any children processes */
© All Rights Reserved