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

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

Issue 2007233002: Add --dump-megamorphic-stats. Lower megamorphic cache load factor to 50%. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/text_buffer.h" 10 #include "platform/text_buffer.h"
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 if (FLAG_support_timeline && FLAG_timing) { 1601 if (FLAG_support_timeline && FLAG_timing) {
1602 TimelinePauseTrace tpt; 1602 TimelinePauseTrace tpt;
1603 tpt.Print(); 1603 tpt.Print();
1604 } 1604 }
1605 #endif // !PRODUCT 1605 #endif // !PRODUCT
1606 1606
1607 // Finalize any weak persistent handles with a non-null referent. 1607 // Finalize any weak persistent handles with a non-null referent.
1608 FinalizeWeakPersistentHandlesVisitor visitor; 1608 FinalizeWeakPersistentHandlesVisitor visitor;
1609 api_state()->weak_persistent_handles().VisitHandles(&visitor); 1609 api_state()->weak_persistent_handles().VisitHandles(&visitor);
1610 1610
1611 if (FLAG_dump_megamorphic_stats) {
1612 MegamorphicCacheTable::PrintSizes(this);
1613 }
1611 if (FLAG_trace_isolates) { 1614 if (FLAG_trace_isolates) {
1612 heap()->PrintSizes(); 1615 heap()->PrintSizes();
1613 MegamorphicCacheTable::PrintSizes(this);
1614 Symbols::DumpStats(); 1616 Symbols::DumpStats();
1615 OS::Print("[-] Stopping isolate:\n" 1617 OS::Print("[-] Stopping isolate:\n"
1616 "\tisolate: %s\n", name()); 1618 "\tisolate: %s\n", name());
1617 } 1619 }
1618 if (FLAG_print_metrics) { 1620 if (FLAG_print_metrics) {
1619 LogBlock lb; 1621 LogBlock lb;
1620 THR_Print("Printing metrics for %s\n", name()); 1622 THR_Print("Printing metrics for %s\n", name());
1621 #define ISOLATE_METRIC_PRINT(type, variable, name, unit) \ 1623 #define ISOLATE_METRIC_PRINT(type, variable, name, unit) \
1622 THR_Print("%s\n", metric_##variable##_.ToString()); 1624 THR_Print("%s\n", metric_##variable##_.ToString());
1623 1625
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
2790 void IsolateSpawnState::DecrementSpawnCount() { 2792 void IsolateSpawnState::DecrementSpawnCount() {
2791 ASSERT(spawn_count_monitor_ != NULL); 2793 ASSERT(spawn_count_monitor_ != NULL);
2792 ASSERT(spawn_count_ != NULL); 2794 ASSERT(spawn_count_ != NULL);
2793 MonitorLocker ml(spawn_count_monitor_); 2795 MonitorLocker ml(spawn_count_monitor_);
2794 ASSERT(*spawn_count_ > 0); 2796 ASSERT(*spawn_count_ > 0);
2795 *spawn_count_ = *spawn_count_ - 1; 2797 *spawn_count_ = *spawn_count_ - 1;
2796 ml.Notify(); 2798 ml.Notify();
2797 } 2799 }
2798 2800
2799 } // namespace dart 2801 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698