Commit 36477bb2 authored by Ell's avatar Ell

app, icons, menus: add performance-log recording to the dashboard

Add an option to record a performance log through the dashboard.
The log contains a series of samples of the dashboard variables, as
well as the full program backtrace, when available.  As such, it
essentially acts as a built-in profiler, which allows us to
correlate program execution with the information available through
the dashboard.  It is meant to be used for creating logs to
accompany perofrmance-related bug reports, as well as for profiling
GIMP during development.

The sample frequency defaults to 10 samples per second, but can be
overridden using the GIMP_PERFORMANCE_LOG_SAMPLE_FREQUENCY
environment variable.  Backtraces are included by default when
available, but can be suppressed using the
GIMP_PERFORMANCE_LOG_NO_BACKTRACE environment variable.

Logs are created through the new "record" button at the bottom of
the dashboard dialog.  When pressed, a file dialog is opened to
select the log file, and, once confirmed, data is being recorded to
the selected file.  Recording is stopped by pressing the "record"
button again (we use a highlight to indicate that recording is
active.)

While recording, the "reset" button is replaced with an "add marker"
button, which can be used to add event markers to the log.  These
can be used to mark events of interest, such as "started painting"
and "stopped painting", which then appear in the log as part of the
sample stream.  Markers are numbered sequentually, and the number
of the next (to-be-added) marker appears on the button.  Shift-
clicking the button adds an empty (description-less) marker, which
is only identified by its number; this can be used when markers
need to be added quickly.

The log is an XML file, containing some extra information (such as
the output of "$ gimp -v", and symbol information) in addition to
the samples.  The data in the file is delta-encoded to reduce the
file size, meaning that samples (as well as some other elements)
only specify the changes since the previous sample.  This adds a
necessary decoding step before data can be processed; the next
commit adds a tool that does that.

There are currently no tools to actually analyze the data -- that's
still TBD -- but at least we can start gathering it.
parent 80bf686c
......@@ -47,6 +47,24 @@ static const GimpActionEntry dashboard_actions[] =
{ "dashboard-history-duration", NULL,
NC_("dashboard-action", "_History Duration") },
{ "dashboard-log-record", GIMP_ICON_RECORD,
NC_("dashboard-action", "_Start/Stop Recording..."), NULL,
NC_("dashboard-action", "Start/stop recording performance log"),
G_CALLBACK (dashboard_log_record_cmd_callback),
GIMP_HELP_DASHBOARD_LOG_RECORD },
{ "dashboard-log-add-marker", GIMP_ICON_MARKER,
NC_("dashboard-action", "_Add Marker..."), NULL,
NC_("dashboard-action", "Add an event marker "
"to the performance log"),
G_CALLBACK (dashboard_log_add_marker_cmd_callback),
GIMP_HELP_DASHBOARD_LOG_ADD_MARKER },
{ "dashboard-log-add-empty-marker", GIMP_ICON_MARKER,
NC_("dashboard-action", "Add _Empty Marker"), NULL,
NC_("dashboard-action", "Add an empty event marker "
"to the performance log"),
G_CALLBACK (dashboard_log_add_empty_marker_cmd_callback),
GIMP_HELP_DASHBOARD_LOG_ADD_EMPTY_MARKER },
{ "dashboard-reset", GIMP_ICON_RESET,
NC_("dashboard-action", "_Reset"), NULL,
NC_("dashboard-action", "Reset cumulative data"),
......@@ -153,7 +171,12 @@ dashboard_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
gboolean recording;
recording = gimp_dashboard_log_is_recording (dashboard);
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
......@@ -195,8 +218,13 @@ dashboard_actions_update (GimpActionGroup *group,
break;
}
SET_SENSITIVE ("dashboard-log-add-marker", recording);
SET_SENSITIVE ("dashboard-log-add-empty-marker", recording);
SET_SENSITIVE ("dashboard-reset", !recording);
SET_ACTIVE ("dashboard-low-swap-space-warning",
gimp_dashboard_get_low_swap_space_warning (dashboard));
#undef SET_SENSITIVE
#undef SET_ACTIVE
}
......@@ -24,14 +24,30 @@
#include "actions-types.h"
#include "core/gimp.h"
#include "widgets/gimpdashboard.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpuimanager.h"
#include "dialogs/dialogs.h"
#include "dashboard-commands.h"
#include "gimp-intl.h"
/* local function prototypes */
static void dashboard_log_record_response (GtkWidget *dialog,
int response_id,
GimpDashboard *dashboard);
static void dashboard_log_add_marker_response (GtkWidget *dialog,
const gchar *description,
GimpDashboard *dashboard);
/* public functions */
......@@ -61,6 +77,148 @@ dashboard_history_duration_cmd_callback (GtkAction *action,
gimp_dashboard_set_history_duration (dashboard, history_duration);
}
void
dashboard_log_record_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
if (! gimp_dashboard_log_is_recording (dashboard))
{
GtkWidget *dialog;
#define LOG_RECORD_KEY "gimp-dashboard-log-record-dialog"
dialog = dialogs_get_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY);
if (! dialog)
{
GtkFileFilter *filter;
GFile *folder;
dialog = gtk_file_chooser_dialog_new (
"Record Performance Log", NULL, GTK_FILE_CHOOSER_ACTION_SAVE,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Record"), GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog),
GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_screen (
GTK_WINDOW (dialog),
gtk_widget_get_screen (GTK_WIDGET (dashboard)));
gtk_window_set_role (GTK_WINDOW (dialog),
"gimp-dashboard-log-record");
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
gtk_file_chooser_set_do_overwrite_confirmation (
GTK_FILE_CHOOSER (dialog), TRUE);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All Files"));
gtk_file_filter_add_pattern (filter, "*");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("Log Files (*.log)"));
gtk_file_filter_add_pattern (filter, "*.log");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
folder = g_object_get_data (G_OBJECT (dashboard),
"gimp-dashboard-log-record-folder");
if (folder)
{
gtk_file_chooser_set_current_folder_file (
GTK_FILE_CHOOSER (dialog), folder, NULL);
}
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
"gimp-performance.log");
g_signal_connect (dialog, "response",
G_CALLBACK (dashboard_log_record_response),
dashboard);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_true),
NULL);
gimp_help_connect (dialog, gimp_standard_help_func,
GIMP_HELP_DASHBOARD_LOG_RECORD, NULL);
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY, dialog);
g_signal_connect_object (dashboard, "destroy",
G_CALLBACK (gtk_widget_destroy),
dialog,
G_CONNECT_SWAPPED);
#undef LOG_RECORD_KEY
}
gtk_window_present (GTK_WINDOW (dialog));
}
else
{
GError *error = NULL;
if (! gimp_dashboard_log_stop_recording (dashboard, &error))
{
gimp_message_literal (
gimp_editor_get_ui_manager (GIMP_EDITOR (dashboard))->gimp,
NULL, GIMP_MESSAGE_ERROR, error->message);
}
}
}
void
dashboard_log_add_marker_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
GtkWidget *dialog;
#define LOG_ADD_MARKER_KEY "gimp-dashboard-log-add-marker-dialog"
dialog = dialogs_get_dialog (G_OBJECT (dashboard), LOG_ADD_MARKER_KEY);
if (! dialog)
{
dialog = gimp_query_string_box (
_("Add Marker"), GTK_WIDGET (dashboard),
gimp_standard_help_func, GIMP_HELP_DASHBOARD_LOG_ADD_MARKER,
_("Enter a description for the marker"),
NULL,
G_OBJECT (dashboard), "destroy",
(GimpQueryStringCallback) dashboard_log_add_marker_response,
dashboard);
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_ADD_MARKER_KEY, dialog);
#undef LOG_ADD_MARKER_KEY
}
gtk_window_present (GTK_WINDOW (dialog));
}
void
dashboard_log_add_empty_marker_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
gimp_dashboard_log_add_marker (dashboard, NULL);
}
void
dashboard_reset_cmd_callback (GtkAction *action,
gpointer data)
......@@ -81,3 +239,45 @@ dashboard_low_swap_space_warning_cmd_callback (GtkAction *action,
gimp_dashboard_set_low_swap_space_warning (dashboard, low_swap_space_warning);
}
/* private functions */
static void
dashboard_log_record_response (GtkWidget *dialog,
int response_id,
GimpDashboard *dashboard)
{
if (response_id == GTK_RESPONSE_OK)
{
GFile *file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
GError *error = NULL;
g_object_set_data_full (G_OBJECT (dashboard),
"gimp-dashboard-log-record-folder",
g_file_get_parent (file),
g_object_unref);
if (! gimp_dashboard_log_start_recording (dashboard, file, &error))
{
gimp_message_literal (
gimp_editor_get_ui_manager (GIMP_EDITOR (dashboard))->gimp,
NULL, GIMP_MESSAGE_ERROR, error->message);
g_clear_error (&error);
}
g_object_unref (file);
}
gtk_widget_destroy (dialog);
}
static void
dashboard_log_add_marker_response (GtkWidget *dialog,
const gchar *description,
GimpDashboard *dashboard)
{
gimp_dashboard_log_add_marker (dashboard, description);
}
......@@ -26,6 +26,13 @@ void dashboard_history_duration_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void dashboard_log_record_cmd_callback (GtkAction *action,
gpointer data);
void dashboard_log_add_marker_cmd_callback (GtkAction *action,
gpointer data);
void dashboard_log_add_empty_marker_cmd_callback (GtkAction *action,
gpointer data);
void dashboard_reset_cmd_callback (GtkAction *action,
gpointer data);
......
......@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <gegl.h>
#include <gio/gio.h>
......@@ -53,8 +54,12 @@
#include "widgets-types.h"
#include "core/gimp.h"
#include "core/gimp-gui.h"
#include "core/gimp-utils.h"
#include "core/gimp-parallel.h"
#include "core/gimpasync.h"
#include "core/gimpbacktrace.h"
#include "core/gimpwaitable.h"
#include "gimpactiongroup.h"
#include "gimpdocked.h"
......@@ -68,6 +73,7 @@
#include "gimpwindowstrategy.h"
#include "gimp-intl.h"
#include "gimp-version.h"
#define DEFAULT_UPDATE_INTERVAL GIMP_DASHBOARD_UPDATE_INTERVAL_0_25_SEC
......@@ -80,6 +86,9 @@
#define CPU_ACTIVE_ON /* individual cpu usage is above */ 0.75
#define CPU_ACTIVE_OFF /* individual cpu usage is below */ 0.25
#define LOG_VERSION 1
#define LOG_SAMPLE_FREQUENCY 10 /* samples per second */
typedef enum
{
......@@ -182,6 +191,7 @@ struct _VariableInfo
const gchar *title;
const gchar *description;
VariableType type;
gboolean exclude_from_log;
GimpRGB color;
VariableFunc sample_func;
VariableFunc reset_func;
......@@ -286,6 +296,20 @@ struct _GimpDashboardPrivate
GimpDashboardUpdateInteval update_interval;
GimpDashboardHistoryDuration history_duration;
gboolean low_swap_space_warning;
GOutputStream *log_output;
GError *log_error;
gint64 log_start_time;
gint log_sample_frequency;
gint log_n_samples;
gint log_n_markers;
VariableData log_variables[N_VARIABLES];
gboolean log_include_backtrace;
GimpBacktrace *log_backtrace;
GHashTable *log_addresses;
GtkWidget *log_record_button;
GtkLabel *log_add_marker_label;
};
......@@ -366,6 +390,8 @@ static void gimp_dashboard_field_set_active (GimpDashboard
gint field,
gboolean active);
static void gimp_dashboard_reset_unlocked (GimpDashboard *dashboard);
static void gimp_dashboard_reset_variables (GimpDashboard *dashboard);
static gpointer gimp_dashboard_variable_get_data (GimpDashboard *dashboard,
......@@ -382,6 +408,20 @@ static gchar * gimp_dashboard_field_to_string (GimpDashboard
gint field,
gboolean full);
static gboolean gimp_dashboard_log_printf (GimpDashboard *dashboard,
const gchar *format,
...) G_GNUC_PRINTF (2, 3);
static gboolean gimp_dashboard_log_print_escaped (GimpDashboard *dashboard,
const gchar *string);
static gint64 gimp_dashboard_log_time (GimpDashboard *dashboard);
static void gimp_dashboard_log_sample (GimpDashboard *dashboard,
gboolean variables_changed);
static void gimp_dashboard_log_update_highlight (GimpDashboard *dashboard);
static void gimp_dashboard_log_update_n_markers (GimpDashboard *dashboard);
static void gimp_dashboard_log_write_address_map (GimpAsync *async,
GimpDashboard *dashboard);
static gboolean gimp_dashboard_field_use_meter_underlay (Group group,
gint field);
......@@ -1163,6 +1203,11 @@ gimp_dashboard_constructed (GObject *object)
GimpDashboardPrivate *priv = dashboard->priv;
GimpUIManager *ui_manager;
GimpActionGroup *action_group;
GtkAction *action;
GtkWidget *button;
GtkWidget *box;
GtkWidget *image;
GtkWidget *label;
Group group;
G_OBJECT_CLASS (parent_class)->constructed (object);
......@@ -1176,7 +1221,6 @@ gimp_dashboard_constructed (GObject *object)
const GroupInfo *group_info = &groups[group];
GroupData *group_data = &priv->groups[group];
GimpToggleActionEntry entry = {};
GtkAction *action;
entry.name = g_strdup_printf ("dashboard-group-%s", group_info->name);
entry.label = g_dpgettext2 (NULL, "dashboard-group", group_info->title);
......@@ -1199,8 +1243,49 @@ gimp_dashboard_constructed (GObject *object)
g_free ((gpointer) entry.name);
}
gimp_editor_add_action_button (GIMP_EDITOR (dashboard), "dashboard",
"dashboard-reset", NULL);
button = gimp_editor_add_action_button (GIMP_EDITOR (dashboard), "dashboard",
"dashboard-log-record", NULL);
priv->log_record_button = button;
button = gimp_editor_add_action_button (GIMP_EDITOR (dashboard), "dashboard",
"dashboard-log-add-marker",
"dashboard-log-add-empty-marker",
gimp_get_extend_selection_mask (),
NULL);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (action_group),
"dashboard-log-add-marker");
g_object_bind_property (action, "sensitive",
button, "visible",
G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
image = g_object_ref (gtk_bin_get_child (GTK_BIN (button)));
gtk_container_remove (GTK_CONTAINER (button), image);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_container_add (GTK_CONTAINER (button), box);
gtk_widget_set_halign (GTK_WIDGET (box), GTK_ALIGN_CENTER);
gtk_widget_set_valign (GTK_WIDGET (box), GTK_ALIGN_CENTER);
gtk_widget_show (box);
gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
g_object_unref (image);
label = gtk_label_new (NULL);
priv->log_add_marker_label = GTK_LABEL (label);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_widget_show (label);
button = gimp_editor_add_action_button (GIMP_EDITOR (dashboard), "dashboard",
"dashboard-reset", NULL);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (action_group),
"dashboard-reset");
g_object_bind_property (action, "sensitive",
button, "visible",
G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
gimp_action_group_update (action_group, dashboard);
}
static void
......@@ -1233,6 +1318,8 @@ gimp_dashboard_dispose (GObject *object)
priv->low_swap_space_idle_id = 0;
}
gimp_dashboard_log_stop_recording (dashboard, NULL);
gimp_dashboard_reset_variables (dashboard);
G_OBJECT_CLASS (parent_class)->dispose (object);
......@@ -1577,26 +1664,39 @@ gimp_dashboard_field_menu_item_toggled (GimpDashboard *dashboard,
static gpointer
gimp_dashboard_sample (GimpDashboard *dashboard)
{
GimpDashboardPrivate *priv = dashboard->priv;
GimpDashboardUpdateInteval update_interval;
gint64 end_time;
gboolean seen_low_swap_space = FALSE;
GimpDashboardPrivate *priv = dashboard->priv;
gint64 last_sample_time = 0;
gint64 last_update_time = 0;
gboolean seen_low_swap_space = FALSE;
g_mutex_lock (&priv->mutex);
update_interval = priv->update_interval;
end_time = g_get_monotonic_time ();
while (! priv->quit)
{
gint64 update_interval;
gint64 sample_interval;
gint64 end_time;
update_interval = priv->update_interval * G_TIME_SPAN_SECOND / 1000;
if (priv->log_output)
sample_interval = G_TIME_SPAN_SECOND / priv->log_sample_frequency;
else
sample_interval = update_interval;
end_time = last_sample_time + sample_interval;
if (! g_cond_wait_until (&priv->cond, &priv->mutex, end_time) ||
priv->update_now)
{
gint64 time;
gboolean variables_changed = FALSE;
Variable variable;
Group group;
gint field;
time = g_get_monotonic_time ();
/* sample all variables */
for (variable = FIRST_VARIABLE; variable < N_VARIABLES; variable++)
{
......@@ -1611,119 +1711,123 @@ gimp_dashboard_sample (GimpDashboard *dashboard)
sizeof (VariableData));
}
/* add samples to meters */
for (group = FIRST_GROUP; group < N_GROUPS; group++)
{
const GroupInfo *group_info = &groups[group];
GroupData *group_data = &priv->groups[group];
gdouble *sample;
gdouble total = 0.0;
if (! group_info->has_meter)
continue;
/* log sample */
if (priv->log_output)
gimp_dashboard_log_sample (dashboard, variables_changed);
sample = g_new (gdouble, group_data->n_meter_values);
for (field = 0; field < group_data->n_fields; field++)
/* update gui */
if (priv->update_now ||
! priv->log_output ||
time - last_update_time >= update_interval)
{
/* add samples to meters */
for (group = FIRST_GROUP; group < N_GROUPS; group++)
{
const FieldInfo *field_info = &group_info->fields[field];
if (field_info->meter_value)
{
gdouble value;
const GroupInfo *group_info = &groups[group];
GroupData *group_data = &priv->groups[group];
gdouble *sample;
gdouble total = 0.0;
if (field_info->meter_variable)
variable = field_info->meter_variable;
else
variable = field_info->variable;
if (! group_info->has_meter)
continue;
value = gimp_dashboard_variable_to_double (dashboard,
variable);
sample = g_new (gdouble, group_data->n_meter_values);
if (value &&
gimp_dashboard_field_use_meter_underlay (group,
field))
{
value = G_MAXDOUBLE;
}
for (field = 0; field < group_data->n_fields; field++)
{
const FieldInfo *field_info = &group_info->fields[field];
if (field_info->meter_cumulative)
if (field_info->meter_value)
{
total += value;
value = total;
gdouble value;
if (field_info->meter_variable)
variable = field_info->meter_variable;
else
variable = field_info->variable;
value = gimp_dashboard_variable_to_double (dashboard,
variable);
if (value &&
gimp_dashboard_field_use_meter_underlay (group,
field))
{
value = G_MAXDOUBLE;
}
if (field_info->meter_cumulative)
{
total += value;
value = total;
}
sample[field_info->meter_value - 1] = value;
}
sample[field_info->meter_value - 1] = value;
}
}
gimp_meter_add_sample (group_data->meter, sample);
g_free (sample);
}
gimp_meter_add_sample (group_data->meter, sample);
if (variables_changed)
{
/* enqueue update source */
if (! priv->update_idle_id &&
gtk_widget_get_mapped (GTK_WIDGET (dashboard)))
{
priv->update_idle_id = g_idle_add_full (
G_PRIORITY_DEFAULT,
(GSourceFunc) gimp_dashboard_update,
dashboard, NULL);
g_free (sample);
}
/* check for low swap space */
if (priv->low_swap_space_warning &&
priv->variables[VARIABLE_SWAP_OCCUPIED].available &&
priv->variables[VARIABLE_SWAP_LIMIT].available)
if (variables_changed)
{
guint64 swap_occupied;
guint64 swap_limit;
swap_occupied = priv->variables[VARIABLE_SWAP_OCCUPIED].value.size;
swap_limit = priv->variables[VARIABLE_SWAP_LIMIT].value.size;
/* enqueue update source */
if (! priv->update_idle_id &&
gtk_widget_get_mapped (GTK_WIDGET (dashboard)))
{
priv->update_idle_id = g_idle_add_full (
G_PRIORITY_DEFAULT,
(GSourceFunc) gimp_dashboard_update,
dashboard, NULL);
}
if (! seen_low_swap_space &&
swap_occupied >= LOW_SWAP_SPACE_WARNING_ON * swap_limit)
/* check for low swap space */
if (priv->low_swap_space_warning &&
priv->variables[VARIABLE_SWAP_OCCUPIED].available &&
priv->variables[VARIABLE_SWAP_LIMIT].available)
{
if (! priv->low_swap_space_idle_id)
guint64 swap_occupied;
guint64 swap_limit;
swap_occupied = priv->variables[VARIABLE_SWAP_OCCUPIED].value.size;
swap_limit = priv->variables[VARIABLE_SWAP_LIMIT].value.size;
if (! seen_low_swap_space &&
swap_occupied >= LOW_SWAP_SPACE_WARNING_ON * swap_limit)
{
priv->low_swap_space_idle_id =
g_idle_add_full (G_PRIORITY_HIGH,
(GSourceFunc) gimp_dashboard_low_swap_space,
dashboard, NULL);
if (! priv->low_swap_space_idle_id)
{
priv->low_swap_space_idle_id =
g_idle_add_full (G_PRIORITY_HIGH,
(GSourceFunc) gimp_dashboard_low_swap_space,
dashboard, NULL);
}
seen_low_swap_space = TRUE;
}
seen_low_swap_space = TRUE;
}
else if (seen_low_swap_space &&
swap_occupied <= LOW_SWAP_SPACE_WARNING_OFF * swap_limit)
{
if (priv->low_swap_space_idle_id)
else if (seen_low_swap_space &&
swap_occupied <= LOW_SWAP_SPACE_WARNING_OFF * swap_limit)
{
g_source_remove (priv->low_swap_space_idle_id);
if (priv->low_swap_space_idle_id)
{
g_source_remove (priv->low_swap_space_idle_id);
priv->low_swap_space_idle_id = 0;
}
priv->low_swap_space_idle_id = 0;
}
seen_low_swap_space = FALSE;
seen_low_swap_space = FALSE;
}
}
}
}
priv->update_now = FALSE;
priv->update_now = FALSE;
end_time = g_get_monotonic_time () +
update_interval * G_TIME_SPAN_SECOND / 1000;
}
last_update_time = time;
}
if (priv->update_interval != update_interval)
{
update_interval = priv->update_interval;
end_time = g_get_monotonic_time () +
update_interval * G_TIME_SPAN_SECOND / 1000;
last_sample_time = time;
}
}
......@@ -2843,6 +2947,27 @@ gimp_dashboard_field_set_active (GimpDashboard *dashboard,
}
}
static void
gimp_dashboard_reset_unlocked (GimpDashboard *dashboard)
{
GimpDashboardPrivate *priv;
Group group;