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

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

Issue 1412733008: Switch profiler from isolates to threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
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 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after
1847 UNREACHABLE(); 1847 UNREACHABLE();
1848 } 1848 }
1849 ClassTable* class_table = isolate->class_table(); 1849 ClassTable* class_table = isolate->class_table();
1850 if (space == Heap::kNew) { 1850 if (space == Heap::kNew) {
1851 class_table->UpdateAllocatedNew(cls_id, size); 1851 class_table->UpdateAllocatedNew(cls_id, size);
1852 } else { 1852 } else {
1853 class_table->UpdateAllocatedOld(cls_id, size); 1853 class_table->UpdateAllocatedOld(cls_id, size);
1854 } 1854 }
1855 const Class& cls = Class::Handle(class_table->At(cls_id)); 1855 const Class& cls = Class::Handle(class_table->At(cls_id));
1856 if (cls.TraceAllocation(isolate)) { 1856 if (cls.TraceAllocation(isolate)) {
1857 Profiler::RecordAllocation(thread, cls_id); 1857 Profiler::SampleAllocation(thread, cls_id);
1858 } 1858 }
1859 NoSafepointScope no_safepoint; 1859 NoSafepointScope no_safepoint;
1860 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate())); 1860 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate()));
1861 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag); 1861 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag);
1862 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_)); 1862 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_));
1863 return raw_obj; 1863 return raw_obj;
1864 } 1864 }
1865 1865
1866 1866
1867 class StoreBufferUpdateVisitor : public ObjectPointerVisitor { 1867 class StoreBufferUpdateVisitor : public ObjectPointerVisitor {
(...skipping 19980 matching lines...) Expand 10 before | Expand all | Expand 10 after
21848 return tag_label.ToCString(); 21848 return tag_label.ToCString();
21849 } 21849 }
21850 21850
21851 21851
21852 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21852 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21853 Instance::PrintJSONImpl(stream, ref); 21853 Instance::PrintJSONImpl(stream, ref);
21854 } 21854 }
21855 21855
21856 21856
21857 } // namespace dart 21857 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698