[Top][All Lists]
[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
- Re: [Qemu-devel] [RFC PATCH v3 2/3] simpletrace-v2: Handle variable number/size of elements per trace record., (continued)
[Qemu-devel] [RFC PATCH v3 1/3] Converting tracetool.sh to tracetool.py, Harsh Prateek Bora, 2012/01/10
Re: [Qemu-devel] [RFC PATCH v3 1/3] Converting tracetool.sh to tracetool.py,
Stefan Hajnoczi <=
Re: [Qemu-devel] [RFC PATCH v3 1/3] Converting tracetool.sh to tracetool.py, Stefan Hajnoczi, 2012/01/11
Re: [Qemu-devel] [RFC PATCH v3 1/3] Converting tracetool.sh to tracetool.py, Stefan Hajnoczi, 2012/01/11