From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: mingo@redhat.com, hpa@zytor.com, spencer@bluehost.com,
linux-kernel@vger.kernel.org, peterz@infradead.org,
tglx@linutronix.de, oleg@redhat.com, sgruszka@redhat.com,
linux-tip-commits@vger.kernel.org
Subject: Re: [tip:sched/core] sched: Fix granularity of task_u/stime()
Date: Mon, 16 Nov 2009 11:44:17 +0900 [thread overview]
Message-ID: <4B00BC81.8060706@jp.fujitsu.com> (raw)
In-Reply-To: <20091113230910.GA11280@elte.hu>
Ingo Molnar wrote:
> * tip-bot for Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> wrote:
>
>> Commit-ID: 761b1d26df542fd5eb348837351e4d2f3bc7bffe
>> Gitweb: http://git.kernel.org/tip/761b1d26df542fd5eb348837351e4d2f3bc7bffe
>> Author: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
>> AuthorDate: Thu, 12 Nov 2009 13:33:45 +0900
>> Committer: Ingo Molnar <mingo@elte.hu>
>> CommitDate: Thu, 12 Nov 2009 15:23:47 +0100
>>
>> sched: Fix granularity of task_u/stime()
>>
>> Originally task_s/utime() were designed to return clock_t but
>> later changed to return cputime_t by following commit:
>
> i think this one causes this new warning in -tip:
>
> include/trace/events/timer.h:279: warning: format '%lu'
> expects type 'long unsigned int', but argument 4 has type 'cputime_t'
No. I believe the warning was already there.
Following patch, based on tip:sched/core, will remove the warning.
Thanks,
H.Seto
===
Subject: [PATCH] trace: cputime_t is not always unsigned long
Type of cputime_t can be u64, unsigned long long or so on,
e.g. if kernel is configured with VIRT_CPU_ACCOUNTING=y.
So it can cause following warning:
include/trace/events/timer.h:279: warning: format '%lu'
expects type 'long unsigned int', but argument 4 has type 'cputime_t'
For printk(), it is better to use cputime_to_cputime64() and %llu,
since cputime64_t is always u64.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
---
include/trace/events/timer.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h
index 1844c48..8f4ec13 100644
--- a/include/trace/events/timer.h
+++ b/include/trace/events/timer.h
@@ -302,8 +302,8 @@ TRACE_EVENT(itimer_state,
__entry->interval_usec = value->it_interval.tv_usec;
),
- TP_printk("which %d, expires %lu, it_value %lu.%lu, it_interval %lu.%lu",
- __entry->which, __entry->expires,
+ TP_printk("which %d, expires %llu, it_value %lu.%lu, it_interval %lu.%lu",
+ __entry->which, cputime_to_cputime64(__entry->expires),
__entry->value_sec, __entry->value_usec,
__entry->interval_sec, __entry->interval_usec)
);
@@ -332,8 +332,8 @@ TRACE_EVENT(itimer_expire,
__entry->pid = pid_nr(pid);
),
- TP_printk("which %d, pid %d, now %lu", __entry->which,
- (int) __entry->pid, __entry->now)
+ TP_printk("which %d, pid %d, now %llu", __entry->which,
+ (int) __entry->pid, cputime_to_cputime64(__entry->now))
);
#endif /* _TRACE_TIMER_H */
--
1.6.5.2
prev parent reply other threads:[~2009-11-16 2:44 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-04 0:23 utime/stime decreasing on thread exit Spencer Candland
2009-11-04 6:49 ` Hidetoshi Seto
2009-11-05 5:24 ` Hidetoshi Seto
2009-11-09 14:49 ` Peter Zijlstra
2009-11-09 17:20 ` Oleg Nesterov
2009-11-09 17:27 ` Oleg Nesterov
2009-11-09 17:31 ` Peter Zijlstra
2009-11-09 19:23 ` Oleg Nesterov
2009-11-09 19:32 ` Peter Zijlstra
2009-11-10 10:44 ` Stanislaw Gruszka
2009-11-10 17:40 ` Oleg Nesterov
2009-11-10 18:24 ` Stanislaw Gruszka
2009-11-10 19:23 ` Oleg Nesterov
2009-11-17 12:48 ` Stanislaw Gruszka
2009-11-17 12:57 ` [PATCH] posix-cpu-timers: reset expire cache when no timer is running Stanislaw Gruszka
2009-11-10 5:42 ` utime/stime decreasing on thread exit Hidetoshi Seto
2009-11-10 5:47 ` [PATCH] fix granularity of task_u/stime() Hidetoshi Seto
2009-11-11 12:11 ` Stanislaw Gruszka
2009-11-12 0:00 ` Hidetoshi Seto
2009-11-12 2:49 ` Hidetoshi Seto
2009-11-12 2:55 ` Américo Wang
2009-11-12 4:16 ` Hidetoshi Seto
2009-11-12 4:33 ` [PATCH] fix granularity of task_u/stime(), v2 Hidetoshi Seto
2009-11-12 14:15 ` Peter Zijlstra
2009-11-12 14:49 ` Stanislaw Gruszka
2009-11-12 15:00 ` Peter Zijlstra
2009-11-12 15:40 ` Stanislaw Gruszka
2009-11-13 12:42 ` [PATCH] sys_times: fix utime/stime decreasing on thread exit Stanislaw Gruszka
2009-11-13 13:16 ` Peter Zijlstra
2009-11-13 14:12 ` Balbir Singh
2009-11-13 15:36 ` Stanislaw Gruszka
2009-11-13 17:05 ` Peter Zijlstra
2009-11-16 19:32 ` [PATCH] fix granularity of task_u/stime(), v2 Spencer Candland
2009-11-17 13:08 ` Stanislaw Gruszka
2009-11-17 13:24 ` Peter Zijlstra
2009-11-19 18:17 ` Stanislaw Gruszka
2009-11-20 2:00 ` Hidetoshi Seto
2009-11-23 10:09 ` Stanislaw Gruszka
2009-11-23 10:16 ` [PATCH] cputime: avoid do_sys_times() races with __exit_signal() Stanislaw Gruszka
2009-11-30 9:20 ` [PATCH 1/2] cputime: remove prev_{u,s}time if VIRT_CPU_ACCOUNTING Hidetoshi Seto
2009-11-30 9:21 ` [PATCH 2/2] cputime: introduce thread_group_times() Hidetoshi Seto
2009-11-30 14:54 ` Stanislaw Gruszka
2009-12-01 1:02 ` Hidetoshi Seto
2009-12-02 8:26 ` [PATCH -v2 1/2] sched, cputime: cleanups related to task_times() Hidetoshi Seto
2009-12-02 15:17 ` Peter Zijlstra
2009-12-02 15:29 ` Balbir Singh
2009-12-03 0:21 ` Hidetoshi Seto
2009-12-02 15:57 ` Peter Zijlstra
2009-12-02 17:33 ` [tip:sched/core] sched, cputime: Cleanups " tip-bot for Hidetoshi Seto
2009-12-02 8:28 ` [PATCH -v2 2/2] sched, cputime: introduce thread_group_times() Hidetoshi Seto
2009-12-02 15:58 ` Peter Zijlstra
2009-12-02 17:33 ` [tip:sched/core] sched, cputime: Introduce thread_group_times() tip-bot for Hidetoshi Seto
2009-12-02 8:29 ` reproducer: utime decreasing Hidetoshi Seto
2009-12-02 8:32 ` reproducer: invisible utime Hidetoshi Seto
2009-11-23 10:25 ` [PATCH] fix granularity of task_u/stime(), v2 Balbir Singh
2009-11-23 10:46 ` Stanislaw Gruszka
2009-11-24 5:33 ` Hidetoshi Seto
2009-11-18 22:38 ` Spencer Candland
2009-11-23 9:52 ` Stanislaw Gruszka
2009-11-12 18:12 ` [tip:sched/core] sched: Fix granularity of task_u/stime() tip-bot for Hidetoshi Seto
2009-11-13 9:40 ` Stanislaw Gruszka
2009-11-13 23:09 ` Ingo Molnar
2009-11-16 2:44 ` Hidetoshi Seto [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=4B00BC81.8060706@jp.fujitsu.com \
--to=seto.hidetoshi@jp.fujitsu.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=sgruszka@redhat.com \
--cc=spencer@bluehost.com \
--cc=tglx@linutronix.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