allow to hide threads
authorJulien Desfossez <julien.desfossez@efficios.com>
Thu, 26 Apr 2012 19:33:12 +0000 (15:33 -0400)
committerJulien Desfossez <julien.desfossez@efficios.com>
Thu, 26 Apr 2012 19:33:12 +0000 (15:33 -0400)
Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
doc/lttngtop.1
src/cursesdisplay.c

index 5f2ba35f4fa12ab99bb0fb8968993f4213b2a2e9..83ad7614effefbae1973c2fca4e3895c579abe6f 100644 (file)
@@ -77,6 +77,9 @@ Highlights the process under the blue line to make it easy to find it across all
 \ \ \'\fBq\fR\': \fIQuit \fR
 Exit the program
 .TP 7
+\ \ \'\fBt\fR\': \fIThreads \fR
+Toggle threads display in CPUTop
+.TP 7
 \ \ \'\fBr\fR\': \fIPreferences \fR
 Display the preference menu for the current view, this menu helps select the column displayed (only in PerfTop view for now) and the column to sort, use 's' to sort and 'space' to toggle the view
 .TP 7
index 77686ca8959472cef9e29ccd013126b225bfdba9..6ff650ff83b518e72c0ee7b207dbc6664975788e 100644 (file)
@@ -57,7 +57,7 @@ char log_lines[MAX_LINE_LENGTH * MAX_LOG_LINES + MAX_LOG_LINES];
 
 int max_elements = 80;
 
-int toggle_threads = -1;
+int toggle_threads = 1;
 int toggle_pause = -1;
 
 int max_center_lines;
@@ -281,6 +281,7 @@ void update_footer()
        print_key(footer, "Space", "Highlight  ", 0);
        print_key(footer, "q", "Quit ", 0);
        print_key(footer, "r", "Pref  ", 0);
+       print_key(footer, "t", "Threads  ", toggle_threads);
        print_key(footer, "p", "Pause  ", toggle_pause);
 
        wrefresh(footer);
@@ -568,6 +569,9 @@ void update_cputop_display()
        for (i = list_offset; i < data->process_table->len &&
                        nblinedisplayed < max_center_lines; i++) {
                tmp = g_ptr_array_index(data->process_table, i);
+               if (tmp->pid != tmp->tid)
+                       if (toggle_threads == -1)
+                               continue;
 
                if (process_selected(tmp)) {
                        wattron(center, COLOR_PAIR(6));
@@ -785,6 +789,9 @@ 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 (tmp->pid != tmp->tid)
+                       if (toggle_threads == -1)
+                               continue;
 
                if (process_selected(tmp)) {
                        wattron(center, COLOR_PAIR(6));
@@ -862,6 +869,9 @@ 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 (tmp->pid != tmp->tid)
+                       if (toggle_threads == -1)
+                               continue;
 
                if (process_selected(tmp)) {
                        wattron(center, COLOR_PAIR(6));
This page took 0.026728 seconds and 4 git commands to generate.