From 245e0d229518830a9a0398fbe190fb2edffaf0bb Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 1 Jan 2025 16:25:15 -0800 Subject: charts: expose vmon_dump_procs() in a trivial wrapper libvmon isn't really exposed to the front-end code beyond charts, so it's this or a vwm_charts_t.vmon accessor and callers including libvmon/vmon.h (yuck). --- src/charts.c | 6 ++++++ src/charts.h | 3 +++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/charts.c b/src/charts.c index 34caf58..cc42469 100644 --- a/src/charts.c +++ b/src/charts.c @@ -1454,3 +1454,9 @@ int vwm_charts_update(vwm_charts_t *charts, int *desired_delay_us) return ret; } + + +void charts_vmon_dump_procs(vwm_charts_t *charts, FILE *out) +{ + vmon_dump_procs(&charts->vmon, out); +} diff --git a/src/charts.h b/src/charts.h index 888fc9d..e42d31c 100644 --- a/src/charts.h +++ b/src/charts.h @@ -1,6 +1,8 @@ #ifndef _CHARTS_H #define _CHARTS_H +#include /* just for charts_vmon_dump_procs() */ + #ifdef USE_XLIB #include /* this is just for XserverRegion/vwm_chart_compose_xdamage() */ #include "xserver.h" @@ -20,6 +22,7 @@ void vwm_charts_rate_decrease(vwm_charts_t *charts); void vwm_charts_rate_set(vwm_charts_t *charts, unsigned hertz); void vwm_charts_marker_distance_set(vwm_charts_t *charts, unsigned distance); int vwm_charts_update(vwm_charts_t *charts, int *desired_delay_us); +void charts_vmon_dump_procs(vwm_charts_t *charts, FILE *out); vwm_chart_t * vwm_chart_create(vwm_charts_t *charts, int pid, int width, int height, const char *name); void vwm_chart_destroy(vwm_charts_t *charts, vwm_chart_t *chart); -- cgit v1.2.3