qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v9 1/9] hw/core/clock: introduce clock object


From: Peter Maydell
Subject: Re: [PATCH v9 1/9] hw/core/clock: introduce clock object
Date: Fri, 17 Apr 2020 15:39:29 +0100

On Mon, 6 Apr 2020 at 14:53, Damien Hedde <address@hidden> wrote:
>
> 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.

> --- 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, unsigned long long old, unsigned long long new) 
> "'%s', ns=%llu->%llu"
> +clock_propagate(const char *clk) "'%s'"
> +clock_update(const char *clk, const char *src, unsigned long long val, int 
> cb) "'%s', src='%s', ns=%llu, cb=%d"

"unsigned long long" isn't a valid type to use in a trace event,
it seems: a build with --enable-trace-backends=dtrace will
produce the following warning:

Warning: /usr/bin/dtrace:hw/core/trace-dtrace.dtrace:54: syntax error near:
probe clock_disconnect

Warning: Proceeding as if --no-pyparsing was given.

Using fixed-width types is preferable anyway; squashing in
this fixes it:

diff --git a/hw/core/trace-events b/hw/core/trace-events
index 39301621ce8..1ac60ede6b7 100644
--- a/hw/core/trace-events
+++ b/hw/core/trace-events
@@ -31,6 +31,6 @@ 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, unsigned long long old, unsigned long long
new) "'%s', ns=%llu->%llu"
+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, unsigned long long
val, int cb) "'%s', src='%s', ns=%llu, cb=%d"
+clock_update(const char *clk, const char *src, uint64_t val, int cb)
"'%s', src='%s', ns=%"PRIu64", cb=%d"

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]