bugfix pretty-printing and begin kprobes
[lttngtop.git] / src / cursesdisplay.c
index 62c4ba44e31c55288b03e05069f5450216a8ce5f..97069fe10299347334db8104ca36a45dc233112e 100644 (file)
@@ -520,6 +520,30 @@ gint sort_by_cpu_group_by_threads_desc(gconstpointer p1, gconstpointer p2)
        return -1;
 }
 
+void update_kprobes_display()
+{
+       int i, column;
+
+       set_window_title(center, "Kprobes Top");
+       /*
+       wattron(center, A_BOLD);
+       column = 1;
+       for (i = 0; i < 6; i++) {
+               if (toggle_virt < 0 && (i == 3 || i == 4)) {
+                       continue;
+               }
+               if (cputopview[i].sort) {
+                       wattron(center, A_UNDERLINE);
+                       pref_current_sort = i;
+               }
+               mvwprintw(center, 1, column, cputopview[i].title);
+               wattroff(center, A_UNDERLINE);
+               column += 10;
+       }
+       wattroff(center, A_BOLD);
+       */
+}
+
 void update_cputop_display()
 {
        int i;
@@ -570,6 +594,14 @@ void update_cputop_display()
                        nblinedisplayed < max_center_lines; i++) {
                tmp = g_ptr_array_index(data->process_table, i);
                current_row_offset = 1;
+               if (!opt_tid && (opt_hostname && !lookup_hostname_list(tmp->hostname)))
+                       continue;
+               if (!opt_hostname && (opt_tid && !lookup_tid_list(tmp->pid)))
+                       continue;
+               if ((opt_tid && !lookup_tid_list(tmp->tid)) &&
+                               (opt_hostname && !lookup_hostname_list(tmp->hostname)))
+                       continue;
+
                if (tmp->pid != tmp->tid)
                        if (toggle_threads == -1)
                                continue;
@@ -819,6 +851,15 @@ void update_perf()
        for (i = 0; i < data->process_table->len &&
                        nblinedisplayed < max_center_lines; i++) {
                tmp = g_ptr_array_index(data->process_table, i);
+
+               if (!opt_tid && (opt_hostname && !lookup_hostname_list(tmp->hostname)))
+                       continue;
+               if (!opt_hostname && (opt_tid && !lookup_tid_list(tmp->pid)))
+                       continue;
+               if ((opt_tid && !lookup_tid_list(tmp->tid)) &&
+                               (opt_hostname && !lookup_hostname_list(tmp->hostname)))
+                       continue;
+
                if (tmp->pid != tmp->tid)
                        if (toggle_threads == -1)
                                continue;
@@ -901,6 +942,15 @@ void update_iostream()
        for (i = list_offset; i < data->process_table->len &&
                        nblinedisplayed < max_center_lines; i++) {
                tmp = g_ptr_array_index(data->process_table, i);
+
+               if (!opt_tid && (opt_hostname && !lookup_hostname_list(tmp->hostname)))
+                       continue;
+               if (!opt_hostname && (opt_tid && !lookup_tid_list(tmp->pid)))
+                       continue;
+               if ((opt_tid && !lookup_tid_list(tmp->tid)) &&
+                               (opt_hostname && !lookup_hostname_list(tmp->hostname)))
+                       continue;
+
                if (tmp->pid != tmp->tid)
                        if (toggle_threads == -1)
                                continue;
@@ -967,6 +1017,9 @@ void update_current_view()
        case tree:
                update_cputop_display();
                break;
+       case kprobes:
+               update_kprobes_display();
+               break;
        default:
                break;
        }
@@ -1525,6 +1578,13 @@ void *handle_keyboard(void *p)
                        selected_line = 0;
                        update_current_view();
                        break;
+               case KEY_F(5):
+                       if (pref_panel_visible)
+                               toggle_pref_panel();
+                       current_view = kprobes;
+                       selected_line = 0;
+                       update_current_view();
+                       break;
                case KEY_F(10):
                case 'q':
                        reset_ncurses();
This page took 0.023818 seconds and 4 git commands to generate.