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

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

Issue 1387643002: Move vm_tags from isolate to thread, since we may have multiple threads in same isolate (GC, backgr… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: More comment cleanups Created 5 years, 2 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
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/profiler.h » ('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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1836 UNREACHABLE(); 1836 UNREACHABLE();
1837 } 1837 }
1838 ClassTable* class_table = isolate->class_table(); 1838 ClassTable* class_table = isolate->class_table();
1839 if (space == Heap::kNew) { 1839 if (space == Heap::kNew) {
1840 class_table->UpdateAllocatedNew(cls_id, size); 1840 class_table->UpdateAllocatedNew(cls_id, size);
1841 } else { 1841 } else {
1842 class_table->UpdateAllocatedOld(cls_id, size); 1842 class_table->UpdateAllocatedOld(cls_id, size);
1843 } 1843 }
1844 const Class& cls = Class::Handle(class_table->At(cls_id)); 1844 const Class& cls = Class::Handle(class_table->At(cls_id));
1845 if (cls.TraceAllocation(isolate)) { 1845 if (cls.TraceAllocation(isolate)) {
1846 Profiler::RecordAllocation(isolate, cls_id); 1846 Profiler::RecordAllocation(thread, cls_id);
1847 } 1847 }
1848 NoSafepointScope no_safepoint; 1848 NoSafepointScope no_safepoint;
1849 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate())); 1849 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate()));
1850 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag); 1850 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag);
1851 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_)); 1851 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_));
1852 return raw_obj; 1852 return raw_obj;
1853 } 1853 }
1854 1854
1855 1855
1856 class StoreBufferUpdateVisitor : public ObjectPointerVisitor { 1856 class StoreBufferUpdateVisitor : public ObjectPointerVisitor {
(...skipping 19634 matching lines...) Expand 10 before | Expand all | Expand 10 after
21491 return tag_label.ToCString(); 21491 return tag_label.ToCString();
21492 } 21492 }
21493 21493
21494 21494
21495 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21495 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21496 Instance::PrintJSONImpl(stream, ref); 21496 Instance::PrintJSONImpl(stream, ref);
21497 } 21497 }
21498 21498
21499 21499
21500 } // namespace dart 21500 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698