public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <ak@linux.intel.com>, Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
	Stephane Eranian <eranian@google.com>,
	mathieu.poirier@linaro.org, Pawel Moll <pawel.moll@arm.com>
Subject: Re: [RFC PATCH] perf: Add PERF_RECORD_SWITCH to indicate context switches
Date: Fri, 12 Jun 2015 16:15:26 +0300	[thread overview]
Message-ID: <557ADB6E.8080604@intel.com> (raw)
In-Reply-To: <20150612123643.GA6850@kernel.org>

On 12/06/15 15:36, Arnaldo Carvalho de Melo wrote:
> Em Fri, Jun 12, 2015 at 02:09:38PM +0200, Peter Zijlstra escreveu:
>> On Fri, Jun 12, 2015 at 02:12:11PM +0300, Adrian Hunter wrote:
>>> On 11/06/15 17:15, Peter Zijlstra wrote:
>>
>>>> Right, so the one wee problem I have is that this only provides sched_in
>>>> data, I imagine people might be interested in sched_out as well.
>>>
>>> That is not a problem although it would be interesting to know the use-case.
>>> To me it seemed unreasonable to expect to analyze scheduler behaviour
>>> without admin-level privileges since it is inherently an administrative
>>> activity.
>>
>> I was more thinking about it being used to track event duration inside a
>> task. Say you want measure the time between event A and event B but got
>> scheduled out in between.
>>
>> 	---- A ----] .... [---- B -----
>>
>> If you do not have the sched_out time, you cannot correct for that.

Thanks for the example.

>>
>>>> all 3 are already part of sample_id.
>>>
>>> You have to decide whether you expect to be able to use an event without
>>> sample_id. MMAP and MMAP2 both have pid, tid which are in sample_id, LOST
>>> has id, EXIT and FORK have time, all of the THROTTLE/UNTHROTTLE members are
>>> in sample_id etc. So it currently looks like we expect to be able to use an
>>> event without requiring sample_id.
> 
> The fact that there is this duplication is because sample_id_all came
> after those events, but this new one being proposed doesn't have to do
> it :-)

Thanks, that's clear then.  There will just need to be a flag to indicate
whether it is scheduling in or out.

>  
>> I think we recently had this discussion:
>>
>>   lkml.kernel.org/r/1430940834-8964-8-git-send-email-kan.liang@intel.com
>>
>> The patch we ended up merging:
>>
>>   f38b0dbb491a ("perf/x86/intel: Introduce PERF_RECORD_LOST_SAMPLES")
>>
>> Does indeed require sample_id.
> 
> 


  reply	other threads:[~2015-06-12 13:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 14:21 [RFC PATCH] perf: Add PERF_RECORD_SWITCH to indicate context switches Adrian Hunter
2015-06-11 14:15 ` Peter Zijlstra
2015-06-11 16:34   ` Andi Kleen
2015-06-11 16:54     ` Peter Zijlstra
2015-06-12  0:47   ` David Ahern
2015-06-12 10:34     ` Adrian Hunter
2015-06-12 14:21       ` David Ahern
2015-06-12 16:13         ` Adrian Hunter
2015-06-12 11:12   ` Adrian Hunter
2015-06-12 12:09     ` Peter Zijlstra
2015-06-12 12:36       ` Arnaldo Carvalho de Melo
2015-06-12 13:15         ` Adrian Hunter [this message]
2015-06-12 13:28           ` Pawel Moll
2015-06-12 13:52             ` Pawel Moll
2015-06-12 14:30             ` David Ahern
2015-06-12 14:29     ` David Ahern

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=557ADB6E.8080604@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@kernel.org \
    --cc=pawel.moll@arm.com \
    --cc=peterz@infradead.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