From: Andi Kleen <andi@firstfloor.org>
To: Alexander Shishkin <alexander.shishkin@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
tom.zanussi@linux.intel.com, rostedt@goodmis.org,
peterz@infradead.org, alexander.shishkin@linux.intel.com
Subject: Re: [PATCH] Add support for disabling Intel PT trace in ftrace
Date: Wed, 23 Nov 2016 08:57:41 -0800 [thread overview]
Message-ID: <20161123165740.GB26852@two.firstfloor.org> (raw)
In-Reply-To: <87h96yej7v.fsf@ashishki-desk.ger.corp.intel.com>
> This will create unexplainable gaps in the trace, at least we should
> output RECORD_AUX when this happens, maybe add a flag for "had to stop
> the trace for reasons external to perf".
I don't think it's unexplainable. After all the user set it up this way.
It's the same as with an address filter for example.
If we started messing with the perf state then we have all the
locking/recursion problems between ftrace and perf.
kprobe can be set on near all kernel functions. I tried to do only
the minimum safe thing. Otherwise it would need a special
black list and likely other things for correctness.
Just disabling is much simpler and avoids all that.
>
> Also, I can't tell if this is called from an atomic context.
It's not, but it doesn't matter if you just change the MSR. It can
be done in any context.
>
> But I'd suggest something more generic like perf_pmu_off($pmu):
> - we already have the code to stop the output;
> - this won't be a driver-specific api then;
> - this will be reflected in the event hw state;
> - it will also go through the driver's callbacks, so its internal
> states will actually match the reality;
See above.
> - will work equally well for intel_bts or the ARM/Coresight tracers.
BTS could be handled like PT, but frankly noone should be using that, so I
don't think it's worth it.
-Andi
prev parent reply other threads:[~2016-11-23 16:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 16:55 Andi Kleen
2016-11-22 22:37 ` Steven Rostedt
2016-11-23 9:49 ` Thomas Gleixner
2016-11-23 7:41 ` Alexander Shishkin
2016-11-23 16:57 ` Andi Kleen [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=20161123165740.GB26852@two.firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tom.zanussi@linux.intel.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
Powered by JetHome