summaryrefslogtreecommitdiff
path: root/include/timer.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-02-12 10:56:54 -0500
committerTom Rini <trini@konsulko.com>2023-02-12 10:56:54 -0500
commit78d1c3949a6f85f64b31ee8ab8240392a67ca30e (patch)
tree46064add0a5a2418f91cbce8afd997fc2317b965 /include/timer.h
parentecff2bc4bd2687b280898c63eecfcc31d13cce22 (diff)
parent16bf3b6f8f35c295419dab9fc698d50686592f9c (diff)
Merge branch '2023-02-10-update-trace-feature-to-work-with-trace-cmd'
To quote the author: Since U-Boot's tracing feature was originally written, quite a few changes have taken place in this domain. The original text format used by tracing is still emitted by Linux, but a new trace-cmd tool has invented a binary format which is now used by new tools, such as kernelshark. With recent distributions and the move to Python 3, the old pybootchart tool does not build or run. Unfortunately there is no 1:1 replacement for the features that were provided by pybootchart, or at least it is not obvious. Still, it makes sense to keep with the times. This series updates proftool to use the new binary format, adding support for function and funcgraph tracing, so that U-Boot's trace records can be examined by trace-cmd and kernelshark. This series also adds support for a flamegraph, which provides a visual way to see which functions are called a lot, as well as which ones consume the most time. Some minor updates to the trace implementation within U-Boot are included, to provide a little more information and to fix a few problems. No unit tests are provided by proftool, but a functional test ensures that sandbox can emit traces which can be processed by proftool, then parsed by trace-cmd and that the timing of the various formats looks consistent.
Diffstat (limited to 'include/timer.h')
-rw-r--r--include/timer.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/timer.h b/include/timer.h
index d33a26e28fe..311ce6b2c3a 100644
--- a/include/timer.h
+++ b/include/timer.h
@@ -9,11 +9,16 @@
#define timer_get_ops(dev) ((struct timer_ops *)(dev)->driver->ops)
/**
- * dm_timer_init() - initialize a timer for time keeping. On success
- * initializes gd->timer so that lib/timer can use it for future
- * referrence.
+ * dm_timer_init() - set up a timer for time keeping
*
- * Return: 0 on success or error number
+ * Sets up gd->timer if the device is not already bound, making sure it is
+ * probed and ready for use
+ *
+ * On success, inits gd->timer so that lib/timer can use it for future reference
+ *
+ * Returns: 0 on success, -EAGAIN if driver model is not ready yet, -ENODEV if
+ * no timer could be found, other error if the timer could not be bound or
+ * probed
*/
int dm_timer_init(void);