Prevent the 1 second delay with ESC key binding
[lttngtop.git] / src / lttngtop.c
index 092ebdf99d17e1bd9af2ff31c57bf6e3414bb741..f2df936769e7f8e15190483e1673e875c1173afa 100644 (file)
@@ -88,6 +88,10 @@ void *ncurses_display(void *p)
        unsigned int current_display_index = 0;
 
        sem_wait(&bootstrap);
        unsigned int current_display_index = 0;
 
        sem_wait(&bootstrap);
+       /*
+        * Prevent the 1 second delay when we hit ESC
+        */
+       ESCDELAY = 0;
        init_ncurses();
 
        while (1) {
        init_ncurses();
 
        while (1) {
@@ -165,14 +169,14 @@ struct perfcounter *get_perf_counter(const char *name, struct processtop *proc,
        ret->visible = 1;
        g_hash_table_insert(table, (gpointer) strdup(name), ret);
 
        ret->visible = 1;
        g_hash_table_insert(table, (gpointer) strdup(name), ret);
 
-       global = g_hash_table_lookup(lttngtop.perf_list, (gpointer) name);
+       global = g_hash_table_lookup(global_perf_liszt, (gpointer) name);
        if (!global) {
                global = g_new0(struct perfcounter, 1);
                memcpy(global, ret, sizeof(struct perfcounter));
                /* by default, sort on the first perf context */
        if (!global) {
                global = g_new0(struct perfcounter, 1);
                memcpy(global, ret, sizeof(struct perfcounter));
                /* by default, sort on the first perf context */
-               if (g_hash_table_size(lttngtop.perf_list) == 0)
+               if (g_hash_table_size(global_perf_liszt) == 0)
                        global->sort = 1;
                        global->sort = 1;
-               g_hash_table_insert(lttngtop.perf_list, (gpointer) strdup(name), global);
+               g_hash_table_insert(global_perf_liszt, (gpointer) strdup(name), global);
        }
 
 end:
        }
 
 end:
@@ -307,7 +311,7 @@ error:
 void init_lttngtop()
 {
        copies = g_ptr_array_new();
 void init_lttngtop()
 {
        copies = g_ptr_array_new();
-       lttngtop.perf_list = g_hash_table_new(g_str_hash, g_str_equal);
+       global_perf_liszt = g_hash_table_new(g_str_hash, g_str_equal);
 
        sem_init(&goodtodisplay, 0, 0);
        sem_init(&goodtoupdate, 0, 1);
 
        sem_init(&goodtodisplay, 0, 0);
        sem_init(&goodtoupdate, 0, 1);
@@ -671,7 +675,7 @@ int main(int argc, char **argv)
 
        ret = check_requirements(bt_ctx);
        if (ret < 0) {
 
        ret = check_requirements(bt_ctx);
        if (ret < 0) {
-               fprintf(stderr, "[error] missing mandatory context informations\n");
+               fprintf(stderr, "[error] some mandatory contexts were missing, exiting.\n");
                goto end;
        }
 
                goto end;
        }
 
This page took 0.022638 seconds and 4 git commands to generate.