mirror of
https://git.yoctoproject.org/poky
synced 2026-09-29 07:36:20 +02:00
pybootchartgui.py: python 3.12+ regexes
$ ./scripts/pybootchartgui/pybootchartgui.py
./scripts/pybootchartgui/pybootchartgui/parsing.py:460: SyntaxWarning: invalid escape sequence '\d'
disk_regex_re = re.compile ('^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$')
./scripts/pybootchartgui/pybootchartgui/parsing.py:597: SyntaxWarning: invalid escape sequence '\['
timestamp_re = re.compile ("^\[\s*(\d+\.\d+)\s*]\s+(.*)$")
./scripts/pybootchartgui/pybootchartgui/parsing.py:598: SyntaxWarning: invalid escape sequence '\S'
split_re = re.compile ("^(\S+)\s+([\S\+_-]+) (.*)$")
./scripts/pybootchartgui/pybootchartgui/parsing.py:643: SyntaxWarning: invalid escape sequence '\@'
p = re.match ("\@ (\d+)", rest)
./scripts/pybootchartgui/pybootchartgui/draw.py:799: SyntaxWarning: invalid escape sequence '\s'
('system.cpu', 'CPU', lambda s: re.sub('model name\s*:\s*', '', s, 1)),
(From OE-Core rev: 0d94c22dd8d6c5655c2237ae740e8d9bb2adc751)
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4462724cab
commit
a1b494e651
@@ -457,7 +457,7 @@ def _parse_proc_disk_stat_log(file):
|
|||||||
not sda1, sda2 etc. The format of relevant lines should be:
|
not sda1, sda2 etc. The format of relevant lines should be:
|
||||||
{major minor name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq}
|
{major minor name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq}
|
||||||
"""
|
"""
|
||||||
disk_regex_re = re.compile ('^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$')
|
disk_regex_re = re.compile (r'^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$')
|
||||||
|
|
||||||
# this gets called an awful lot.
|
# this gets called an awful lot.
|
||||||
def is_relevant_line(linetokens):
|
def is_relevant_line(linetokens):
|
||||||
@@ -594,8 +594,8 @@ def _parse_pressure_logs(file, filename):
|
|||||||
# [ 0.039993] calling migration_init+0x0/0x6b @ 1
|
# [ 0.039993] calling migration_init+0x0/0x6b @ 1
|
||||||
# [ 0.039993] initcall migration_init+0x0/0x6b returned 1 after 0 usecs
|
# [ 0.039993] initcall migration_init+0x0/0x6b returned 1 after 0 usecs
|
||||||
def _parse_dmesg(writer, file):
|
def _parse_dmesg(writer, file):
|
||||||
timestamp_re = re.compile ("^\[\s*(\d+\.\d+)\s*]\s+(.*)$")
|
timestamp_re = re.compile (r"^\[\s*(\d+\.\d+)\s*]\s+(.*)$")
|
||||||
split_re = re.compile ("^(\S+)\s+([\S\+_-]+) (.*)$")
|
split_re = re.compile (r"^(\S+)\s+([\S\+_-]+) (.*)$")
|
||||||
processMap = {}
|
processMap = {}
|
||||||
idx = 0
|
idx = 0
|
||||||
inc = 1.0 / 1000000
|
inc = 1.0 / 1000000
|
||||||
@@ -640,7 +640,7 @@ def _parse_dmesg(writer, file):
|
|||||||
# print "foo: '%s' '%s' '%s'" % (type, func, rest)
|
# print "foo: '%s' '%s' '%s'" % (type, func, rest)
|
||||||
if type == "calling":
|
if type == "calling":
|
||||||
ppid = kernel.pid
|
ppid = kernel.pid
|
||||||
p = re.match ("\@ (\d+)", rest)
|
p = re.match (r"\@ (\d+)", rest)
|
||||||
if p is not None:
|
if p is not None:
|
||||||
ppid = float (p.group(1)) // 1000
|
ppid = float (p.group(1)) // 1000
|
||||||
# print "match: '%s' ('%g') at '%s'" % (func, ppid, time_ms)
|
# print "match: '%s' ('%g') at '%s'" % (func, ppid, time_ms)
|
||||||
@@ -742,7 +742,7 @@ def get_num_cpus(headers):
|
|||||||
cpu_model = headers.get("system.cpu")
|
cpu_model = headers.get("system.cpu")
|
||||||
if cpu_model is None:
|
if cpu_model is None:
|
||||||
return 1
|
return 1
|
||||||
mat = re.match(".*\\((\\d+)\\)", cpu_model)
|
mat = re.match(r".*\\((\\d+)\\)", cpu_model)
|
||||||
if mat is None:
|
if mat is None:
|
||||||
return 1
|
return 1
|
||||||
return max (int(mat.group(1)), 1)
|
return max (int(mat.group(1)), 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user