From: Frederic Weisbecker <fweisbec@gmail.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <srostedt@redhat.com>,
Li Zefan <lizf@cn.fujitsu.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing: fix incorrect return type of ns2usecs()
Date: Mon, 30 Mar 2009 11:55:23 +0200 [thread overview]
Message-ID: <20090330095522.GA6058@nowhere> (raw)
In-Reply-To: <49D041ED.1060007@cn.fujitsu.com>
On Mon, Mar 30, 2009 at 11:52:13AM +0800, Lai Jiangshan wrote:
>
> Impact: fix time output bug in 32bits system
>
> ns2usecs() returns 'long', it's incorrect.
>
> (In i386)
> # cat trace
> ...
> <idle>-0 [000] 521.442100: _spin_lock <-tick_do_update_jiffies64
> <idle>-0 [000] 521.442101: do_timer <-tick_do_update_jiffies64
> <idle>-0 [000] 521.442102: update_wall_time <-do_timer
> <idle>-0 [000] 521.442102: update_xtime_cache <-update_wall_time
> ....
> (It always print the time less than 2200 seconds besides ...)
> Because 'long' is 32bits in i386. ( (1<<31) useconds is about 2200 seconds)
>
> # cat trace
> ...
> <idle>-0 [001] 4154502640.134759: rcu_bh_qsctr_inc <-__do_softirq
> <idle>-0 [001] 4154502640.134760: _local_bh_enable <-__do_softirq
> <idle>-0 [001] 4154502640.134761: idle_cpu <-irq_exit
> ...
> (very large value)
> Because 'long' is a signed type and is 32bits in i386.
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> Reported-by: Li Zefan <lizf@cn.fujitsu.com>
> Tested-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
prev parent reply other threads:[~2009-03-30 9:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-30 3:52 [PATCH] tracing: fix incorrect return type of ns2usecs() Lai Jiangshan
2009-03-30 5:48 ` [PATCH] tracing: fix incorrect return type of ns2usecs() V2 Lai Jiangshan
2009-04-03 16:13 ` Steven Rostedt
2009-04-07 13:12 ` [tip:tracing/urgent] tracing: fix incorrect return type of ns2usecs() Lai Jiangshan
2009-03-30 9:55 ` Frederic Weisbecker [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=20090330095522.GA6058@nowhere \
--to=fweisbec@gmail.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@elte.hu \
--cc=srostedt@redhat.com \
/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