All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: John Stultz via ltp <ltp@lists.linux.it>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: kernel-team@android.com,
	Darren Hart <darren@os.amperecomputing.com>,
	ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 6/6] sched_football: Add trace_marker messages if we're tracing
Date: Mon, 29 Apr 2024 16:14:51 -0700	[thread overview]
Message-ID: <CANDhNCoypwtwDc_ZTXDppO=DewUx6J7+Hw8bnWvGYEeqQz=WBQ@mail.gmail.com> (raw)
In-Reply-To: <Zi9lo1ubVkGJHzrF@yuki>

On Mon, Apr 29, 2024 at 2:18 AM Cyril Hrubis <chrubis@suse.cz> wrote:
> > +     sprintf(buf, "I|%i|Game_Over!\n", getpid());
> > +     if (fd > 0)
> > +             ret = write(fd, buf, strnlen(buf, BUF_LEN));
>
> I know that we havre only two usages now, but it would be a bit cleaner
> and readable to have a function to print the messages, e.g.
>
> static void tracer_write(const char *msg);
>
> And we would do:
>
>         tracer_write("Game_Started!");

Sure. For now I'll add it to the librttest code, but I'm happy to pull
it out to more generic logic once there's a good approach to the
config conflicts in the subsystem headers.

> It would be a good idea to add the test name to the message as well,
> maybe as:
>
>         sprintf(buf, "sched_football|%i|%s\n", getpid(), msg);
>

How about sprintf(buf, "I|%i|%s: %s\n", getpid(), test_tag, msg) ?

This is mostly because I'm using the trace_marker format that perfetto
understands, and can visualize.

thanks
-john

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2024-04-29 23:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 22:57 [LTP] [PATCH 0/6] sched_football: Re-add crazy fans and other cleanups John Stultz via ltp
2024-04-23 22:57 ` [LTP] [PATCH 1/6] sched_football: Drop use of sched_yeild() John Stultz via ltp
2024-04-23 22:57 ` [LTP] [PATCH 2/6] sched_football: Use atomic for ball John Stultz via ltp
2024-04-29  9:06   ` Cyril Hrubis
2024-04-29 22:56     ` John Stultz via ltp
2024-05-07  9:35       ` Cyril Hrubis
2024-04-23 22:58 ` [LTP] [PATCH 3/6] sched_football: Re-add the crazy fans to interrupt everyone John Stultz via ltp
2024-04-29  9:10   ` Cyril Hrubis
2024-04-29 23:06     ` John Stultz via ltp
2024-04-23 22:58 ` [LTP] [PATCH 4/6] sched_football: Add a sleep before the game begins to get into steady state John Stultz via ltp
2024-04-23 22:58 ` [LTP] [PATCH 5/6] sched_football: Add prctrl calls to set thread comms John Stultz via ltp
2024-04-23 22:58 ` [LTP] [PATCH 6/6] sched_football: Add trace_marker messages if we're tracing John Stultz via ltp
2024-04-29  9:17   ` Cyril Hrubis
2024-04-29 23:14     ` John Stultz via ltp [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANDhNCoypwtwDc_ZTXDppO=DewUx6J7+Hw8bnWvGYEeqQz=WBQ@mail.gmail.com' \
    --to=ltp@lists.linux.it \
    --cc=chrubis@suse.cz \
    --cc=darren@os.amperecomputing.com \
    --cc=jstultz@google.com \
    --cc=kernel-team@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.