On Tue, 2025-08-26 at 15:58 +0200, Tomas Glozar wrote:
> čt 21. 8. 2025 v 5:58 odesílatel Crystal Wood <crw...@redhat.com> napsal:
> > 
> > The hist members were very similar between timerlat and top, so
> > just use one common hist struct.
> > 
> > output_divisor, quiet, and pretty printing are pretty generic
> > concepts that can go in the main struct even if not every
> > specific tool (currently) uses them.
> > 
> 
> Absolutely. Quiet and pretty printing are currently only used for top,
> but they might make sense for hist, too, in the future. output_divisor
> is actually always set to 1000 for osnoise-hist, once -n/--nano is
> implemented for osnoise, it will also be used by both osnoise-hist and
> osnoise-top, just like with rtla-timerlat.
> 
> For the commit message, maybe "Move hist/top-specific params into
> common struct" would work better? "Elsewhere" doesn't quite capture
> the idea for me.

OK.

> 
> > diff --git a/tools/tracing/rtla/src/osnoise_top.c 
> > b/tools/tracing/rtla/src/osnoise_top.c
> > index ad5daa8210aa..7c68feed300e 100644
> > --- a/tools/tracing/rtla/src/osnoise_top.c
> > +++ b/tools/tracing/rtla/src/osnoise_top.c
> > @@ -125,11 +125,12 @@ static void osnoise_top_header(struct osnoise_tool 
> > *top)
> >  {
> >         struct osnoise_params *params = top->params;
> >         struct trace_seq *s = top->trace.seq;
> 
> > +       bool pretty = params->common.pretty_output;
> 
> Is there any specific motivation for doing this and not just using
> params->common.pretty_output directly, like for the other parameters?

Because that wouldn't be pretty :-)

(it just felt like it was repeated enough to be worth it)

-Crystal


Reply via email to