From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
David Ahern <dsahern@gmail.com>, Thomas Renninger <trenn@suse.de>
Subject: Re: [PATCH 1/4] perf tools: Remove event types framework only user
Date: Thu, 11 Jul 2013 15:16:45 +0900 [thread overview]
Message-ID: <87oba9y62a.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <1373388539-9347-2-git-send-email-jolsa@redhat.com> (Jiri Olsa's message of "Tue, 9 Jul 2013 18:48:56 +0200")
Hi Jiri,
On Tue, 9 Jul 2013 18:48:56 +0200, Jiri Olsa wrote:
> The only user of the event types data is 'perf timechart'
> command and uses this info to identify proper tracepoints
> based on its name.
>
> Switching this code to use traceevent library API to obtain
> IDs for needed tracepoints. This should also make the samples
> processing faster as we no longer compare strings but numbers.
A better way I think is using tracepoint handlers. You don't need to
compare anything this way since an evsel can know its handler.
Please see perf_session__set_tracepoints_handlers() and builtin-
{kmem,lock,sched}.c.
[SNIP]
>
> -/*
> - * trace_flag_type is an enumeration that holds different
> - * states when a trace occurs. These are:
> - * IRQS_OFF - interrupts were disabled
> - * IRQS_NOSUPPORT - arch does not support irqs_disabled_flags
> - * NEED_RESCED - reschedule is requested
> - * HARDIRQ - inside an interrupt handler
> - * SOFTIRQ - inside a softirq handler
> - */
> -enum trace_flag_type {
> - TRACE_FLAG_IRQS_OFF = 0x01,
> - TRACE_FLAG_IRQS_NOSUPPORT = 0x02,
> - TRACE_FLAG_NEED_RESCHED = 0x04,
> - TRACE_FLAG_HARDIRQ = 0x08,
> - TRACE_FLAG_SOFTIRQ = 0x10,
> -};
Why did you remove this part? Isn't it used by elsewhere? Anyway, it
seems unrelated to this change.
[SNIP]
> +static int get_id(const char *sys, const char *name, u32 *id)
> +{
> + struct event_format *format;
> +
> + format = event_format__new(sys, name);
No. You need to access to tracepoints in the perf session data, not
ones in the current system. The perf_session__set_tracepoints_handlers()
deals with it correctly.
Thanks,
Namhyung
> + if (!format)
> + return -1;
> +
> + *id = format->id;
> + pevent_free_format(format);
> + return 0;
> +}
next prev parent reply other threads:[~2013-07-11 6:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 16:48 [RFC 0/4] perf tools: Remove event types data Jiri Olsa
2013-07-09 16:48 ` [PATCH 1/4] perf tools: Remove event types framework only user Jiri Olsa
2013-07-11 6:16 ` Namhyung Kim [this message]
2013-07-11 12:26 ` Jiri Olsa
2013-07-09 16:48 ` [PATCH 2/4] perf tools: Remove event types from perf data file Jiri Olsa
2013-07-09 16:48 ` [PATCH 3/4] perf tools: Remove event types pushing from record command Jiri Olsa
2013-07-09 16:48 ` [PATCH 4/4] perf tools: Remove event types framework completely Jiri Olsa
2013-07-09 20:49 ` [RFC 0/4] perf tools: Remove event types data Jiri Olsa
2013-07-10 6:11 ` Thomas Renninger
2013-07-10 7:49 ` Jiri Olsa
2013-07-15 19:11 ` Arnaldo Carvalho de Melo
2013-07-11 6:19 ` Namhyung Kim
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=87oba9y62a.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=trenn@suse.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
Powered by JetHome