Bug 204773
Summary: | Dev mode timelines are missing some kprobes in 5.5 | ||
---|---|---|---|
Product: | Tools | Reporter: | Todd Brandt (todd.e.brandt) |
Component: | pm-graph | Assignee: | Virtual Assignee for pm-graph (tools_pm_graph) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.3.0-rc7 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Todd Brandt
2019-09-04 20:42:07 UTC
Fix has been created and submitted upstream: https://marc.info/?l=linux-pm&m=156763119501263&w=2 diff --git a/tools/power/pm-graph/sleepgraph.py b/tools/power/pm-graph/sleepgraph.py index 1794c79a7d1b..f7d1c1f62f86 100755 --- a/tools/power/pm-graph/sleepgraph.py +++ b/tools/power/pm-graph/sleepgraph.py @@ -667,19 +667,19 @@ class SystemValues: if linesack < linesout: return False return True - def setVal(self, val, file, mode='w'): + def setVal(self, val, file): if not os.path.exists(file): return False try: - fp = open(file, mode) - fp.write(val) + fp = open(file, 'wb', 0) + fp.write(val.encode()) fp.flush() fp.close() except: return False return True - def fsetVal(self, val, path, mode='w'): - return self.setVal(val, self.tpath+path, mode) + def fsetVal(self, val, path): + return self.setVal(val, self.tpath+path) def getVal(self, file): res = '' if not os.path.exists(file): |