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

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, 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
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 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after
1842 UNREACHABLE(); 1842 UNREACHABLE();
1843 } 1843 }
1844 ClassTable* class_table = isolate->class_table(); 1844 ClassTable* class_table = isolate->class_table();
1845 if (space == Heap::kNew) { 1845 if (space == Heap::kNew) {
1846 class_table->UpdateAllocatedNew(cls_id, size); 1846 class_table->UpdateAllocatedNew(cls_id, size);
1847 } else { 1847 } else {
1848 class_table->UpdateAllocatedOld(cls_id, size); 1848 class_table->UpdateAllocatedOld(cls_id, size);
1849 } 1849 }
1850 const Class& cls = Class::Handle(class_table->At(cls_id)); 1850 const Class& cls = Class::Handle(class_table->At(cls_id));
1851 if (cls.TraceAllocation(isolate)) { 1851 if (cls.TraceAllocation(isolate)) {
1852 Profiler::RecordAllocation(thread, cls_id); 1852 Profiler::SampleAllocation(thread, cls_id);
1853 } 1853 }
1854 NoSafepointScope no_safepoint; 1854 NoSafepointScope no_safepoint;
1855 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate())); 1855 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate()));
1856 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag); 1856 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag);
1857 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_)); 1857 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_));
1858 return raw_obj; 1858 return raw_obj;
1859 } 1859 }
1860 1860
1861 1861
1862 class StoreBufferUpdateVisitor : public ObjectPointerVisitor { 1862 class StoreBufferUpdateVisitor : public ObjectPointerVisitor {
(...skipping 19857 matching lines...) Expand 10 before | Expand all | Expand 10 after
21720 return tag_label.ToCString(); 21720 return tag_label.ToCString();
21721 } 21721 }
21722 21722
21723 21723
21724 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21724 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21725 Instance::PrintJSONImpl(stream, ref); 21725 Instance::PrintJSONImpl(stream, ref);
21726 } 21726 }
21727 21727
21728 21728
21729 } // namespace dart 21729 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698