qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v3 1/3] Converting tracetool.sh to tracetool


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC PATCH v3 1/3] Converting tracetool.sh to tracetool.py
Date: Thu, 12 Jan 2012 09:33:38 +0000

2012/1/10 Lluís Vilanova <address@hidden>:
> Harsh Prateek Bora writes:
>> +class Event(object):
>> +    def __init__(self, num, line):
>> +        self.num = num
>> +        self.args = get_args(line)
>> +        self.arglist = self.args.split(',')
>> +        self.name = get_name(line)
>> +        self.argc = get_argc(line)
>> +        self.argnames = get_argnames(line)
>> +        self.sizestr = calc_sizeofargs(line)
>> +        self.fmt = get_fmt(line)
>
> This is not not extracting the event properties (e.g., disable). A set of
> strings should suffice.
>
> Arguments could be converted to an Arguments class (or similar, like
> ArgumentList) and derive the rest from there using methods (e.g., names, 
> types,
> sizestr, arglist, etc.).

Yes, that would be nice.  This will separate the trace-events parsing
from the rest of the program, which can use the Event/Argument
interface instead of parsing strings.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]