Add preferences help tooltips
authorJens Axboe <axboe@kernel.dk>
Fri, 2 Mar 2012 18:44:15 +0000 (19:44 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 2 Mar 2012 18:44:15 +0000 (19:44 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
debug.h
gfio.c
init.c

diff --git a/debug.h b/debug.h
index af71d625fc10c20433cc5a53285de61c70ad02dc..b55a1e4dc7d76d3c17e660288441ffb255960942 100644 (file)
--- 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 f39bfbff8f226f25510ba2e1412af480442af54b..34b21ab917ad348243b6f329e1872c6fcfaa49cb 100644 (file)
--- 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 f1446ca18550d4112c3d50345f309eb3ba44d87e..fd61c685e7abbcbeef3d077e1be8ab68bf767dbb 100644 (file)
--- 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, },
 };