From: Mike Turquette <hidden> Date: 2012-12-13 16:28:10
On Wed, Dec 12, 2012 at 7:49 PM, Prashant Gaikwad [off-list ref] wrote:
Adds debug file "clock_tree" in /sys/kernel/debug/clk dir.
It helps to view all the clock registered in tree format.
Prashant,
Thanks for submitting this. We've been talking about having a single
file for representing the tree for some time.
Regarding the output format had you considered using a well known
format which can be parsed using well known parsing libs? This avoids
needing a custom parser just for this one file. JSON springs to mind
as something lightweight and well-understood.
I prefer "clk_tree" versus "clock_tree". If we only spell clock one
way then users won't have to spend as much time trying to remember
specific spellings of the word.
This also brings up the question of whether or not we should keep the
directory-based debugfs representation around. I personally don't
care and I'm happy to deprecate it and remove at a future date if
others do not object. However if you have some tooling based around
the existing clk debugfs stuff then please speak up and I'll keep both
around.
Thanks,
Mike
+ if (!d)
+ return -ENOMEM;
+
orphandir = debugfs_create_dir("orphans", rootdir);
if (!orphandir)
--
1.7.4.1
From: Stephen Warren <hidden> Date: 2012-12-13 18:01:35
On 12/13/2012 09:27 AM, Mike Turquette wrote:
On Wed, Dec 12, 2012 at 7:49 PM, Prashant Gaikwad [off-list ref] wrote:
quoted
Adds debug file "clock_tree" in /sys/kernel/debug/clk dir.
It helps to view all the clock registered in tree format.
Prashant,
Thanks for submitting this. We've been talking about having a single
file for representing the tree for some time.
Regarding the output format had you considered using a well known
format which can be parsed using well known parsing libs? This avoids
needing a custom parser just for this one file. JSON springs to mind
as something lightweight and well-understood.
One advantage of the format below is that it's very easily
human-readable, and it's not too hard to parse (although I guess you'd
have to parse the indent level to get parent/child relation, which would
suck a bit). Is there room to provide both? Otherwise, I guess the
kernel could include a script to convert from JSON/whatever into the
format below.
From: Peter De Schrijver <hidden> Date: 2012-12-14 10:43:21
On Thu, Dec 13, 2012 at 07:01:31PM +0100, Stephen Warren wrote:
On 12/13/2012 09:27 AM, Mike Turquette wrote:
quoted
On Wed, Dec 12, 2012 at 7:49 PM, Prashant Gaikwad [off-list ref] wrote:
quoted
Adds debug file "clock_tree" in /sys/kernel/debug/clk dir.
It helps to view all the clock registered in tree format.
Prashant,
Thanks for submitting this. We've been talking about having a single
file for representing the tree for some time.
Regarding the output format had you considered using a well known
format which can be parsed using well known parsing libs? This avoids
needing a custom parser just for this one file. JSON springs to mind
as something lightweight and well-understood.
One advantage of the format below is that it's very easily
human-readable, and it's not too hard to parse (although I guess you'd
have to parse the indent level to get parent/child relation, which would
suck a bit). Is there room to provide both? Otherwise, I guess the
kernel could include a script to convert from JSON/whatever into the
format below.
We already have the clk directory for an easy to parse version. So I think
this one should be focused on being human readable.
Cheers,
Peter.
From: Mike Turquette <hidden> Date: 2012-12-14 16:43:29
On Fri, Dec 14, 2012 at 2:43 AM, Peter De Schrijver
[off-list ref] wrote:
On Thu, Dec 13, 2012 at 07:01:31PM +0100, Stephen Warren wrote:
quoted
On 12/13/2012 09:27 AM, Mike Turquette wrote:
quoted
On Wed, Dec 12, 2012 at 7:49 PM, Prashant Gaikwad [off-list ref] wrote:
quoted
Adds debug file "clock_tree" in /sys/kernel/debug/clk dir.
It helps to view all the clock registered in tree format.
Prashant,
Thanks for submitting this. We've been talking about having a single
file for representing the tree for some time.
Regarding the output format had you considered using a well known
format which can be parsed using well known parsing libs? This avoids
needing a custom parser just for this one file. JSON springs to mind
as something lightweight and well-understood.
One advantage of the format below is that it's very easily
human-readable, and it's not too hard to parse (although I guess you'd
have to parse the indent level to get parent/child relation, which would
suck a bit). Is there room to provide both? Otherwise, I guess the
kernel could include a script to convert from JSON/whatever into the
format below.
We already have the clk directory for an easy to parse version. So I think
this one should be focused on being human readable.
I'm really not sure the clk directory structure is such a good idea.
Hopping around directories and dumping a few files feels like a
strange way to get at the data.
Another key point is atomicity. The prepare_lock mutex is only held
for each individual read of a file under the current clock directory
implementation. So if you wish to read several different clock rates
there is a caveat that the rates could change between reads. The
"summary" file that dumps all of the data improves on this since it
could hold the prepare_lock mutex across the operation.
This last point makes me realize that the current code above either
needs to hold that lock or at least use hlist_for_each_entry_safe
since clocks could be removed from the lists during the operation. As
such it is a bit unsafe.
I'm OK letting the two implementations live along side each other but
I am also sure that the clock summary dump should be reasonably
machine readable.
Regards,
Mike
On Thursday 13 December 2012 11:31 PM, Stephen Warren wrote:
On 12/13/2012 09:27 AM, Mike Turquette wrote:
quoted
On Wed, Dec 12, 2012 at 7:49 PM, Prashant Gaikwad [off-list ref] wrote:
quoted
Adds debug file "clock_tree" in /sys/kernel/debug/clk dir.
It helps to view all the clock registered in tree format.
Prashant,
Thanks for submitting this. We've been talking about having a single
file for representing the tree for some time.
Regarding the output format had you considered using a well known
format which can be parsed using well known parsing libs? This avoids
needing a custom parser just for this one file. JSON springs to mind
as something lightweight and well-understood.
One advantage of the format below is that it's very easily
human-readable, and it's not too hard to parse (although I guess you'd
have to parse the indent level to get parent/child relation, which would
suck a bit). Is there room to provide both? Otherwise, I guess the
kernel could include a script to convert from JSON/whatever into the
format below.
Even I think that output must be easily human-readable. How about adding
sysfs to switch between human-readable and machine-readable format?
I will try come up with a implementation.
From: Mike Turquette <hidden> Date: 2012-12-21 22:57:08
On Wed, Dec 19, 2012 at 11:53 PM, Prashant Gaikwad [off-list ref] wrote:
On Thursday 13 December 2012 11:31 PM, Stephen Warren wrote:
quoted
On 12/13/2012 09:27 AM, Mike Turquette wrote:
quoted
On Wed, Dec 12, 2012 at 7:49 PM, Prashant Gaikwad [off-list ref]
wrote:
quoted
Adds debug file "clock_tree" in /sys/kernel/debug/clk dir.
It helps to view all the clock registered in tree format.
Prashant,
Thanks for submitting this. We've been talking about having a single
file for representing the tree for some time.
Regarding the output format had you considered using a well known
format which can be parsed using well known parsing libs? This avoids
needing a custom parser just for this one file. JSON springs to mind
as something lightweight and well-understood.
One advantage of the format below is that it's very easily
human-readable, and it's not too hard to parse (although I guess you'd
have to parse the indent level to get parent/child relation, which would
suck a bit). Is there room to provide both? Otherwise, I guess the
kernel could include a script to convert from JSON/whatever into the
format below.
Even I think that output must be easily human-readable. How about adding
sysfs to switch between human-readable and machine-readable format?
I will try come up with a implementation.
Do you mean a sysfs file which controls the output format? How about
just two different files? One can be clk-dump (machine readable) and
the other is clk-summary (human readable).
Regards,
Mike
On Saturday 22 December 2012 04:26 AM, Mike Turquette wrote:
On Wed, Dec 19, 2012 at 11:53 PM, Prashant Gaikwad [off-list ref] wrote:
quoted
On Thursday 13 December 2012 11:31 PM, Stephen Warren wrote:
quoted
On 12/13/2012 09:27 AM, Mike Turquette wrote:
quoted
On Wed, Dec 12, 2012 at 7:49 PM, Prashant Gaikwad [off-list ref]
wrote:
quoted
Adds debug file "clock_tree" in /sys/kernel/debug/clk dir.
It helps to view all the clock registered in tree format.
Prashant,
Thanks for submitting this. We've been talking about having a single
file for representing the tree for some time.
Regarding the output format had you considered using a well known
format which can be parsed using well known parsing libs? This avoids
needing a custom parser just for this one file. JSON springs to mind
as something lightweight and well-understood.
One advantage of the format below is that it's very easily
human-readable, and it's not too hard to parse (although I guess you'd
have to parse the indent level to get parent/child relation, which would
suck a bit). Is there room to provide both? Otherwise, I guess the
kernel could include a script to convert from JSON/whatever into the
format below.
Even I think that output must be easily human-readable. How about adding
sysfs to switch between human-readable and machine-readable format?
I will try come up with a implementation.
Do you mean a sysfs file which controls the output format? How about
just two different files? One can be clk-dump (machine readable) and
the other is clk-summary (human readable).
It is also fine. Is this patch ok for human-readable format? or any
suggestions?
I will change the file name to clk-summary.
From: Mike Turquette <hidden> Date: 2012-12-24 17:38:16
On Sun, Dec 23, 2012 at 4:26 AM, Prashant Gaikwad [off-list ref] wrote:
On Saturday 22 December 2012 04:26 AM, Mike Turquette wrote:
quoted
On Wed, Dec 19, 2012 at 11:53 PM, Prashant Gaikwad [off-list ref]
wrote:
quoted
On Thursday 13 December 2012 11:31 PM, Stephen Warren wrote:
quoted
On 12/13/2012 09:27 AM, Mike Turquette wrote:
quoted
On Wed, Dec 12, 2012 at 7:49 PM, Prashant Gaikwad [off-list ref]
wrote:
quoted
Adds debug file "clock_tree" in /sys/kernel/debug/clk dir.
It helps to view all the clock registered in tree format.
Prashant,
Thanks for submitting this. We've been talking about having a single
file for representing the tree for some time.
Regarding the output format had you considered using a well known
format which can be parsed using well known parsing libs? This avoids
needing a custom parser just for this one file. JSON springs to mind
as something lightweight and well-understood.
One advantage of the format below is that it's very easily
human-readable, and it's not too hard to parse (although I guess you'd
have to parse the indent level to get parent/child relation, which would
suck a bit). Is there room to provide both? Otherwise, I guess the
kernel could include a script to convert from JSON/whatever into the
format below.
Even I think that output must be easily human-readable. How about adding
sysfs to switch between human-readable and machine-readable format?
I will try come up with a implementation.
Do you mean a sysfs file which controls the output format? How about
just two different files? One can be clk-dump (machine readable) and
the other is clk-summary (human readable).
It is also fine. Is this patch ok for human-readable format? or any
suggestions?
I will change the file name to clk-summary.
Prashant,
Yes the format seems to be agreeable for human-readable format based
on the feedback on the list. Go ahead and keep the column titles and
the dashed lines that I commented on earlier... my comments are less
relevant if a separate machine-readable clk-dump file exists.
Are you going to take a crack at JSON-formatted output for clk-dump?
Thanks,
Mike
On Monday 24 December 2012 11:07 PM, Mike Turquette wrote:
On Sun, Dec 23, 2012 at 4:26 AM, Prashant Gaikwad [off-list ref] wrote:
quoted
On Saturday 22 December 2012 04:26 AM, Mike Turquette wrote:
quoted
On Wed, Dec 19, 2012 at 11:53 PM, Prashant Gaikwad [off-list ref]
wrote:
quoted
On Thursday 13 December 2012 11:31 PM, Stephen Warren wrote:
quoted
On 12/13/2012 09:27 AM, Mike Turquette wrote:
quoted
On Wed, Dec 12, 2012 at 7:49 PM, Prashant Gaikwad [off-list ref]
wrote:
quoted
Adds debug file "clock_tree" in /sys/kernel/debug/clk dir.
It helps to view all the clock registered in tree format.
Prashant,
Thanks for submitting this. We've been talking about having a single
file for representing the tree for some time.
Regarding the output format had you considered using a well known
format which can be parsed using well known parsing libs? This avoids
needing a custom parser just for this one file. JSON springs to mind
as something lightweight and well-understood.
One advantage of the format below is that it's very easily
human-readable, and it's not too hard to parse (although I guess you'd
have to parse the indent level to get parent/child relation, which would
suck a bit). Is there room to provide both? Otherwise, I guess the
kernel could include a script to convert from JSON/whatever into the
format below.
Even I think that output must be easily human-readable. How about adding
sysfs to switch between human-readable and machine-readable format?
I will try come up with a implementation.
Do you mean a sysfs file which controls the output format? How about
just two different files? One can be clk-dump (machine readable) and
the other is clk-summary (human readable).
It is also fine. Is this patch ok for human-readable format? or any
suggestions?
I will change the file name to clk-summary.
Prashant,
Yes the format seems to be agreeable for human-readable format based
on the feedback on the list. Go ahead and keep the column titles and
the dashed lines that I commented on earlier... my comments are less
relevant if a separate machine-readable clk-dump file exists.
Thanks Mike!!
Are you going to take a crack at JSON-formatted output for clk-dump?