linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	"David S. Ahern" <daahern@cisco.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] perf tools: Add reference timestamp to perf header
Date: Mon, 13 Dec 2010 15:14:50 -0200	[thread overview]
Message-ID: <20101213171450.GA7417@ghostprotocols.net> (raw)
In-Reply-To: <20101213170923.GB1691@nowhere>

Em Mon, Dec 13, 2010 at 06:09:26PM +0100, Frederic Weisbecker escreveu:
> On Mon, Dec 13, 2010 at 02:48:54PM -0200, Arnaldo Carvalho de Melo wrote:
> > Em Mon, Dec 13, 2010 at 04:54:56PM +0100, Frederic Weisbecker escreveu:
> > > On Mon, Dec 13, 2010 at 07:39:24AM -0700, David S. Ahern wrote:
> > > > On 12/12/10 13:16, Frederic Weisbecker wrote:
> > > > >>  int perf_session__create_kernel_maps(struct perf_session *self)
> > > > >>  {
> > > > >>  	int ret = machine__create_kernel_maps(&self->host_machine);
> > > > >> @@ -167,6 +190,9 @@ struct perf_session *perf_session__new(const char *filename, int mode, bool forc
> > > > >>  		 */
> > > > >>  		if (perf_session__create_kernel_maps(self) < 0)
> > > > >>  			goto out_delete;
> > > > >> +
> > > > >> +		if (perf_session__create_ref_time(self) < 0)
> > > > >> +			goto out_delete;
> > 
> > > > > So, it does record it anytime?
> > 
> > > > Simplest to always add it the header as it does no harm if not used.
> > > > To make it conditional means adding an input parameter to
> > > > perf_session__new() and then updating all the callers.
> > 
> > > > Is the preference to make it conditional?
> > 
> > > No, I suspect the overhead is plain unnoticeable. And if it becomes
> > > any problem one day, we can still make that conditional later.
> > 
> > Right, but it just ocurred to me, can't we encode this in the file stat?
> > Also, how do we deal with:
> > 
> > $ perf record --help
> > <SNIP>
> >        -A, --append
> >            Append to the output file to do incremental profiling.
> > <SNIP>
> > 
> > ?
> > 
> > I now think this should be implemented as a PERF_RECORD_WALL_CLOCK
> > synthesized event, to be inserted just before we start collecting the
> > other events.
> > 
> > That way, when --appending, we just insert another and use that from
> > that point on.
> > 
> > Look at tools/perf/util/event.h, enum perf_user_event_type and look how
> > those are synthesized.
> 
> (Adding peterz)

Adding tglx
 
> Right, but Peter wanted us to get rid of these user events types.
> I guess we can't really do this as new perf tools must be able
> to support old perf files.
> 
> So this should be the last one to add. Something like PERF_RECORD_GEN_EVT
> that has a field in its headers containing a sub-type which can be this
> wall clock but can also host about everything in the future.
> 
> This way we don't propagate more the possible overlap with the kernel.

That works for me. I would call it:

PERF_RECORD_SYNTH

our ioctl ;-)

But whatever, just a name.

- Arnaldo

  parent reply	other threads:[~2010-12-13 17:14 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08  1:54 [PATCH 0/2] perf tools: add reference timestamp and use it in time history dump David Ahern
2010-12-08  1:54 ` [PATCH 1/2] perf tools: Add reference timestamp to perf header David Ahern
2010-12-12 20:16   ` Frederic Weisbecker
2010-12-13 13:15     ` Arnaldo Carvalho de Melo
2010-12-13 16:58       ` Arnaldo Carvalho de Melo
2010-12-13 14:39     ` David S. Ahern
2010-12-13 15:54       ` Frederic Weisbecker
2010-12-13 16:48         ` Arnaldo Carvalho de Melo
2010-12-13 17:09           ` Frederic Weisbecker
2010-12-13 17:11             ` Peter Zijlstra
2010-12-13 17:13               ` Peter Zijlstra
2010-12-13 17:23                 ` Frederic Weisbecker
2010-12-13 17:37                   ` Peter Zijlstra
2010-12-13 17:50                     ` Frederic Weisbecker
2010-12-13 17:15               ` Frederic Weisbecker
2010-12-13 17:18                 ` Peter Zijlstra
2010-12-13 17:22                   ` Arnaldo Carvalho de Melo
2010-12-13 17:35                     ` Peter Zijlstra
2010-12-13 17:43                       ` Arnaldo Carvalho de Melo
2010-12-13 17:51                         ` Peter Zijlstra
2010-12-13 18:05                           ` Frederic Weisbecker
2010-12-13 18:10                             ` Peter Zijlstra
2010-12-13 17:47                       ` Peter Zijlstra
2010-12-13 17:49                         ` David S. Ahern
2010-12-13 17:57                           ` Peter Zijlstra
2010-12-13 18:01                             ` David S. Ahern
2010-12-13 18:06                               ` Peter Zijlstra
2010-12-13 18:20                                 ` David S. Ahern
2010-12-13 19:08                               ` Arnaldo Carvalho de Melo
2010-12-13 19:15                                 ` David S. Ahern
2010-12-13 19:22                                   ` Peter Zijlstra
2010-12-13 19:17                                 ` Peter Zijlstra
2010-12-13 17:48                       ` Peter Zijlstra
2010-12-13 17:14             ` Arnaldo Carvalho de Melo [this message]
2010-12-13 17:36           ` David S. Ahern
2010-12-13 17:51             ` Arnaldo Carvalho de Melo
2010-12-08  1:54 ` [PATCH 2/2] perf tools: Add option to show time history of event samples David Ahern
2010-12-08 21:06   ` Arnaldo Carvalho de Melo
2010-12-12 21:32   ` Frederic Weisbecker
2010-12-09 17:18 ` [PATCH 0/2] perf tools: add reference timestamp and use it in time history dump Arnaldo Carvalho de Melo
2010-12-12 21:39   ` Frederic Weisbecker
  -- strict thread matches above, loose matches on Subject: below --
2010-11-29 23:07 [PATCH 0/2] perf tools: reference timestamp and " David Ahern
2010-11-29 23:07 ` [PATCH 1/2] perf tools: add reference timestamp to perf header 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=20101213171450.GA7417@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=daahern@cisco.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).