RFR: 8373557: Remove stale comments after JDK-8372584

Jonas Norlinder jnorlinder at openjdk.org
Thu Dec 11 22:12:00 UTC 2025


Hi all,

This is a small patch to fix stale comments after removing reading /proc to get user CPU time.

A note on the proposed removal of:

// This is the fastest way to get thread cpu time on Linux.
// Returns cpu time (user+sys) for any thread, not only for current.
// POSIX compliant clocks are implemented in the kernels 2.6.16+.
// It might work on 2.6.10+ with a special kernel/glibc patch.
// For reference, please, see IEEE Std 1003.1-2004:
//   http://www.unix.org/single_unix_specification

jlong os::Linux::thread_cpu_time(clockid_t clockid) {


Since we may call this method with a clockid_t that will only resolve user time this comment may be confusing. Moreover, I don't think we need to keep the comment here when POSIX compliant clock are implemented.

-------------

Commit messages:
 - Remove stale comments

Changes: https://git.openjdk.org/jdk/pull/28777/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28777&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8373557
  Stats: 11 lines in 2 files changed: 0 ins; 10 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/28777.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28777/head:pull/28777

PR: https://git.openjdk.org/jdk/pull/28777


More information about the hotspot-runtime-dev mailing list