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

Side by Side Diff: runtime/vm/pages.cc

Issue 487023003: vmservice protocol cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/pages.h" 5 #include "vm/pages.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/compiler_stats.h" 8 #include "vm/compiler_stats.h"
9 #include "vm/gc_marker.h" 9 #include "vm/gc_marker.h"
10 #include "vm/gc_sweeper.h" 10 #include "vm/gc_sweeper.h"
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 page->WriteProtect(read_only); 414 page->WriteProtect(read_only);
415 page = NextPageAnySize(page); 415 page = NextPageAnySize(page);
416 } 416 }
417 } 417 }
418 418
419 419
420 void PageSpace::PrintToJSONObject(JSONObject* object) { 420 void PageSpace::PrintToJSONObject(JSONObject* object) {
421 Isolate* isolate = Isolate::Current(); 421 Isolate* isolate = Isolate::Current();
422 ASSERT(isolate != NULL); 422 ASSERT(isolate != NULL);
423 JSONObject space(object, "old"); 423 JSONObject space(object, "old");
424 space.AddProperty("type", "PageSpace"); 424 space.AddProperty("type", "HeapSpace");
425 space.AddProperty("id", "heaps/old"); 425 space.AddProperty("id", "heaps/old");
426 space.AddProperty("name", "PageSpace"); 426 space.AddProperty("name", "old");
427 space.AddProperty("user_name", "old"); 427 space.AddProperty("vmName", "PageSpace");
428 space.AddProperty("collections", collections()); 428 space.AddProperty("collections", collections());
429 space.AddProperty("used", UsedInWords() * kWordSize); 429 space.AddProperty("used", UsedInWords() * kWordSize);
430 space.AddProperty("capacity", CapacityInWords() * kWordSize); 430 space.AddProperty("capacity", CapacityInWords() * kWordSize);
431 space.AddProperty("external", ExternalInWords() * kWordSize); 431 space.AddProperty("external", ExternalInWords() * kWordSize);
432 space.AddProperty("time", MicrosecondsToSeconds(gc_time_micros())); 432 space.AddProperty("time", MicrosecondsToSeconds(gc_time_micros()));
433 if (collections() > 0) { 433 if (collections() > 0) {
434 int64_t run_time = OS::GetCurrentTimeMicros() - isolate->start_time(); 434 int64_t run_time = OS::GetCurrentTimeMicros() - isolate->start_time();
435 run_time = Utils::Maximum(run_time, static_cast<int64_t>(0)); 435 run_time = Utils::Maximum(run_time, static_cast<int64_t>(0));
436 double run_time_millis = MicrosecondsToMilliseconds(run_time); 436 double run_time_millis = MicrosecondsToMilliseconds(run_time);
437 double avg_time_between_collections = 437 double avg_time_between_collections =
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 return 0; 760 return 0;
761 } else { 761 } else {
762 ASSERT(total_time >= gc_time); 762 ASSERT(total_time >= gc_time);
763 int result= static_cast<int>((static_cast<double>(gc_time) / 763 int result= static_cast<int>((static_cast<double>(gc_time) /
764 static_cast<double>(total_time)) * 100); 764 static_cast<double>(total_time)) * 100);
765 return result; 765 return result;
766 } 766 }
767 } 767 }
768 768
769 } // namespace dart 769 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698