Commit 364e864a authored by yangguo@chromium.org's avatar yangguo@chromium.org

Add timestamp to --trace-gc output.

BUG=v8:1932
TEST=

Review URL: https://chromiumcodereview.appspot.com/9307116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a13ad531
......@@ -6595,6 +6595,8 @@ GCTracer::~GCTracer() {
}
}
PrintF("%8.0f ms: ", heap_->isolate()->time_millis_since_init());
if (!FLAG_trace_gc_nvp) {
int external_time = static_cast<int>(scopes_[Scope::EXTERNAL]);
......
......@@ -1834,6 +1834,7 @@ bool Isolate::Init(Deserializer* des) {
}
state_ = INITIALIZED;
time_millis_at_init_ = OS::TimeCurrentMillis();
return true;
}
......
......@@ -1030,6 +1030,10 @@ class Isolate {
context_exit_happened_ = context_exit_happened;
}
double time_millis_since_init() {
return OS::TimeCurrentMillis() - time_millis_at_init_;
}
private:
Isolate();
......@@ -1200,6 +1204,9 @@ class Isolate {
// that a context was recently exited.
bool context_exit_happened_;
// Time stamp at initialization.
double time_millis_at_init_;
#if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
bool simulator_initialized_;
......
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