lkml.org 
[lkml]   [2019]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/3] scripts/gdb: Initial clk support: lx-clk-summary
Date
Quoting Leonard Crestez (2019-04-22 01:26:57)
> +
> +
> +class LxClkSummary(gdb.Command):
> + """Print Linux kernel log buffer."""

This comment needs an update.

> +
> + def __init__(self):
> + super(LxClkSummary, self).__init__("lx-clk-summary", gdb.COMMAND_DATA)
> +
> + def show_subtree(self, clk, level):
> + gdb.write("%*s%-*s %7d %8d %8d\n" % (
> + level * 3 + 1, "",
> + 30 - level * 3,
> + clk['name'].string(),
> + clk['enable_count'],
> + clk['prepare_count'],
> + clk['protect_count']))

Would be nice to also print the rate, phase, etc. It's all pretty much
there already so it's just dumping data out. If it's a clk that has
CLK_GET_RATE_NOCACHE then I guess we have to print out '<unknown>'
because it relies on runtime code execution.

> +
> + for child in clk_core_for_each_child(clk['children']):
> + self.show_subtree(child, level + 1)

\
 
 \ /
  Last update: 2019-04-22 22:22    [W:0.093 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site