summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui/pybootchartgui/parsing.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/pybootchartgui/pybootchartgui/parsing.py')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/parsing.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index 004d6fb953..63a53b6b88 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -51,6 +51,7 @@ class Trace:
self.monitor_disk = None
self.cpu_pressure = []
self.io_pressure = []
+ self.mem_pressure = []
self.times = [] # Always empty, but expected by draw.py when drawing system charts.
if len(paths):
@@ -130,7 +131,7 @@ class Trace:
def compile(self, writer):
def find_parent_id_for(pid):
- if pid is 0:
+ if pid == 0:
return 0
ppid = self.parent_map.get(pid)
if ppid:
@@ -564,6 +565,8 @@ def _parse_pressure_logs(file, filename):
pressure_stats = []
if filename == "cpu.log":
SamplingClass = CPUPressureSample
+ elif filename == "memory.log":
+ SamplingClass = MemPressureSample
else:
SamplingClass = IOPressureSample
for time, lines in _parse_timed_blocks(file):
@@ -769,6 +772,8 @@ def _do_parse(writer, state, filename, file):
state.cpu_pressure = _parse_pressure_logs(file, name)
elif name == "io.log":
state.io_pressure = _parse_pressure_logs(file, name)
+ elif name == "memory.log":
+ state.mem_pressure = _parse_pressure_logs(file, name)
elif not filename.endswith('.log'):
_parse_bitbake_buildstats(writer, state, filename, file)
t2 = time.process_time()