[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] xen-ringwatch issues
Hi Ian, OK, I have followed your suggestions and created a new patch this new patch does fix the issue fully for the negative numbers I didnt run the patch on 64bit OS since xenserver has 32bit Dom0 but i think it is safe to add here is the patch in case you or anyone want to have look at and if you have comments on before i send it *** xen-ringwatch.old  2015-01-09 17:05:55.000000000 -0500 --- xen-ringwatch.new  2015-01-09 17:06:14.000000000 -0500 *************** *** 238,244 ****        match = cls._pattern.search(line)        if not match:          raise Exception, "Malformed %s input: %s" % \ !           (cls.__name__, repr(s))        i = iter(match.groups())        for k in i: --- 238,244 ----        match = cls._pattern.search(line)        if not match:          raise Exception, "Malformed %s input: %s" % \ !           (cls.__name__, repr(line))        i = iter(match.groups())        for k in i: *************** *** 251,263 ****    class Req(Queue): !     _pattern = Pattern("req (prod) (\d+) (cons) (\d+) (event) (\d+)")      def __init__(self, prod, cons, event, **d):        RingState.Queue.__init__(self, **d)        self.prod Â= int(prod)        self.cons Â= int(cons)        self.event = int(event)      def __repr__(self):        return "%s(prod=%d, cons=%d, event=%d)" % \ --- 251,270 ----    class Req(Queue): !     _pattern = Pattern("req (prod) (\d+) (cons) ([-]*\d+) (event) (\d+)")      def __init__(self, prod, cons, event, **d):        RingState.Queue.__init__(self, **d)        self.prod Â= int(prod)        self.cons Â= int(cons)        self.event = int(event) + +       if self.cons < 0: +         Âself.cons = 4294967296 + self.cons +       if self.prod < 0: +         Âself.prod = 4294967296 + self.prod +       if self.event < 0: +         Âself.event = 4294967296 + self.event      def __repr__(self):        return "%s(prod=%d, cons=%d, event=%d)" % \ *************** *** 274,287 ****    class Rsp(Queue): !     _pattern = Pattern("rsp (prod) (\d+) (pvt) (\d+) (event) (\d+)")      def __init__(self, prod, pvt, event, **d):        RingState.Queue.__init__(self, **d)        self.prod Â= int(prod)        self.pvt  = int(pvt)        self.event = int(event) !      def __repr__(self):        return "%s(prod=%d, pvt=%d, event=%d)" % \          (type(self).__name__, self.prod, self.pvt, self.event) --- 281,301 ----    class Rsp(Queue): !     _pattern = Pattern("rsp (prod) (\d+) (pvt) ([-]*\d+) (event) (\d+)")      def __init__(self, prod, pvt, event, **d):        RingState.Queue.__init__(self, **d)        self.prod Â= int(prod)        self.pvt  = int(pvt)        self.event = int(event) ! !       if self.pvt < 0: !         Âself.pvt = 4294967296 + self.pvt !       if self.prod < 0: !         Âself.prod = 4294967296 + self.prod !       if self.event < 0: !         Âself.event = 4294967296 + self.event !      def __repr__(self):        return "%s(prod=%d, pvt=%d, event=%d)" % \          (type(self).__name__, self.prod, self.pvt, self.event) Thanks On Fri, Jan 9, 2015 at 5:10 AM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote: On Thu, 2015-01-08 at 14:07 -0500, moftah moftah wrote: _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |