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

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

Issue 1690333002: Add fine grained command line and service protocol control over timeline streams recording (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « runtime/observatory/tests/service/vm_timeline_flags_test.dart ('k') | runtime/vm/service.cc » ('j') | 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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 ASSERT(result != NULL); 900 ASSERT(result != NULL);
901 901
902 // Initialize metrics. 902 // Initialize metrics.
903 #define ISOLATE_METRIC_INIT(type, variable, name, unit) \ 903 #define ISOLATE_METRIC_INIT(type, variable, name, unit) \
904 result->metric_##variable##_.Init(result, name, NULL, Metric::unit); 904 result->metric_##variable##_.Init(result, name, NULL, Metric::unit);
905 ISOLATE_METRIC_LIST(ISOLATE_METRIC_INIT); 905 ISOLATE_METRIC_LIST(ISOLATE_METRIC_INIT);
906 #undef ISOLATE_METRIC_INIT 906 #undef ISOLATE_METRIC_INIT
907 907
908 #ifndef PRODUCT 908 #ifndef PRODUCT
909 // Initialize Timeline streams. 909 // Initialize Timeline streams.
910 #define ISOLATE_TIMELINE_STREAM_INIT(name, enabled_by_default) \ 910 Timeline::SetupIsolateStreams(result);
911 result->stream_##name##_.Init(#name, \
912 enabled_by_default, \
913 Timeline::Stream##name##EnabledFlag());
914 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_INIT);
915 #undef ISOLATE_TIMELINE_STREAM_INIT
916 #endif // !PRODUCT 911 #endif // !PRODUCT
917 912
918 Heap::Init(result, 913 Heap::Init(result,
919 is_vm_isolate 914 is_vm_isolate
920 ? 0 // New gen size 0; VM isolate should only allocate in old. 915 ? 0 // New gen size 0; VM isolate should only allocate in old.
921 : FLAG_new_gen_semi_max_size * MBInWords, 916 : FLAG_new_gen_semi_max_size * MBInWords,
922 FLAG_old_gen_heap_size * MBInWords, 917 FLAG_old_gen_heap_size * MBInWords,
923 FLAG_external_max_size * MBInWords); 918 FLAG_external_max_size * MBInWords);
924 919
925 // TODO(5411455): For now just set the recently created isolate as 920 // TODO(5411455): For now just set the recently created isolate as
(...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 void IsolateSpawnState::DecrementSpawnCount() { 2770 void IsolateSpawnState::DecrementSpawnCount() {
2776 ASSERT(spawn_count_monitor_ != NULL); 2771 ASSERT(spawn_count_monitor_ != NULL);
2777 ASSERT(spawn_count_ != NULL); 2772 ASSERT(spawn_count_ != NULL);
2778 MonitorLocker ml(spawn_count_monitor_); 2773 MonitorLocker ml(spawn_count_monitor_);
2779 ASSERT(*spawn_count_ > 0); 2774 ASSERT(*spawn_count_ > 0);
2780 *spawn_count_ = *spawn_count_ - 1; 2775 *spawn_count_ = *spawn_count_ - 1;
2781 ml.Notify(); 2776 ml.Notify();
2782 } 2777 }
2783 2778
2784 } // namespace dart 2779 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/vm_timeline_flags_test.dart ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698