-
Notifications
You must be signed in to change notification settings - Fork 39
parse traces from the common clock infrastructure #271
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you squash the two commits together? That way we don't break git bisect
by having a commit where the tests fail.
trappy/common_clk.py
Outdated
|
||
|
||
"""Definitions of common_clk (CONFIG_COMMON_CLK) trace parsers""" | ||
"""registered by the FTrace class""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just write this as
"""
Definitions of common_clk (CONFIG_COMMON_CLK) trace parsers
registered by the FTrace class
"""
trappy/common_clk.py
Outdated
p = fn.generate_data_dict(data_l[1]) | ||
p.update({"clk_name" : data_l[0]}) | ||
return p | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can simplify this: if you add an intermediate common class then you only need to write generate_data_dict once
. And then you can actually move the parse_common_clock_data
inside that method. Something like this (untested):
class CommonClkBase(Base):
def generate_data_dict(self, data_str):
#clock traces are of the form "clk_name field0=x field1=y ..."
clk_name, fields = data_str.split(' ', 1)
ret = super(CommonClkBase, self).generate_data_dict(fields)
ret['clk_name'] = clk_name
return ret
Traces from clock_set_rate, clock_enable, clock_disable need specialized parsing. Add additional feature to parse these traces. Test: run the 3 new unit tests (nosetests tests/test_common_clk.py) Change-Id: Ib93b72697fc4d5eb30cffb914bbe0cb4c4cd872d
@bjackman Thanks for the review, adopted all suggestions |
Welcome aboard 😁 |
Awesome. :):) |
Traces from clock_set_rate, clock_enable, clock_disable need
specialized parsing. Add additional feature to parse these traces.
Test: run the 3 new unit tests (nosetests tests/test_common_clk.py)
Change-Id: Ib93b72697fc4d5eb30cffb914bbe0cb4c4cd872d