Linux Trace Kernel
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Tomas Glozar <tglozar@redhat.com>
Cc: Valentin Schneider <vschneid@redhat.com>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Costa Shulyupin <costa.shul@redhat.com>,
	Crystal Wood <crwood@redhat.com>, John Kacur <jkacur@redhat.com>,
	Ivan Pravdin <ipravdin.official@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>
Subject: Re: [RFC PATCH v2 4/4] rtla/osnoise: Leverage IPI event filters when tracing a subset of CPUs
Date: Wed, 1 Jul 2026 09:11:07 -0400	[thread overview]
Message-ID: <20260701091107.2943a03b@gandalf.local.home> (raw)
In-Reply-To: <CAP4=nvT5H73ptaBaZ2fWQ+SjJ-c3eEGZbrSefMV6fxqL-va2XA@mail.gmail.com>

On Wed, 1 Jul 2026 08:45:40 +0200
Tomas Glozar <tglozar@redhat.com> wrote:

> I double-checked that and you are correct that the docstring says so,
> but it's an error in the docstring. According to the manpage, it
> returns the number of bytes written (i.e. positive on success, not
> zero) [1]:

Note, the man page is considered the source of "truth".

> 
> "RETURN VALUE
> ...
> tracefs_event_file_write() and tracefs_event_file_append() returns
> *the number of bytes written to the system/event file* or negative on
> error."
> 
> The code agrees as well: in tracefs_event_file_write() there's the
> wrong docstring (likely copied from another function) [2]:
> 
> /*
>  * tracefs_event_file_write - write to an event file
>  * ...
>  * Return 0 on success, and -1 on error.

Ug, that's a bug and needs to be fixed.

Thanks for catching this. I need to spend some time to catch up on the user
side of tracing. There's a few new bugzillas and patches I need to apply.

-- Steve


>  */
> int tracefs_event_file_write(struct tracefs_instance *instance,
>     const char *system, const char *event,
>     const char *file, const char *str)
> {
>         ....
>         ret = tracefs_instance_file_write(instance, path, str);
>         free(path);
>         return ret;
> }


  parent reply	other threads:[~2026-07-01 13:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 13:17 [RFC PATCH v2 0/4] tracing/osnoise: Track IPIs Valentin Schneider
2026-06-17 13:17 ` [RFC PATCH v2 1/4] rtla/osnoise: Add IPI tracking cmdline option Valentin Schneider
2026-06-29 10:51   ` Tomas Glozar
2026-06-30 13:59     ` Valentin Schneider
2026-06-17 13:17 ` [RFC PATCH v2 2/4] rtla/osnoise: Record IPI count in osnoise top Valentin Schneider
2026-06-29 12:56   ` Tomas Glozar
2026-06-30 13:59     ` Valentin Schneider
2026-06-17 13:17 ` [RFC PATCH v2 3/4] rtla/osnoise: Trace IPI events when recording a trace file Valentin Schneider
2026-06-30 11:32   ` Tomas Glozar
2026-06-17 13:17 ` [RFC PATCH v2 4/4] rtla/osnoise: Leverage IPI event filters when tracing a subset of CPUs Valentin Schneider
2026-06-30 10:14   ` Tomas Glozar
2026-06-30 13:59     ` Valentin Schneider
2026-07-01  6:45       ` Tomas Glozar
2026-07-01  7:25         ` Valentin Schneider
2026-07-01 13:11         ` Steven Rostedt [this message]
2026-06-26 10:26 ` [RFC PATCH v2 0/4] tracing/osnoise: Track IPIs Steven Rostedt
2026-06-26 12:25   ` Valentin Schneider

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=20260701091107.2943a03b@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=corbet@lwn.net \
    --cc=costa.shul@redhat.com \
    --cc=crwood@redhat.com \
    --cc=ipravdin.official@gmail.com \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=tglozar@redhat.com \
    --cc=vschneid@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox