Skip to content

Commit

Permalink
remove 'supports_vtime'
Browse files Browse the repository at this point in the history
  • Loading branch information
LizBing committed Dec 15, 2023
1 parent bdebf19 commit c0d89b4
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
2 changes: 0 additions & 2 deletions src/hotspot/os/posix/os_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1434,8 +1434,6 @@ jlong os::elapsed_frequency() {
return NANOSECS_PER_SEC; // nanosecond resolution
}

bool os::supports_vtime() { return true; }

// Return the real, user, and system times in seconds from an
// arbitrary fixed point in the past.
bool os::getTimesSecs(double* process_real_time,
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/os/windows/os_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,6 @@ FILETIME java_to_windows_time(jlong l) {
return result;
}

bool os::supports_vtime() { return true; }

double os::elapsedVTime() {
FILETIME created;
FILETIME exited;
Expand Down
6 changes: 1 addition & 5 deletions src/hotspot/share/gc/g1/g1ConcurrentRefineThread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ class G1ConcurrentRefineThread: public ConcurrentGCThread {
// Update concurrent refine threads stats.
// If we are in Primary thread, we additionally update CPU time tracking.
virtual void track_usage() {
if (os::supports_vtime()) {
_vtime_accum = (os::elapsedVTime() - _vtime_start);
} else {
_vtime_accum = 0.0;
}
_vtime_accum = (os::elapsedVTime() - _vtime_start);
};

// Helper for do_refinement_step implementations. Try to perform some
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/runtime/os.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ class os: AllStatic {
// actually run. The first function indicates whether the OS supports
// this functionality for the current thread, and if so the second
// returns the elapsed virtual time for the current thread.
static bool supports_vtime();
static double elapsedVTime();

// Return current local time in a string (YYYY-MM-DD HH:MM:SS).
Expand Down

0 comments on commit c0d89b4

Please sign in to comment.