Skip to contentSkip to conversation

perf trace: Filter out gnome-terminal* parent

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Feb 15, 2019 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  ca2da70c411c4022a479d36063f0d0a862ea636e
Gitweb:     https://git.kernel.org/tip/ca2da70c411c4022a479d36063f0d0a862ea636e
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 12 Feb 2019 13:51:49 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 14 Feb 2019 15:18:04 -0300

perf trace: Filter out gnome-terminal* parent

Just like it does with 'sshd', to reduce the feedback loop when doing system wide tracing on on a gnome GUI.

Need to figure out how to auto-filter the calls to other UI components tho.

---
 tools/perf/builtin-trace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/builtin-trace.c +2 -1
index a9b51f59ab54..68a01e624ad3 100644
@@ -2771,7 +2771,8 @@ static int trace__set_filter_loop_pids(struct trace *trace)
 		if (parent == NULL)
 			break;
 
-		if (!strcmp(thread__comm_str(parent), "sshd")) {
+		if (!strcmp(thread__comm_str(parent), "sshd") ||
+		    strstarts(thread__comm_str(parent), "gnome-terminal")) {
 			pids[nr++] = parent->tid;
 			break;
 		}