X-Git-Url: https://git.lttng.org/?p=lttngtop.git;a=blobdiff_plain;f=src%2Fcursesdisplay.c;h=97069fe10299347334db8104ca36a45dc233112e;hp=62c4ba44e31c55288b03e05069f5450216a8ce5f;hb=fbbda4dac5b23757921dea8e2992cbb6bff5775f;hpb=1402044a1577c9b62b60f64fdb48ae9524be458c diff --git a/src/cursesdisplay.c b/src/cursesdisplay.c index 62c4ba4..97069fe 100644 --- a/src/cursesdisplay.c +++ b/src/cursesdisplay.c @@ -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();