Commit 2dba57a0 authored by aumgn's avatar aumgn
Browse files

[schedstats] Fix schedstatparser

parent 5419e478
import re
import sys
SCHEDSTAT_VERSION = 15
version_re = re.compile('^version ([0-9]+)$')
......@@ -14,14 +15,14 @@ def check_version(match):
empty_re = re.compile('^\s*$')
class Cpu:
RE = re.compile('^cpu([0-9]+) ([0-9 ]+)$')
RE = re.compile('^cpu([0-9]+) ([\-0-9 ]+)$')
def __init__(self, match):
self.index = int(match.group(1))
self.stats = [ int(stat) for stat in match.group(2).split(" ") ]
self.domains = {}
class Domain:
RE = re.compile('^domain([0-9]+) ([0-9a-f,]+) ([0-9 ]+)$')
RE = re.compile('^domain([0-9]+) ([\-0-9a-f,]+) ([\-0-9 ]+)$')
def __init__(self, match):
self.index = int(match.group(1))
self.cpusmask = [ int(part, 16) for part in match.group(2).split(",") ]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment