From: Stanislav Fomichev <stfomichev@yandex-team.ru>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Chia-I Wu <olvaffe@gmail.com>,
a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com,
linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] perf timechart: remove lock_depth from trace_entry
Date: Tue, 26 Nov 2013 17:47:55 +0400 [thread overview]
Message-ID: <20131126134755.GD3388@stfomichev-desktop> (raw)
In-Reply-To: <20131126121026.GD27323@ghostprotocols.net>
> Se above, if before this patch the format_field info was obtained from
> the perf.data file, why should it now get it from the local machine?
Yes, sorry for confusion, I didn't know that we can obtain trace events
format from the perf.data. I hence have no concerns regarding your
implementation :-)
> Please try. There should be no limitations.
It does not work because lock_depth and common_pid are common fields,
while perf_evsel__field looks in non-common fields. And even if we find
lock_depth/common_pid common field we can't do field->next, because
common and non-common fields are not linked and ->next in the last common
field is NULL (this is what I got when I tried to use pevent_find_any_field
instead of pevent_find_field in perf_evsel__field).
I slightly modified timechart__set_payload_offset from you patch to look
for the first non-common field and use its offset, but it looks kinda ugly:
static int timechart__set_payload_offset(struct perf_evlist *evlist)
{
struct perf_evsel *evsel = perf_evlist__first(evlist);
struct format_field *field = evsel->tp_format->format.fields;
if (!field)
return -1;
payload_offset = field->offset;
return 0;
}
Maybe we can add some helper routine which returns first non-common
field, like:
struct format_field *perf_evsel__first_field(struct perf_evsel *evsel, const char *name)
{
return evsel->tp_format->format.fields;
}
and call it in timechart__set_payload_offset?
next prev parent reply other threads:[~2013-11-26 13:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-07 6:48 [PATCH] perf timechart: remove lock_depth from trace_entry Chia-I Wu
2013-10-22 10:32 ` Stanislav Fomichev
2013-11-25 18:21 ` Arnaldo Carvalho de Melo
2013-11-26 11:05 ` Stanislav Fomichev
2013-11-26 12:10 ` Arnaldo Carvalho de Melo
2013-11-26 13:47 ` Stanislav Fomichev [this message]
2013-11-26 13:57 ` Arnaldo Carvalho de Melo
2013-11-26 14:54 ` [PATCH] perf timechart: dynamically determine event data offset Stanislav Fomichev
2013-11-26 22:04 ` Arnaldo Carvalho de Melo
2013-11-27 8:49 ` Namhyung Kim
2013-11-27 9:01 ` Stanislav Fomichev
2013-11-27 10:45 ` [PATCH] perf timechart: dynamically determine event fields offset Stanislav Fomichev
2013-11-30 12:53 ` [tip:perf/core] " tip-bot for Stanislav Fomichev
2013-11-27 13:44 ` [PATCH] perf timechart: dynamically determine event data offset Arnaldo Carvalho de Melo
2013-11-27 14:17 ` Namhyung Kim
2013-11-27 14:41 ` Arnaldo Carvalho de Melo
2013-11-27 14:51 ` Namhyung Kim
2013-11-27 14:55 ` Arnaldo Carvalho de Melo
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=20131126134755.GD3388@stfomichev-desktop \
--to=stfomichev@yandex-team.ru \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=olvaffe@gmail.com \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
/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