diff options
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r-- | tools/perf/builtin-trace.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index b4e420c41831..68a01e624ad3 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -1041,6 +1041,9 @@ static const size_t trace__entry_str_size = 2048; | |||
1041 | 1041 | ||
1042 | static struct file *thread_trace__files_entry(struct thread_trace *ttrace, int fd) | 1042 | static struct file *thread_trace__files_entry(struct thread_trace *ttrace, int fd) |
1043 | { | 1043 | { |
1044 | if (fd < 0) | ||
1045 | return NULL; | ||
1046 | |||
1044 | if (fd > ttrace->files.max) { | 1047 | if (fd > ttrace->files.max) { |
1045 | struct file *nfiles = realloc(ttrace->files.table, (fd + 1) * sizeof(struct file)); | 1048 | struct file *nfiles = realloc(ttrace->files.table, (fd + 1) * sizeof(struct file)); |
1046 | 1049 | ||
@@ -2768,7 +2771,8 @@ static int trace__set_filter_loop_pids(struct trace *trace) | |||
2768 | if (parent == NULL) | 2771 | if (parent == NULL) |
2769 | break; | 2772 | break; |
2770 | 2773 | ||
2771 | if (!strcmp(thread__comm_str(parent), "sshd")) { | 2774 | if (!strcmp(thread__comm_str(parent), "sshd") || |
2775 | strstarts(thread__comm_str(parent), "gnome-terminal")) { | ||
2772 | pids[nr++] = parent->tid; | 2776 | pids[nr++] = parent->tid; |
2773 | break; | 2777 | break; |
2774 | } | 2778 | } |