[lttng-dev] Fwd: [PATCH lttng-tool] Fix: list command: revert merge error made when adding mi on pretty printing

Jonathan Rajotte jonathan.r.julien at gmail.com
Sat Aug 16 16:59:22 EDT 2014


Actually if you want to preserve the original behaviour from 2.5 you
want to remove them.

This code path is for listing all the sessions. Not for the individual listing.

Here the code from the "all listing" path in 2.5

MSG("  %d) %s (%s) [%s%s]", i + 1, sessions[i].name, sessions[i].path,
active_string(sessions[i].enabled),
snapshot_string(sessions[i].snapshot_mode));

I don't mind you telling me that we can add the trace path and the
live timer now that we have mi.
But as long as we talk about this patch, it revert to the original
behaviour from 2.5 and fix my incompetence. Notice the removal of the
break statement too... if you are on master and do a lttng list with
multiple sessions only the first one show up.

Or am I missing something ?


> On Sat, Aug 16, 2014 at 10:45 AM, David Goulet <dgoulet at efficios.com> wrote:
>>
>> On 12 Aug (13:55:40), Jonathan Rajotte Julien wrote:
>> > Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien at gmail.com>
>> > ---
>> >  src/bin/lttng/commands/list.c | 8 ++------
>> >  1 file changed, 2 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c
>> > index e3ff4f1..ccffdc7 100644
>> > --- a/src/bin/lttng/commands/list.c
>> > +++ b/src/bin/lttng/commands/list.c
>> > @@ -1271,14 +1271,10 @@ static int list_sessions(const char *session_name)
>> >                                       break;
>> >                               }
>> >                       } else {
>> > -                             MSG("  %d) %s (%s) [%s%s]", i + 1,
>> > -                                             sessions[i].name, sessions[i].path,
>> > +                             MSG("  %d) %s (%s) [%s%s]", i + 1, sessions[i].name,
>> > +                                             sessions[i].path,
>> >                                               active_string(sessions[i].enabled),
>> >                                               snapshot_string(sessions[i].snapshot_mode));
>> > -                             MSG("%sTrace path: %s", indent4, sessions[i].path);
>> > -                             MSG("%sLive timer interval (usec): %u\n", indent4,
>> > -                                             sessions[i].live_timer_interval);
>> > -                             break;
>>
>> Not sure removing that is wanted here. The "trace path" and "live timer
>> interval" lines are in stable-2.5 thus removing them here, you need a
>> real good reason ;)
>>
>> David
>>
>> >                       }
>> >               }
>> >
>> > --
>> > 2.0.4
>> >
>> >
>> > _______________________________________________
>> > lttng-dev mailing list
>> > lttng-dev at lists.lttng.org
>> > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>
>
>
> --
> Jonathan Rajotte Julien
> Chargé de laboratoire, INF1995
> Polytechnique Montréal



More information about the lttng-dev mailing list