Commit 00b0364f authored by hpayer@chromium.org's avatar hpayer@chromium.org

Use current time to calculate context disposal rate.

BUG=
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/679363003

Cr-Commit-Position: refs/heads/master@{#25212}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e21d3d7e
...@@ -492,7 +492,7 @@ intptr_t GCTracer::NewSpaceAllocationThroughputInBytesPerMillisecond() const { ...@@ -492,7 +492,7 @@ intptr_t GCTracer::NewSpaceAllocationThroughputInBytesPerMillisecond() const {
double GCTracer::ContextDisposalRateInMilliseconds() const { double GCTracer::ContextDisposalRateInMilliseconds() const {
if (context_disposal_events_.size() == 0) return 0.0; if (context_disposal_events_.size() == 0) return 0.0;
double begin = context_disposal_events_.begin()->time_; double begin = base::OS::TimeCurrentMillis();
double end = 0.0; double end = 0.0;
ContextDisposalEventBuffer::const_iterator iter = ContextDisposalEventBuffer::const_iterator iter =
context_disposal_events_.begin(); context_disposal_events_.begin();
......
...@@ -341,8 +341,8 @@ class GCTracer { ...@@ -341,8 +341,8 @@ class GCTracer {
intptr_t NewSpaceAllocationThroughputInBytesPerMillisecond() const; intptr_t NewSpaceAllocationThroughputInBytesPerMillisecond() const;
// Computes the context disposal rate in milliseconds. It takes the time // Computes the context disposal rate in milliseconds. It takes the time
// frame of the first and last context disposal event and devides it by the // frame of the first recorded context disposal to the current time and
// number of recorded events. // divides it by the number of recorded events.
// Returns 0 if no events have been recorded. // Returns 0 if no events have been recorded.
double ContextDisposalRateInMilliseconds() const; double ContextDisposalRateInMilliseconds() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment