mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Daniel Bristot de Oliveira <bristot@kernel.org>,
	Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	Nicolas Saenz Julienne <nsaenzju@redhat.com>
Subject: Re: [GIT PULL] tracing: minor fixes
Date: Thu, 10 Mar 2022 20:50:57 -0500	[thread overview]
Message-ID: <20220310205057.6769ac0d@gandalf.local.home> (raw)
In-Reply-To: <CAHk-=wjrhzKn2p6s7WPDGegmcnyOWL4jt5+4By11sGJGAkxG1w@mail.gmail.com>

On Thu, 10 Mar 2022 17:28:31 -0800
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Thu, Mar 10, 2022 at 2:45 PM Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> >  - Fix unregistering the same event twice a the user could disable
> >    the event osnoise will disable on unregistering.  
> 
> What? That sounds like a (bad) markov chain text generator made random
> commit noises.
> 
> I tried to edit that to something that actually makes some sense, but
> who knows..

Ah sorry. That was something difficult to shorten, and I wrote that up at
the end of the night.

tracepoints will warn if you try to unregister a callback that is not
registered. It doesn't break anything to do so, but because tracepoints are
asynchronous, and when the user reads the ring buffer it triggers calls to
special functions associated to a tracepoint, unregistering twice usually
is because of a bug that can cause a hard to debug situation. So we warn if
a callback is unregistered from a tracepoint that is not currently
registered.

What happened above is that the osnoise tracer registered callbacks to the
tracepoints. And it unregisters them when the tracer is stopped (echo 0
into tracing_on) or removed (echo nop > current_tracer). If the user stops
osnoise with the echo 0 to tracing_on that will cause the tracepoint
callbacks to be unregistered. If the user then turns off osnoise, then it
will unregister the callbacks again, even though they were no longer
registered.

Basically it was just an accounting error.

-- Steve

  reply	other threads:[~2022-03-11  1:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 22:45 Steven Rostedt
2022-03-11  1:28 ` Linus Torvalds
2022-03-11  1:50   ` Steven Rostedt [this message]
2022-03-11  1:52 ` pr-tracker-bot
  -- strict thread matches above, loose matches on Subject: below --
2022-01-06 20:58 [GIT PULL] tracing: Minor fixes Steven Rostedt
2022-01-06 23:52 ` pr-tracker-bot
2019-04-26 15:53 Steven Rostedt
2019-04-26 18:40 ` pr-tracker-bot
2016-01-28 14:36 Steven Rostedt

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=20220310205057.6769ac0d@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=bristot@kernel.org \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=nsaenzju@redhat.com \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®