public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: 秦承刚 <chenggang.qcg@alibaba-inc.com>,
	"Chenggang Qin" <chenggang.qin@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Cc: "Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	"Paul Mackerras" <paulus@samba.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Arnaldo Carvalho de Melo" <acme@ghostprotocols.net>,
	"Arjan van de Ven" <arjan@linux.intel.com>,
	"Namhyung Kim" <namhyung@gmail.com>,
	"Yanmin Zhang" <yanmin.zhang@intel.com>,
	"Wu Fengguang" <fengguang.wu@intel.com>,
	"Mike Galbraith" <efault@gmx.de>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	秦承刚 <chenggang.qcg@taobao.com>
Subject: Re: 答复:答复:[PATCH 2/4] perf tools: relate 'start' & 'end' to perf_session
Date: Thu, 07 Nov 2013 08:55:18 -0700	[thread overview]
Message-ID: <527BB7E6.9060402@gmail.com> (raw)
In-Reply-To: <6d5d4b79-c25a-4f12-984a-58b310dae2a5@alibaba-inc.com>

On 11/7/13, 5:14 AM, 秦承刚 wrote:
> Hi, David
> The samples for the task before the end of the time window are not
> influenced by the time window. The time window only cover the sample
> events in the ordered_samples. FORK, MMAP, COMM events are not in the
> ordered_samples. They are delivered in the function
> "perf_session__process_event". The task events that are after the end of
> the time window can be ingnored safely.

following builtin-report.c:
perf_session__process_events() -> __perf_session__process_events() --> 
perf_session__process_event():

     ret = perf_evlist__parse_sample(session->evlist, event, &sample);
     if (ret)
         return ret;

     if (tool->ordered_samples) {
         ret = perf_session_queue_event(session, event, &sample,
                            file_offset);
         if (ret != -ETIME)
             return ret;
     }

All samples are dropped into the ordered_samples queue if they have a 
timestamp. And I believe it was the sample_id_all patch that put a 
timestamp on task events too (~2.6.35 or 36 timeframe).


> Would you give me a link to your patch?

https://github.com/dsahern/linux/blob/timehist-timeofday-3.9/tools/perf/util/time-utils.c
and
https://github.com/dsahern/linux/blob/timehist-timeofday-3.9/tools/perf/builtin-timehist.c

I did not push the builtin-report.c change, but it follows directly from 
the timehist command.

David

  parent reply	other threads:[~2013-11-07 15:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01  9:29 [PATCH 0/4] perf report: add parameters 'start' & 'end' to specify analysis interval Chenggang Qin
2013-11-01  9:29 ` [PATCH 1/4] perf report: add parameter 'start' & 'end' to perf report Chenggang Qin
2013-11-01  9:29 ` [PATCH 2/4] perf tools: relate 'start' & 'end' to perf_session Chenggang Qin
2013-11-02 22:34   ` David Ahern
     [not found]   ` <f31aa7c2-c31a-47f2-a051-a5bd44f4d07d@alibaba-inc.com>
2013-11-06 15:15     ` 答复:[PATCH " David Ahern
     [not found]     ` <6d5d4b79-c25a-4f12-984a-58b310dae2a5@alibaba-inc.com>
2013-11-07 15:55       ` David Ahern [this message]
2013-11-01  9:29 ` [PATCH 3/4] perf tools: record min_timestamp of samples queue in ordered_samples Chenggang Qin
2013-11-02 22:33   ` David Ahern
2013-11-01  9:29 ` [PATCH 4/4] perf tools: add the feature to assign analysis interval to perf report Chenggang Qin
2013-11-01  9:47 ` [PATCH 0/4] perf report: add parameters 'start' & 'end' to specify analysis interval Ingo Molnar

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=527BB7E6.9060402@gmail.com \
    --to=dsahern@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=chenggang.qcg@alibaba-inc.com \
    --cc=chenggang.qcg@taobao.com \
    --cc=chenggang.qin@gmail.com \
    --cc=efault@gmx.de \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@gmail.com \
    --cc=paulus@samba.org \
    --cc=yanmin.zhang@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