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

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

Issue 51653006: Track live instance and allocation counts for classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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/service/message.dart ('k') | runtime/vm/stub_code_arm.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/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 if (id == kClassCid) { 967 if (id == kClassCid) {
968 RawClass* raw_class = reinterpret_cast<RawClass*>(rawobj); 968 RawClass* raw_class = reinterpret_cast<RawClass*>(rawobj);
969 intptr_t class_id = raw_class->ptr()->id_; 969 intptr_t class_id = raw_class->ptr()->id_;
970 if (IsSingletonClassId(class_id)) { 970 if (IsSingletonClassId(class_id)) {
971 intptr_t object_id = ObjectIdFromClassId(class_id); 971 intptr_t object_id = ObjectIdFromClassId(class_id);
972 WriteVMIsolateObject(object_id); 972 WriteVMIsolateObject(object_id);
973 return; 973 return;
974 } 974 }
975 } 975 }
976 976
977
977 // Check it is a predefined symbol in the VM isolate. 978 // Check it is a predefined symbol in the VM isolate.
978 id = Symbols::LookupVMSymbol(rawobj); 979 id = Symbols::LookupVMSymbol(rawobj);
979 if (id != kInvalidIndex) { 980 if (id != kInvalidIndex) {
980 WriteVMIsolateObject(id); 981 WriteVMIsolateObject(id);
981 return; 982 return;
982 } 983 }
983 984
984 UNREACHABLE(); 985 UNREACHABLE();
985 } 986 }
986 987
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 NoGCScope no_gc; 1519 NoGCScope no_gc;
1519 WriteObject(obj.raw()); 1520 WriteObject(obj.raw());
1520 UnmarkAll(); 1521 UnmarkAll();
1521 } else { 1522 } else {
1522 ThrowException(exception_type(), exception_msg()); 1523 ThrowException(exception_type(), exception_msg());
1523 } 1524 }
1524 } 1525 }
1525 1526
1526 1527
1527 } // namespace dart 1528 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/service/message.dart ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698