Blame SOURCES/sos-bz1760737-kernel-trace-disabled.patch

39d9b0
From 55949fb88c492eec542c69157a8763ddb3555345 Mon Sep 17 00:00:00 2001
39d9b0
From: MIZUTA Takeshi <mizuta.takeshi@fujitsu.com>
39d9b0
Date: Thu, 6 Jun 2019 18:42:40 +0900
39d9b0
Subject: [PATCH] [plugins] Change forbidden_path from partial-match to
39d9b0
 exact-match
39d9b0
39d9b0
forbidden_path is evaluated on partial-match.
39d9b0
However, it will be correct to evaluate on exact-match.
39d9b0
39d9b0
Closes: #1692
39d9b0
Resolves: #1695
39d9b0
39d9b0
Signed-off-by: MIZUTA Takeshi <mizuta.takeshi@fujitsu.com>
39d9b0
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
39d9b0
---
39d9b0
 sos/plugins/__init__.py | 2 +-
39d9b0
 1 file changed, 1 insertion(+), 1 deletion(-)
39d9b0
39d9b0
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
39d9b0
index 56af847a..41f4f58c 100644
39d9b0
--- a/sos/plugins/__init__.py
39d9b0
+++ b/sos/plugins/__init__.py
39d9b0
@@ -64,7 +64,7 @@ def _mangle_command(command, name_max):
39d9b0
 
39d9b0
 
39d9b0
 def _path_in_path_list(path, path_list):
39d9b0
-    return any(p in path for p in path_list)
39d9b0
+    return any(p == path for p in path_list)
39d9b0
 
39d9b0
 
39d9b0
 def _node_type(st):
39d9b0
-- 
39d9b0
2.21.0
39d9b0
39d9b0
From d2d5b9da6d4af7ead8a47468db0bbfcc8fb2b5bf Mon Sep 17 00:00:00 2001
39d9b0
From: Pavel Moravec <pmoravec@redhat.com>
39d9b0
Date: Thu, 26 Sep 2019 10:50:18 +0200
39d9b0
Subject: [PATCH] [kernel] Don't collect trace file by default
39d9b0
39d9b0
Updates the plugin to don't collect trace file by default. Collecting
39d9b0
trace file may take a lot of time, so trace file is not collected
39d9b0
by default, and use the new plug-in option when collecting.
39d9b0
39d9b0
Original author: MIZUTA Takeshi <mizuta.takeshi@fujitsu.com>
39d9b0
39d9b0
Closes: #1688
39d9b0
Resolves: #1800
39d9b0
39d9b0
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
39d9b0
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
39d9b0
---
39d9b0
 sos/plugins/kernel.py | 6 +++++-
39d9b0
 1 file changed, 5 insertions(+), 1 deletion(-)
39d9b0
39d9b0
diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py
39d9b0
index bf3c3dea..b498f55e 100644
39d9b0
--- a/sos/plugins/kernel.py
39d9b0
+++ b/sos/plugins/kernel.py
39d9b0
@@ -23,7 +23,8 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
39d9b0
     sys_module = '/sys/module'
39d9b0
 
39d9b0
     option_list = [
39d9b0
-        ("with-timer", "gather /proc/timer* statistics", "slow", False)
39d9b0
+        ("with-timer", "gather /proc/timer* statistics", "slow", False),
39d9b0
+        ("trace", "gather /sys/kernel/debug/tracing/trace file", "slow", False)
39d9b0
     ]
39d9b0
 
39d9b0
     def get_bpftool_prog_ids(self, prog_file):
39d9b0
@@ -139,6 +139,9 @@ class Kernel(Plugin, RedHatPlugin, Debia
39d9b0
             # and may also cause softlockups
39d9b0
             self.add_copy_spec("/proc/timer*")
39d9b0
 
39d9b0
+        if not self.get_option("trace"):
39d9b0
+            self.add_forbidden_path("/sys/kernel/debug/tracing/trace")
39d9b0
+
39d9b0
         # collect list of eBPF programs and maps and their dumps
39d9b0
         prog_file = self.get_cmd_output_now("bpftool -j prog list")
39d9b0
         for prog_id in self.get_bpftool_prog_ids(prog_file):
39d9b0
-- 
39d9b0
2.21.0
39d9b0