summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/pybootchartgui')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/parsing.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index 63a53b6b88..144a16c723 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -457,7 +457,7 @@ def _parse_proc_disk_stat_log(file):
457 not sda1, sda2 etc. The format of relevant lines should be: 457 not sda1, sda2 etc. The format of relevant lines should be:
458 {major minor name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq} 458 {major minor name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq}
459 """ 459 """
460 disk_regex_re = re.compile ('^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$') 460 disk_regex_re = re.compile (r'^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$')
461 461
462 # this gets called an awful lot. 462 # this gets called an awful lot.
463 def is_relevant_line(linetokens): 463 def is_relevant_line(linetokens):
@@ -594,8 +594,8 @@ def _parse_pressure_logs(file, filename):
594# [ 0.039993] calling migration_init+0x0/0x6b @ 1 594# [ 0.039993] calling migration_init+0x0/0x6b @ 1
595# [ 0.039993] initcall migration_init+0x0/0x6b returned 1 after 0 usecs 595# [ 0.039993] initcall migration_init+0x0/0x6b returned 1 after 0 usecs
596def _parse_dmesg(writer, file): 596def _parse_dmesg(writer, file):
597 timestamp_re = re.compile ("^\[\s*(\d+\.\d+)\s*]\s+(.*)$") 597 timestamp_re = re.compile (r"^\[\s*(\d+\.\d+)\s*]\s+(.*)$")
598 split_re = re.compile ("^(\S+)\s+([\S\+_-]+) (.*)$") 598 split_re = re.compile (r"^(\S+)\s+([\S\+_-]+) (.*)$")
599 processMap = {} 599 processMap = {}
600 idx = 0 600 idx = 0
601 inc = 1.0 / 1000000 601 inc = 1.0 / 1000000
@@ -640,7 +640,7 @@ def _parse_dmesg(writer, file):
640# print "foo: '%s' '%s' '%s'" % (type, func, rest) 640# print "foo: '%s' '%s' '%s'" % (type, func, rest)
641 if type == "calling": 641 if type == "calling":
642 ppid = kernel.pid 642 ppid = kernel.pid
643 p = re.match ("\@ (\d+)", rest) 643 p = re.match (r"\@ (\d+)", rest)
644 if p is not None: 644 if p is not None:
645 ppid = float (p.group(1)) // 1000 645 ppid = float (p.group(1)) // 1000
646# print "match: '%s' ('%g') at '%s'" % (func, ppid, time_ms) 646# print "match: '%s' ('%g') at '%s'" % (func, ppid, time_ms)
@@ -742,7 +742,7 @@ def get_num_cpus(headers):
742 cpu_model = headers.get("system.cpu") 742 cpu_model = headers.get("system.cpu")
743 if cpu_model is None: 743 if cpu_model is None:
744 return 1 744 return 1
745 mat = re.match(".*\\((\\d+)\\)", cpu_model) 745 mat = re.match(r".*\\((\\d+)\\)", cpu_model)
746 if mat is None: 746 if mat is None:
747 return 1 747 return 1
748 return max (int(mat.group(1)), 1) 748 return max (int(mat.group(1)), 1)