summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2025-04-12 18:56:16 -0700
committerVito Caputo <vcaputo@pengaru.com>2025-04-28 00:14:26 -0700
commitb8bcb930e265123a5e498c81b05354f0b376f503 (patch)
tree0f3f676b7465cb6d54519bc12456aca15d665d4f /src
parente6a0db25a8a4176b2b7938e8899a2232eb982f36 (diff)
charts: render mem row-columns in the overlay text
This adds overlay text rendering of the per-proc mem rows. It's not entirely complete yet, the main missing piece is the hierarchy branches need to get drawn into the per-proc mem row. It's not readily possible yet, since there's no way to inherit the offset of the tree column from the cpu row-column - and there's no way or the mem row-column to replicate the same horizontal offset, since it lacks the other columns like uesr/sys/wall to cumulatively get to the same offset.
Diffstat (limited to 'src')
-rw-r--r--src/charts.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/charts.c b/src/charts.c
index 16f8dc7..1040d45 100644
--- a/src/charts.c
+++ b/src/charts.c
@@ -903,14 +903,23 @@ static void draw_overlay_row(vwm_charts_t *charts, vwm_chart_t *chart, vmon_proc
/* skip if obviously unnecessary (this can be further improved, but this makes a big difference as-is) */
if (!deferred_pass && !chart->redraw_needed &&
- !columns_changed(charts, chart, chart->proc_cpu_columns, row, proc))
+ !columns_changed(charts, chart, chart->proc_cpu_columns, row, proc) &&
+ (proc->is_thread || !columns_changed(charts, chart, chart->proc_mem_columns, row + 1, proc)))
return;
- if (!proc->is_new) /* XXX for now always clear the row, this should be capable of being optimized in the future (if the datums driving the text haven't changed...) */
+ if (!proc->is_new) { /* XXX for now always clear the row, this should be capable of being optimized in the future (if the datums driving the text haven't changed...) */
vcr_clear_row(chart->vcr, VCR_LAYER_TEXT, row, -1, -1);
+ if (!proc->is_thread)
+ vcr_clear_row(chart->vcr, VCR_LAYER_TEXT, row + 1, -1, -1);
+ }
draw_row_columns(charts, chart, chart->proc_cpu_row_columns, 0 /* heading */, depth, row, proc);
vcr_shadow_row(chart->vcr, VCR_LAYER_TEXT, row);
+
+ if (!proc->is_thread) {
+ draw_row_columns(charts, chart, chart->proc_mem_row_columns, 0 /* heading */, depth, row + 1, proc);
+ vcr_shadow_row(chart->vcr, VCR_LAYER_TEXT, row + 1);
+ }
}
@@ -1018,6 +1027,11 @@ static void draw_chart_rest(vwm_charts_t *charts, vwm_chart_t *chart, vmon_proc_
/* extract the row from the various layers */
snowflake_row(charts, chart, (*row));
chart->snowflakes_cnt++;
+
+ /* stamp the final RSS (and whatever else we include) into chart.text_picture */
+ draw_row_columns(charts, chart, chart->snowflake_mem_row_columns, 0 /* heading */, 0 /* depth */, chart->hierarchy_end, proc);
+ vcr_shadow_row(chart->vcr, VCR_LAYER_TEXT, chart->hierarchy_end);
+
chart->hierarchy_end--;
(*row)--;
}
© All Rights Reserved