On Thu, Dec 3, 2020 at 12:48 AM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > > On Thu, 29 Oct 2020 13:18:05 +0200 > "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > > > Some timestamp synchronization plugins may not support all ftrace > > clocks. Added logic to timestamp synchronization plugins to declare what > > ftace clocks they support. Added logic to select plugin depending on the > > "ftrace clocks" > > > ftrace clock used in the current trace session and supported clocks. > > > > Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx> > > --- > > include/trace-cmd/trace-cmd.h | 4 ++-- > > lib/trace-cmd/include/trace-tsync-local.h | 1 + > > lib/trace-cmd/trace-timesync.c | 29 +++++++++++++++++++---- > > tracecmd/trace-record.c | 10 +++++++- > > tracecmd/trace-tsync.c | 2 +- > > 5 files changed, 38 insertions(+), 8 deletions(-) > > > > diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h > > index b48381cd..21028940 100644 > > --- a/include/trace-cmd/trace-cmd.h > > +++ b/include/trace-cmd/trace-cmd.h > > @@ -448,8 +448,8 @@ struct tracecmd_time_sync { > > }; > > > > void tracecmd_tsync_init(void); > > -int tracecmd_tsync_proto_getall(char ***protos); > > -char *tracecmd_tsync_proto_select(char **protos); > > +int tracecmd_tsync_proto_getall(char ***protos, const char *clock); > > +char *tracecmd_tsync_proto_select(char **protos, char *clock); > > bool tsync_proto_is_supported(char *proto_name); > > void tracecmd_tsync_with_host(struct tracecmd_time_sync *tsync); > > void tracecmd_tsync_with_guest(struct tracecmd_time_sync *tsync); > > diff --git a/lib/trace-cmd/include/trace-tsync-local.h b/lib/trace-cmd/include/trace-tsync-local.h > > index 1f3bc443..25d5b4e8 100644 > > --- a/lib/trace-cmd/include/trace-tsync-local.h > > +++ b/lib/trace-cmd/include/trace-tsync-local.h > > @@ -27,6 +27,7 @@ struct clock_sync_context { > > }; > > > > int tracecmd_tsync_proto_register(char *proto_name, int accuracy, > > + int supported_clocks, > > Is this a bitmask? How is this used? Yes, it is a bitmask of "enum tracecmd_clocks" values, or just TRACECMD_CLOCK_UNKNOWN for all clocks supported. > > -- Steve > > > int (*init)(struct tracecmd_time_sync *), > > int (*free)(struct tracecmd_time_sync *), > > int (*calc)(struct tracecmd_time_sync *, > > diff --git a/lib/trace-cmd/trace-timesync.c b/lib/trace-cmd/trace-timesync.c -- Tzvetomir (Ceco) Stoyanov VMware Open Source Technology Center