From 0b8d11ed135ac467c071c2ae0fe4f3a69a3b8feb Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 2 Mar 2012 19:44:15 +0100 Subject: [PATCH] Add preferences help tooltips Signed-off-by: Jens Axboe --- debug.h | 1 + gfio.c | 3 ++- init.c | 70 +++++++++++++++++++++++++++++++++++++++++++++------------ 3 files changed, 59 insertions(+), 15 deletions(-) diff --git a/debug.h b/debug.h index af71d625..b55a1e4d 100644 --- a/debug.h +++ b/debug.h @@ -27,6 +27,7 @@ extern unsigned int fio_debug_jobno, *fio_debug_jobp; #ifdef FIO_INC_DEBUG struct debug_level { const char *name; + const char *help; unsigned long shift; unsigned int jobno; }; diff --git a/gfio.c b/gfio.c index f39bfbff..34b21ab9 100644 --- a/gfio.c +++ b/gfio.c @@ -712,7 +712,7 @@ static void preferences(GtkWidget *w, gpointer data) GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); - frame = gtk_frame_new("Debug"); + frame = gtk_frame_new("Debug logging"); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), frame, FALSE, FALSE, 5); box = gtk_hbox_new(FALSE, 6); gtk_container_add(GTK_CONTAINER(frame), box); @@ -721,6 +721,7 @@ static void preferences(GtkWidget *w, gpointer data) for (i = 0; i < FD_DEBUG_MAX; i++) { buttons[i] = gtk_check_button_new_with_label(debug_levels[i].name); + gtk_widget_set_tooltip_text(buttons[i], debug_levels[i].help); gtk_box_pack_start(GTK_BOX(box), buttons[i], FALSE, FALSE, 6); } diff --git a/init.c b/init.c index f1446ca1..fd61c685 100644 --- a/init.c +++ b/init.c @@ -1216,20 +1216,62 @@ static void usage(const char *name) #ifdef FIO_INC_DEBUG struct debug_level debug_levels[] = { - { .name = "process", .shift = FD_PROCESS, }, - { .name = "file", .shift = FD_FILE, }, - { .name = "io", .shift = FD_IO, }, - { .name = "mem", .shift = FD_MEM, }, - { .name = "blktrace", .shift = FD_BLKTRACE }, - { .name = "verify", .shift = FD_VERIFY }, - { .name = "random", .shift = FD_RANDOM }, - { .name = "parse", .shift = FD_PARSE }, - { .name = "diskutil", .shift = FD_DISKUTIL }, - { .name = "job", .shift = FD_JOB }, - { .name = "mutex", .shift = FD_MUTEX }, - { .name = "profile", .shift = FD_PROFILE }, - { .name = "time", .shift = FD_TIME }, - { .name = "net", .shift = FD_NET }, + { .name = "process", + .help = "Process creation/exit logging", + .shift = FD_PROCESS, + }, + { .name = "file", + .help = "File related action logging", + .shift = FD_FILE, + }, + { .name = "io", + .help = "IO and IO engine action logging (offsets, queue, completions, etc)", + .shift = FD_IO, + }, + { .name = "mem", + .help = "Memory allocation/freeing logging", + .shift = FD_MEM, + }, + { .name = "blktrace", + .help = "blktrace action logging", + .shift = FD_BLKTRACE, + }, + { .name = "verify", + .help = "IO verification action logging", + .shift = FD_VERIFY, + }, + { .name = "random", + .help = "Random generation logging", + .shift = FD_RANDOM, + }, + { .name = "parse", + .help = "Parser logging", + .shift = FD_PARSE, + }, + { .name = "diskutil", + .help = "Disk utility logging actions", + .shift = FD_DISKUTIL, + }, + { .name = "job", + .help = "Logging related to creating/destroying jobs", + .shift = FD_JOB, + }, + { .name = "mutex", + .help = "Mutex logging", + .shift = FD_MUTEX + }, + { .name = "profile", + .help = "Logging related to profiles", + .shift = FD_PROFILE, + }, + { .name = "time", + .help = "Logging related to time keeping functions", + .shift = FD_TIME, + }, + { .name = "net", + .help = "Network logging", + .shift = FD_NET, + }, { .name = NULL, }, }; -- 2.25.1