On Wed, 11 Dec 2019 10:21:44 +0200 Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote: > In case of a guest ("-A" option), the logic skips the switch(), so the > guest args are not parsed. > There is a check, right before the switch() : Ah, thanks, I forgot about that. > > /* > * If the current instance is to record a guest, then save > * all the arguments for this instance. > */ > if (c != 'B' && c != 'A' && is_guest(ctx->instance)) { > add_arg(ctx->instance, c, opts, long_options, optarg); > continue; > } > > I can put inside that if() a check for "-C" guest argument, but it > will look like a hack. I disagree. It's no more of a "hack" than appending a "-C" to the arguments. I think it's the right solution. We can simply add: if (c == 'C') ctx->instance->flags |= BUFFER_FL_HAS_CLOCK; Then we could test if that flag is set for the instance below. -- Steve > > The confusion is that guest_config is set to true for any "-C" host argument, > including those for instances, but only the one from the top instance > is used to inject > guest clock arg. > > > > -- Steve > > > > if (is_guest(instance)) { > > add_argv(instance, > > (char *)top_instance.ftrace->clock, > > true); > > add_argv(instance, "-C", true); > > } > > } > > } > > } > > >