From: <wang.yaxin@zte.com.cn>
To: <akpm@linux-foundation.org>, <fan.yu9@zte.com.cn>,
<yang.yang29@zte.com.cn>
Cc: <corbet@lwn.net>, <linux-kernel@vger.kernel.org>,
<linux-doc@vger.kernel.org>, <xu.xin16@zte.com.cn>,
<wang.yaxin@zte.com.cn>
Subject: [PATCH 0/3] tools/accounting: refactor delay fields and share format_timespec()
Date: Sat, 11 Jul 2026 17:31:12 +0800 (CST) [thread overview]
Message-ID: <20260711173112482SCQEM08VED2PT1pxUYOXk@zte.com.cn> (raw)
From: Wang Yaxin <wang.yaxin@zte.com.cn>
- Convert per-field delay members in struct task_info to an array indexed
by enum delay_type, eliminating offsetof() pointer arithmetic.
- Factor out a common format_timespec() implementation shared by getdelays
and delaytop, using strftime for cleaner timestamp formatting.
- Replace the complex sizeof/ULL/shift Y2038 guard with a direct narrowing
truncation check ((long long)time_sec != ts->tv_sec).
Wang Yaxin (3):
delaytop: refactor repetitive delay fields into array with enum
tools/accounting: factor out shared format_timespec() implementation
tools/accounting: simplify 32-bit time_t overflow check in
format_timespec()
tools/accounting/Makefile | 12 +-
tools/accounting/delaytop.c | 261 +++++++++-----------------
tools/accounting/format_timespec.c | 37 ++++
tools/accounting/format_timespec.h | 9 +
tools/accounting/getdelays.c | 32 +---
tools/include/uapi/linux/time_types.h | 18 ++
6 files changed, 169 insertions(+), 200 deletions(-)
create mode 100644 tools/accounting/format_timespec.c
create mode 100644 tools/accounting/format_timespec.h
create mode 100644 tools/include/uapi/linux/time_types.h
--
2.27.0
next reply other threads:[~2026-07-11 9:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-11 9:31 wang.yaxin [this message]
2026-07-11 9:32 ` [PATCH 1/3] delaytop: refactor repetitive delay fields into array with enum wang.yaxin
2026-07-14 3:07 ` xu.xin16
2026-07-11 9:33 ` [PATCH 2/3] tools/accounting: factor out shared format_timespec() implementation wang.yaxin
2026-07-11 9:34 ` [PATCH 3/3] tools/accounting: simplify 32-bit time_t overflow check in format_timespec() wang.yaxin
2026-07-14 2:48 ` [PATCH 0/3] tools/accounting: refactor delay fields and share format_timespec() Andrew Morton
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=20260711173112482SCQEM08VED2PT1pxUYOXk@zte.com.cn \
--to=wang.yaxin@zte.com.cn \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=fan.yu9@zte.com.cn \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xu.xin16@zte.com.cn \
--cc=yang.yang29@zte.com.cn \
/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
all inboxes | Powered by JetHome®