aboutsummaryrefslogtreecommitdiff
path: root/hw/core/trace-events
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-04-17 16:54:28 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-04-30 11:52:28 +0100
commit4cba075efedde66f0a8658001da7fc09a09024e1 (patch)
tree2ab5240b37dbddf56b0ef0aa18308d8b88d941ad /hw/core/trace-events
parent70d7857f935ab3fd6a5c0ff8b7586d0aef20f8b0 (diff)
downloadqemu-4cba075efedde66f0a8658001da7fc09a09024e1.zip
qemu-4cba075efedde66f0a8658001da7fc09a09024e1.tar.gz
qemu-4cba075efedde66f0a8658001da7fc09a09024e1.tar.bz2
hw/core/clock: introduce clock object
This object may be used to represent a clock inside a clock tree. A clock may be connected to another clock so that it receives update, through a callback, whenever the source/parent clock is updated. Although only the root clock of a clock tree controls the values (represented as periods) of all clocks in tree, each clock holds a local state containing the current value so that it can be fetched independently. It will allows us to fullfill migration requirements by migrating each clock independently of others. This is based on the original work of Frederic Konrad. Signed-off-by: Damien Hedde <damien.hedde@greensocs.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 20200406135251.157596-2-damien.hedde@greensocs.com [PMM: Use uint64_t rather than unsigned long long in trace events; the dtrace backend can't handle the latter] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/core/trace-events')
-rw-r--r--hw/core/trace-events7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/core/trace-events b/hw/core/trace-events
index aecd8e1..1ac60ed 100644
--- a/hw/core/trace-events
+++ b/hw/core/trace-events
@@ -27,3 +27,10 @@ resettable_phase_exit_begin(void *obj, const char *objtype, unsigned count, int
resettable_phase_exit_exec(void *obj, const char *objtype, int has_method) "obj=%p(%s) method=%d"
resettable_phase_exit_end(void *obj, const char *objtype, unsigned count) "obj=%p(%s) count=%d"
resettable_transitional_function(void *obj, const char *objtype) "obj=%p(%s)"
+
+# clock.c
+clock_set_source(const char *clk, const char *src) "'%s', src='%s'"
+clock_disconnect(const char *clk) "'%s'"
+clock_set(const char *clk, uint64_t old, uint64_t new) "'%s', ns=%"PRIu64"->%"PRIu64
+clock_propagate(const char *clk) "'%s'"
+clock_update(const char *clk, const char *src, uint64_t val, int cb) "'%s', src='%s', ns=%"PRIu64", cb=%d"