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

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

Issue 1346473002: Move megamorphic cache table into the Dart heap. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: non-x64 Created 5 years, 3 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/isolate.h" 5 #include "vm/isolate.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 "platform/json.h" 9 #include "platform/json.h"
10 #include "vm/code_observers.h" 10 #include "vm/code_observers.h"
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 tpt.Print(); 1537 tpt.Print();
1538 } 1538 }
1539 1539
1540 // Finalize any weak persistent handles with a non-null referent. 1540 // Finalize any weak persistent handles with a non-null referent.
1541 FinalizeWeakPersistentHandlesVisitor visitor; 1541 FinalizeWeakPersistentHandlesVisitor visitor;
1542 api_state()->weak_persistent_handles().VisitHandles(&visitor); 1542 api_state()->weak_persistent_handles().VisitHandles(&visitor);
1543 api_state()->prologue_weak_persistent_handles().VisitHandles(&visitor); 1543 api_state()->prologue_weak_persistent_handles().VisitHandles(&visitor);
1544 1544
1545 if (FLAG_trace_isolates) { 1545 if (FLAG_trace_isolates) {
1546 heap()->PrintSizes(); 1546 heap()->PrintSizes();
1547 megamorphic_cache_table()->PrintSizes(); 1547 MegamorphicCacheTable::PrintSizes(this);
1548 Symbols::DumpStats(); 1548 Symbols::DumpStats();
1549 OS::Print("[-] Stopping isolate:\n" 1549 OS::Print("[-] Stopping isolate:\n"
1550 "\tisolate: %s\n", name()); 1550 "\tisolate: %s\n", name());
1551 } 1551 }
1552 if (FLAG_print_metrics) { 1552 if (FLAG_print_metrics) {
1553 LogBlock lb; 1553 LogBlock lb;
1554 THR_Print("Printing metrics for %s\n", name()); 1554 THR_Print("Printing metrics for %s\n", name());
1555 #define ISOLATE_METRIC_PRINT(type, variable, name, unit) \ 1555 #define ISOLATE_METRIC_PRINT(type, variable, name, unit) \
1556 THR_Print("%s\n", metric_##variable##_.ToString()); 1556 THR_Print("%s\n", metric_##variable##_.ToString());
1557 ISOLATE_METRIC_LIST(ISOLATE_METRIC_PRINT); 1557 ISOLATE_METRIC_LIST(ISOLATE_METRIC_PRINT);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 bool visit_prologue_weak_handles, 1616 bool visit_prologue_weak_handles,
1617 bool validate_frames) { 1617 bool validate_frames) {
1618 ASSERT(visitor != NULL); 1618 ASSERT(visitor != NULL);
1619 1619
1620 // Visit objects in the object store. 1620 // Visit objects in the object store.
1621 object_store()->VisitObjectPointers(visitor); 1621 object_store()->VisitObjectPointers(visitor);
1622 1622
1623 // Visit objects in the class table. 1623 // Visit objects in the class table.
1624 class_table()->VisitObjectPointers(visitor); 1624 class_table()->VisitObjectPointers(visitor);
1625 1625
1626 // Visit objects in the megamorphic cache.
1627 megamorphic_cache_table()->VisitObjectPointers(visitor);
1628
1629 // Visit objects in per isolate stubs. 1626 // Visit objects in per isolate stubs.
1630 StubCode::VisitObjectPointers(visitor); 1627 StubCode::VisitObjectPointers(visitor);
1631 1628
1632 // Visit objects in isolate specific handles area. 1629 // Visit objects in isolate specific handles area.
1633 reusable_handles_.VisitObjectPointers(visitor); 1630 reusable_handles_.VisitObjectPointers(visitor);
1634 1631
1635 // Visit the dart api state for all local and persistent handles. 1632 // Visit the dart api state for all local and persistent handles.
1636 if (api_state() != NULL) { 1633 if (api_state() != NULL) {
1637 api_state()->VisitObjectPointers(visitor, visit_prologue_weak_handles); 1634 api_state()->VisitObjectPointers(visitor, visit_prologue_weak_handles);
1638 } 1635 }
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
2349 serialized_message_, serialized_message_len_); 2346 serialized_message_, serialized_message_len_);
2350 } 2347 }
2351 2348
2352 2349
2353 void IsolateSpawnState::Cleanup() { 2350 void IsolateSpawnState::Cleanup() {
2354 SwitchIsolateScope switch_scope(I); 2351 SwitchIsolateScope switch_scope(I);
2355 Dart::ShutdownIsolate(); 2352 Dart::ShutdownIsolate();
2356 } 2353 }
2357 2354
2358 } // namespace dart 2355 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698