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

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

Issue 2256863002: Avoid to send _tagCounters if the profiler is disabled (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | no next file » | no next file with comments »
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 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 } 1976 }
1977 jsobj.AddProperty("pauseEvent", &pause_event); 1977 jsobj.AddProperty("pauseEvent", &pause_event);
1978 } 1978 }
1979 1979
1980 const Library& lib = 1980 const Library& lib =
1981 Library::Handle(object_store()->root_library()); 1981 Library::Handle(object_store()->root_library());
1982 if (!lib.IsNull()) { 1982 if (!lib.IsNull()) {
1983 jsobj.AddProperty("rootLib", lib); 1983 jsobj.AddProperty("rootLib", lib);
1984 } 1984 }
1985 1985
1986 { 1986 if (FLAG_profiler) {
1987 JSONObject tagCounters(&jsobj, "_tagCounters"); 1987 JSONObject tagCounters(&jsobj, "_tagCounters");
1988 vm_tag_counters()->PrintToJSONObject(&tagCounters); 1988 vm_tag_counters()->PrintToJSONObject(&tagCounters);
1989 } 1989 }
1990 if (Thread::Current()->sticky_error() != Object::null()) { 1990 if (Thread::Current()->sticky_error() != Object::null()) {
1991 Error& error = Error::Handle(Thread::Current()->sticky_error()); 1991 Error& error = Error::Handle(Thread::Current()->sticky_error());
1992 ASSERT(!error.IsNull()); 1992 ASSERT(!error.IsNull());
1993 jsobj.AddProperty("error", error, false); 1993 jsobj.AddProperty("error", error, false);
1994 } else if (sticky_error() != Object::null()) { 1994 } else if (sticky_error() != Object::null()) {
1995 Error& error = Error::Handle(sticky_error()); 1995 Error& error = Error::Handle(sticky_error());
1996 ASSERT(!error.IsNull()); 1996 ASSERT(!error.IsNull());
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
2898 void IsolateSpawnState::DecrementSpawnCount() { 2898 void IsolateSpawnState::DecrementSpawnCount() {
2899 ASSERT(spawn_count_monitor_ != NULL); 2899 ASSERT(spawn_count_monitor_ != NULL);
2900 ASSERT(spawn_count_ != NULL); 2900 ASSERT(spawn_count_ != NULL);
2901 MonitorLocker ml(spawn_count_monitor_); 2901 MonitorLocker ml(spawn_count_monitor_);
2902 ASSERT(*spawn_count_ > 0); 2902 ASSERT(*spawn_count_ > 0);
2903 *spawn_count_ = *spawn_count_ - 1; 2903 *spawn_count_ = *spawn_count_ - 1;
2904 ml.Notify(); 2904 ml.Notify();
2905 } 2905 }
2906 2906
2907 } // namespace dart 2907 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698