public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@linux.intel.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: perf: store and retrieve trace event names in the perf.data file
Date: Sun, 09 Aug 2009 16:10:12 -0700	[thread overview]
Message-ID: <4A7F5754.3040703@linux.intel.com> (raw)
In-Reply-To: <20090809230430.GB6089@nowhere>

Frederic Weisbecker wrote:
> On Sun, Aug 09, 2009 at 04:01:30PM -0700, Arjan van de Ven wrote:
>> Frederic Weisbecker wrote:
>>> On Sun, Aug 09, 2009 at 02:49:23PM -0700, Arjan van de Ven wrote:
>>>> In order to be able to use trace events, a key aspect is the "type" field;
>>>> this is the id of the event that you recorded, as stored in the /sys/kernel/debug/events/*/*/id file.
>>>> What is currently missing is a way to map the id number (which is not abi stable)
>>>> to the event that was recorded.
>>>
>>>
>>> We already have that.
>>> See tools/perf/util/parse-events.c: char *tracepoint_id_to_name(u64 id)
>>
>> sadly... we don't.
>>
>> You do it *on the same boot and machine* as you created the perf.data file.
>> You don't have it when you reboot into a new kernel, or move the perf.data file
>> to a new machine........
>>
>> Which is to be honest a very common usecase.
> 
> 
> Ah right... I always forget the offline report case.
> But you can at least reuse this existing helper to resolve
> the id to name.
> 

ok I'll unstatic it, move it to a different file and ..

eh how about not?

this helper looks up an on disk id/name pair, and is private to it's existing file.
Fine.

The other one is based on the perf data, and all that is in header.c instead....



  reply	other threads:[~2009-08-09 23:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-09 21:49 perf: store and retrieve trace event names in the perf.data file Arjan van de Ven
2009-08-09 22:44 ` Frederic Weisbecker
2009-08-09 23:01   ` Arjan van de Ven
2009-08-09 23:04     ` Frederic Weisbecker
2009-08-09 23:10       ` Arjan van de Ven [this message]
2009-08-10  9:50 ` Peter Zijlstra

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=4A7F5754.3040703@linux.intel.com \
    --to=arjan@linux.intel.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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