Skip to content

Commit

Permalink
8256017: Remove unused elapsedTimer constructor
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl, hseigel
  • Loading branch information
cl4es committed Nov 10, 2020
1 parent 7d4e86b commit f2a0bf3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
18 changes: 1 addition & 17 deletions src/hotspot/share/runtime/timer.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -47,22 +47,6 @@ jlong TimeHelper::micros_to_counter(jlong micros) {
return micros * freq;
}

elapsedTimer::elapsedTimer(jlong time, jlong timeUnitsPerSecond) {
_active = false;
jlong osTimeUnitsPerSecond = os::elapsed_frequency();
assert(osTimeUnitsPerSecond % 1000 == 0, "must be");
assert(timeUnitsPerSecond % 1000 == 0, "must be");
while (osTimeUnitsPerSecond < timeUnitsPerSecond) {
timeUnitsPerSecond /= 1000;
time *= 1000;
}
while (osTimeUnitsPerSecond > timeUnitsPerSecond) {
timeUnitsPerSecond *= 1000;
time /= 1000;
}
_counter = time;
}

void elapsedTimer::add(elapsedTimer t) {
_counter += t._counter;
}
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/runtime/timer.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -37,7 +37,6 @@ class elapsedTimer {
bool _active;
public:
elapsedTimer() { _active = false; reset(); }
elapsedTimer(jlong time, jlong timeUnitsPerSecond);
void add(elapsedTimer t);
void start();
void stop();
Expand Down

0 comments on commit f2a0bf3

Please sign in to comment.