From: Peter Zijlstra <peterz@infradead.org>
To: Arjan van de Ven <arjan@linux.intel.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: Mon, 10 Aug 2009 11:50:05 +0200 [thread overview]
Message-ID: <1249897805.17467.77.camel@twins> (raw)
In-Reply-To: <4A7F4463.3050508@linux.intel.com>
Thanks for the CC :-)
On Sun, 2009-08-09 at 14:49 -0700, Arjan van de Ven wrote:
> +static void store_event_type(const char *orgname)
> +{
> + char filename[PATH_MAX], *c;
> + FILE *file;
> + int id;
> +
> + sprintf(filename, "/sys/kernel/debug/tracing/events/%s/id", orgname);
That should be using debugfs_path, as it stands this thing won't work on
any of my machines.
> + c = strchr(filename, ':');
> + if (c) *c = '/';
> +
> + file = fopen(filename, "r");
> + if (!file)
> + return;
> + fscanf(file, "%i", &id);
> + fclose(file);
> + perf_header__push_event(id, orgname);
> +}
prev parent reply other threads:[~2009-08-10 9:50 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
2009-08-10 9:50 ` Peter Zijlstra [this message]
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=1249897805.17467.77.camel@twins \
--to=peterz@infradead.org \
--cc=arjan@linux.intel.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