Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1568337

Re: [PATCH 3/3] perf: Allow kernel filters on cpu events

From Alexander Shishkin <alexander.shishkin@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] perf: Allow kernel filters on cpu events
Date 2017-01-27 13:50 +0100
Message-ID <t4e8y-4cY-11@gated-at.bofh.it> (permalink)
References <t3OQN-5FW-15@gated-at.bofh.it> <t3OQN-5FW-19@gated-at.bofh.it> <t405A-458-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Mathieu Poirier <mathieu.poirier@linaro.org> writes:

> On Thu, Jan 26, 2017 at 11:40:57AM +0200, Alexander Shishkin wrote:
>> +	if (!ifh->nr_file_filters)
>> +		return;
>
> Is this mandatory or an optimisation to avoid circling through a list of filters
> that don't included user space files?

It's both. It stems from the fact that the remainder of this function
relies on ctx::task not being NULL, which is not the case with cpu
contexts and now that we've enabled address filters for such contexts,
it's a problem. So checking for !task would have done the trick here,
but this way we'll also avoid going down this path for task contexts
in the absence of file-based filters. In particular, grabbing the mmap
semaphore and filters spinlock we can do without.

Regards,
--
Alex

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] perf: Updates for address filters Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-01-26 10:50 +0100
  [PATCH 3/3] perf: Allow kernel filters on cpu events Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-01-26 10:50 +0100
    Re: [PATCH 3/3] perf: Allow kernel filters on cpu events Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-01-26 22:50 +0100
      Re: [PATCH 3/3] perf: Allow kernel filters on cpu events Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-01-27 13:50 +0100
        Re: [PATCH 3/3] perf: Allow kernel filters on cpu events Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-01-27 22:50 +0100
  [PATCH 1/3] perf, pt, coresight: Clean up address filter structure Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-01-26 10:50 +0100
    Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter  structure Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-01-26 19:30 +0100
      Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2017-01-27 13:20 +0100
        Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-01-27 18:20 +0100

csiph-web