2012/1/10 Lluís Vilanova <vilan...@ac.upc.edu>: > 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