From: Ingo Molnar <mingo@elte.hu>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Arjan van de Ven <arjan@infradead.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] perf: Fix timechart header handling
Date: Sun, 6 Dec 2009 13:13:53 +0100 [thread overview]
Message-ID: <20091206121353.GA31559@elte.hu> (raw)
In-Reply-To: <874oo48fq8.fsf@devron.myhome.or.jp>
* OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> wrote:
> Ingo Molnar <mingo@elte.hu> writes:
>
> > * OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> wrote:
> >
> >> Hi,
> >>
> >> Update "struct trace_entry" to match with current one. And remove
> >> "size" field from it.
> >>
> >> If it has "size", it become cause of alignment mismatch of structure
> >> with kernel.
> >>
> >> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> >> ---
> >>
> >> tools/perf/builtin-timechart.c | 12 ++++++++----
> >> 1 file changed, 8 insertions(+), 4 deletions(-)
> >
> > Just curious, have you tested timechart functionality after having done
> > this change - does it still work fine for you?
>
> Yes. Rather, it doesn't work without this. (Without patch, it provide
> svg output, but it doesn't provide correct sched state. And this issue
> is only 64bit arch.)
>
> E.g. The following has difference (perf timechart doesn't has hole).
>
> In kernel,
>
> struct ftrace_raw_sched_switch {
> struct trace_entry ent; /* 0 12 */
> char prev_comm[16]; /* 12 16 */
> pid_t prev_pid; /* 28 4 */
> int prev_prio; /* 32 4 */
>
> /* XXX 4 bytes hole, try to pack */
>
> long int prev_state; /* 40 8 */
> char next_comm[16]; /* 48 16 */
> /* --- cacheline 1 boundary (64 bytes) --- */
> pid_t next_pid; /* 64 4 */
> int next_prio; /* 68 4 */
> char __data[0]; /* 72 0 */
>
> /* size: 72, cachelines: 2, members: 9 */
> /* sum members: 68, holes: 1, sum holes: 4 */
> /* last cacheline: 8 bytes */
> };
>
> In perl timechart, [Note, struct trace_entry is including "u32 size"]
>
> struct sched_switch {
> struct trace_entry te; /* 0 16 */
> char prev_comm[16]; /* 16 16 */
> int prev_pid; /* 32 4 */
> int prev_prio; /* 36 4 */
> long int prev_state; /* 40 8 */
> char next_comm[16]; /* 48 16 */
> /* --- cacheline 1 boundary (64 bytes) --- */
> int next_pid; /* 64 4 */
> int next_prio; /* 68 4 */
>
> /* size: 72, cachelines: 2, members: 8 */
> /* last cacheline: 8 bytes */
> };
>
ok - thanks for the confirmation!
Ingo
next prev parent reply other threads:[~2009-12-06 12:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-06 11:07 [PATCH 1/3] perf: Fix timechart header handling OGAWA Hirofumi
2009-12-06 11:08 ` [PATCH 2/3] perf: make common SAMPLE_EVENT parser OGAWA Hirofumi
2009-12-06 11:10 ` [PATCH 3/3] perf: misc small fixes OGAWA Hirofumi
2009-12-06 17:19 ` [tip:perf/urgent] perf tools: Misc " tip-bot for OGAWA Hirofumi
2009-12-06 17:18 ` [tip:perf/urgent] perf: Make common SAMPLE_EVENT parser tip-bot for OGAWA Hirofumi
2009-12-06 11:54 ` [PATCH 1/3] perf: Fix timechart header handling Ingo Molnar
2009-12-06 12:11 ` OGAWA Hirofumi
2009-12-06 12:13 ` Ingo Molnar [this message]
2009-12-06 12:22 ` OGAWA Hirofumi
2009-12-06 17:18 ` [tip:perf/urgent] perf timechart: Fix " tip-bot for OGAWA Hirofumi
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=20091206121353.GA31559@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=arjan@infradead.org \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.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