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

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

Issue 16853006: Object histogramin the vm (--print-object-histogram). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/raw_object.h ('k') | runtime/vm/vm_sources.gypi » ('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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 (class_id <= kExternalTypedDataFloat32x4ArrayCid)); 472 (class_id <= kExternalTypedDataFloat32x4ArrayCid));
473 return isolate()->class_table()->At(class_id); 473 return isolate()->class_table()->At(class_id);
474 } 474 }
475 cls_ = Object::class_class(); 475 cls_ = Object::class_class();
476 RawClass* obj = reinterpret_cast<RawClass*>( 476 RawClass* obj = reinterpret_cast<RawClass*>(
477 AllocateUninitialized(cls_, Class::InstanceSize())); 477 AllocateUninitialized(cls_, Class::InstanceSize()));
478 Instance fake; 478 Instance fake;
479 obj->ptr()->handle_vtable_ = fake.vtable(); 479 obj->ptr()->handle_vtable_ = fake.vtable();
480 cls_ = obj; 480 cls_ = obj;
481 cls_.set_id(kIllegalCid); 481 cls_.set_id(kIllegalCid);
482 isolate()->class_table()->Register(cls_); 482 isolate()->RegisterClass(cls_);
483 return cls_.raw(); 483 return cls_.raw();
484 } 484 }
485 485
486 486
487 RawMint* SnapshotReader::NewMint(int64_t value) { 487 RawMint* SnapshotReader::NewMint(int64_t value) {
488 ASSERT(kind_ == Snapshot::kFull); 488 ASSERT(kind_ == Snapshot::kFull);
489 ASSERT(isolate()->no_gc_scope_depth() != 0); 489 ASSERT(isolate()->no_gc_scope_depth() != 0);
490 cls_ = object_store()->mint_class(); 490 cls_ = object_store()->mint_class();
491 RawMint* obj = reinterpret_cast<RawMint*>( 491 RawMint* obj = reinterpret_cast<RawMint*>(
492 AllocateUninitialized(cls_, Mint::InstanceSize())); 492 AllocateUninitialized(cls_, Mint::InstanceSize()));
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 UnmarkAll(); 1466 UnmarkAll();
1467 isolate->set_long_jump_base(base); 1467 isolate->set_long_jump_base(base);
1468 } else { 1468 } else {
1469 isolate->set_long_jump_base(base); 1469 isolate->set_long_jump_base(base);
1470 ThrowException(exception_type(), exception_msg()); 1470 ThrowException(exception_type(), exception_msg());
1471 } 1471 }
1472 } 1472 }
1473 1473
1474 1474
1475 } // namespace dart 1475 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698