mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jin, Yao" <yao.jin@linux.intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com,
	alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org,
	ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v6 1/6] perf header: Record first sample time and last sample time in perf file header
Date: Wed, 22 Nov 2017 08:55:06 +0800	[thread overview]
Message-ID: <bb2ca741-72ca-8921-1976-0ccf82b9380f@linux.intel.com> (raw)
In-Reply-To: <20171121163854.GM7918@kernel.org>



On 11/22/2017 12:38 AM, Arnaldo Carvalho de Melo wrote:
> Em Mon, Nov 06, 2017 at 08:21:06PM +0800, Jin Yao escreveu:
>> perf report/script/... have a --time option to limit the time range
>> of output. That's very useful to slice large traces, e.g. when processing
>> the output of perf script for some analysis.
>>
>> But right now --time only supports absolute time. Also there is no fast
>> way to get the start/end times of a given trace except for looking at it.
>> This makes it hard to e.g. only decode the first half of the trace, which
>> is useful for parallelization of scripts
>>
>> Another problem is that perf records are variable size and there is no
>> synchronization mechanism. So the only way to find the last sample reliably
>> would be to walk all samples. But we want to avoid that in perf report/...
>> because it is already quite expensive. That is why storing the first sample
>> time and last sample time in perf record is better.
>>
>> This patch creates a new header feature type HEADER_SAMPLE_TIME and related
>> ops. Save the first sample time and the last sample time to the feature
>> section in perf file header
> 
> I'll add a clarification here, right after your text:
> 
> ". That will be done when, for instance, processing build-ids, where we
> already have to process all samples to create the build-id table, take
> advantage of that to further amortize that processing by storing
> HEADER_SAMPLE_TIME to make 'perf report/script' faster when using
> --time."
> 

Thanks Arnaldo! The clarification is good!

Thanks
Jin Yao

  reply	other threads:[~2017-11-22  0:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 12:21 [PATCH v6 0/6] perf report/script: Support percent and multiple range in --time option Jin Yao
2017-11-06 12:21 ` [PATCH v6 1/6] perf header: Record first sample time and last sample time in perf file header Jin Yao
2017-11-21 16:38   ` Arnaldo Carvalho de Melo
2017-11-22  0:55     ` Jin, Yao [this message]
2017-11-06 12:21 ` [PATCH v6 2/6] perf record: Get the first sample time and last sample time Jin Yao
2017-11-21 16:40   ` Arnaldo Carvalho de Melo
2017-11-22  1:09     ` Jin, Yao
2017-11-06 12:21 ` [PATCH v6 3/6] perf util: Create function to parse time percent Jin Yao
2017-11-06 12:21 ` [PATCH v6 4/6] perf util: Create function to perform multiple time range checking Jin Yao
2017-11-06 12:21 ` [PATCH v6 5/6] perf report: support time percent and multiple time ranges Jin Yao
2017-11-06 12:21 ` [PATCH v6 6/6] perf script: " Jin Yao
2017-11-10 13:18 ` [PATCH v6 0/6] perf report/script: Support percent and multiple range in --time option Jin, Yao

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=bb2ca741-72ca-8921-1976-0ccf82b9380f@linux.intel.com \
    --to=yao.jin@linux.intel.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@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