<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Yes, it seems "now" should also used elapsedTime().</p>
<p>Thanks.</p>
<p>joe<br>
</p>
<br>
<div class="moz-cite-prefix">On 8/16/2016 2:35 PM, Jon Masamitsu
wrote:<br>
</div>
<blockquote
cite="mid:80cabea3-0479-6187-f76b-02e2eaf4555b@oracle.com"
type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
Joe,<br>
<br>
"last" seems to get its value from elapsedTime() (through
last_known_gc_end_time_sec()<br>
from _prev_collection_pause_end_ms in G1Analytics).<br>
<pre>2479 double last = analytics->last_known_gc_end_time_sec();</pre>
for example<br>
<br>
<blockquote type="cite">void
G1DefaultPolicy::record_full_collection_end() {<br>
// Consider this like a collection pause for the purposes of
allocation<br>
// since last pause.<br>
double end_sec = os::elapsedTime();<br>
double full_gc_time_sec = end_sec -
_full_collection_start_sec;<br>
double full_gc_time_ms = full_gc_time_sec * 1000.0;<br>
<br>
_analytics->update_recent_gc_times(end_sec,
full_gc_time_ms);<br>
</blockquote>
<br>
<br>
Should "now" use elapsedTime()?<br>
<br>
Jon<br>
<br>
<br>
<div class="moz-cite-prefix">On 8/16/2016 11:20 AM, Joseph Provino
wrote:<br>
</div>
<blockquote
cite="mid:d4e5f113-ac97-2eca-e161-b5ad29ae7a2d@oracle.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<p>Please review this one line change:<br>
<br>
<span style="color: rgb(51, 51, 51); font-family: sans-serif;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
20px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display:
inline !important; float: none; background-color: rgb(255,
255, 255);">jlong G1CollectedHeap::millis_since_last_gc() {<span
class="Apple-converted-space"> </span></span><br
style="color: rgb(51, 51, 51); font-family: sans-serif;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
20px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">
<br style="color: rgb(51, 51, 51); font-family: sans-serif;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
20px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">
<span style="color: rgb(51, 51, 51); font-family: sans-serif;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
20px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display:
inline !important; float: none; background-color: rgb(255,
255, 255);">This: jlong now = os::elapsed_counter() /
NANOSECS_PER_MILLISEC;<span class="Apple-converted-space"> </span></span><br
style="color: rgb(51, 51, 51); font-family: sans-serif;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
20px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">
<br style="color: rgb(51, 51, 51); font-family: sans-serif;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
20px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">
<span style="color: rgb(51, 51, 51); font-family: sans-serif;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
20px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display:
inline !important; float: none; background-color: rgb(255,
255, 255);">Should be: jlong now = os::javaTimeNanos() /
NANOSECS_PER_MILLISEC;<span class="Apple-converted-space"> </span></span><br>
<br>
CR: <a moz-do-not-send="true" class="issue-link"
data-issue-key="JDK-8164124"
href="https://bugs.openjdk.java.net/browse/JDK-8164124"
id="key-val" rel="4897504" style="color: rgb(59, 115, 175);
text-decoration: none;">JDK-8164124</a> The fix for
JDK-8071770 incorrectly uses os::elapsed_counter()<br>
<br>
Webrev: <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Ejprovino/8164124/webrev.00">http://cr.openjdk.java.net/~jprovino/8164124/webrev.00</a></p>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>