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

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

Issue 2148613002: Have --print-metrics use stderr to work around issue with analyzer_cli (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | runtime/vm/metrics.cc » ('j') | runtime/vm/metrics.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 MegamorphicCacheTable::PrintSizes(this); 1623 MegamorphicCacheTable::PrintSizes(this);
1624 } 1624 }
1625 if (FLAG_trace_isolates) { 1625 if (FLAG_trace_isolates) {
1626 heap()->PrintSizes(); 1626 heap()->PrintSizes();
1627 Symbols::DumpStats(); 1627 Symbols::DumpStats();
1628 OS::Print("[-] Stopping isolate:\n" 1628 OS::Print("[-] Stopping isolate:\n"
1629 "\tisolate: %s\n", name()); 1629 "\tisolate: %s\n", name());
1630 } 1630 }
1631 if (FLAG_print_metrics) { 1631 if (FLAG_print_metrics) {
1632 LogBlock lb; 1632 LogBlock lb;
1633 THR_Print("Printing metrics for %s\n", name()); 1633 fprintf(stderr, "Printing metrics for %s\n", name());
1634 #define ISOLATE_METRIC_PRINT(type, variable, name, unit) \ 1634 #define ISOLATE_METRIC_PRINT(type, variable, name, unit) \
1635 THR_Print("%s\n", metric_##variable##_.ToString()); 1635 fprintf(stderr, "%s\n", metric_##variable##_.ToString());
1636 1636
1637 ISOLATE_METRIC_LIST(ISOLATE_METRIC_PRINT); 1637 ISOLATE_METRIC_LIST(ISOLATE_METRIC_PRINT);
1638 #undef ISOLATE_METRIC_PRINT 1638 #undef ISOLATE_METRIC_PRINT
1639 THR_Print("\n"); 1639 fprintf(stderr, "\n");
1640 } 1640 }
1641 } 1641 }
1642 1642
1643 1643
1644 void Isolate::StopBackgroundCompiler() { 1644 void Isolate::StopBackgroundCompiler() {
1645 // Wait until all background compilation has finished. 1645 // Wait until all background compilation has finished.
1646 if (background_compiler_ != NULL) { 1646 if (background_compiler_ != NULL) {
1647 BackgroundCompiler::Stop(this); 1647 BackgroundCompiler::Stop(this);
1648 } 1648 }
1649 } 1649 }
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
2852 void IsolateSpawnState::DecrementSpawnCount() { 2852 void IsolateSpawnState::DecrementSpawnCount() {
2853 ASSERT(spawn_count_monitor_ != NULL); 2853 ASSERT(spawn_count_monitor_ != NULL);
2854 ASSERT(spawn_count_ != NULL); 2854 ASSERT(spawn_count_ != NULL);
2855 MonitorLocker ml(spawn_count_monitor_); 2855 MonitorLocker ml(spawn_count_monitor_);
2856 ASSERT(*spawn_count_ > 0); 2856 ASSERT(*spawn_count_ > 0);
2857 *spawn_count_ = *spawn_count_ - 1; 2857 *spawn_count_ = *spawn_count_ - 1;
2858 ml.Notify(); 2858 ml.Notify();
2859 } 2859 }
2860 2860
2861 } // namespace dart 2861 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/metrics.cc » ('j') | runtime/vm/metrics.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698