Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: runtime/vm/service.cc

Issue 2583663002: Internally measure isolate uptime with monotonic time. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 9ea1c512dfe2ebd1a30bfe9c065ebe9d468243ec..bdc71e989bc89aeac33119903309465443afa505 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -3785,7 +3785,6 @@ void Service::PrintJSONForVM(JSONStream* js, bool ref) {
if (ref) {
return;
}
- Isolate* vm_isolate = Dart::vm_isolate();
jsobj.AddProperty("architectureBits", static_cast<intptr_t>(kBitsPerWord));
jsobj.AddProperty("targetCPU", CPU::Id());
jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware());
@@ -3793,9 +3792,8 @@ void Service::PrintJSONForVM(JSONStream* js, bool ref) {
jsobj.AddProperty("_profilerMode", FLAG_profile_vm ? "VM" : "Dart");
jsobj.AddProperty64("pid", OS::ProcessId());
jsobj.AddProperty64("_maxRSS", OS::MaxRSS());
- int64_t start_time_millis =
- (vm_isolate->start_time() / kMicrosecondsPerMillisecond);
- jsobj.AddPropertyTimeMillis("startTime", start_time_millis);
+ jsobj.AddPropertyTimeMillis(
+ "startTime", OS::GetCurrentTimeMillis() - Dart::UptimeMillis());
// Construct the isolate list.
{
JSONArray jsarr(&jsobj, "isolates");
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698