Skip to content
This repository has been archived by the owner on Nov 26, 2021. It is now read-only.

parse traces from the common clock infrastructure #271

Merged
merged 1 commit into from
Oct 23, 2017

Conversation

kdub
Copy link
Contributor

@kdub kdub commented Oct 19, 2017

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 bjackman self-requested a review October 20, 2017 13:42
Copy link
Contributor

@bjackman bjackman left a 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.



"""Definitions of common_clk (CONFIG_COMMON_CLK) trace parsers"""
"""registered by the FTrace class"""
Copy link
Contributor

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
"""

p = fn.generate_data_dict(data_l[1])
p.update({"clk_name" : data_l[0]})
return p

Copy link
Contributor

@bjackman bjackman Oct 23, 2017

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
@kdub
Copy link
Contributor Author

kdub commented Oct 23, 2017

@bjackman Thanks for the review, adopted all suggestions

@bjackman bjackman merged commit a10ee68 into ARM-software:master Oct 23, 2017
@bjackman
Copy link
Contributor

Welcome aboard 😁

@joelagnel
Copy link

Awesome. :):)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants