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

Side by Side Diff: runtime/include/dart_api.h

Issue 1412733008: Switch profiler from isolates to threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/bin/dartutils.h ('k') | runtime/tests/vm/vm.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 * for details. All rights reserved. Use of this source code is governed by a 3 * for details. All rights reserved. Use of this source code is governed by a
4 * BSD-style license that can be found in the LICENSE file. 4 * BSD-style license that can be found in the LICENSE file.
5 */ 5 */
6 6
7 #ifndef INCLUDE_DART_API_H_ 7 #ifndef INCLUDE_DART_API_H_
8 #define INCLUDE_DART_API_H_ 8 #define INCLUDE_DART_API_H_
9 9
10 /** \mainpage Dart Embedding API Reference 10 /** \mainpage Dart Embedding API Reference
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 /** 1020 /**
1021 * Enters an isolate. After calling this function, 1021 * Enters an isolate. After calling this function,
1022 * the current isolate will be set to the provided isolate. 1022 * the current isolate will be set to the provided isolate.
1023 * 1023 *
1024 * Requires there to be no current isolate. Multiple threads may not be in 1024 * Requires there to be no current isolate. Multiple threads may not be in
1025 * the same isolate at once. 1025 * the same isolate at once.
1026 */ 1026 */
1027 DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate); 1027 DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate);
1028 1028
1029 /** 1029 /**
1030 * Notifies the VM that the current isolate is about to make a blocking call. 1030 * Notifies the VM that the current thread should not be profiled until a
1031 * matching call to Dart_ThreadEnableProfiling is made.
1032 *
1033 * NOTE: By default, if a thread has entered an isolate it will be profiled.
1034 * This function should be used when an embedder knows a thread is about
1035 * to make a blocking call and wants to avoid unnecessary interrupts by
1036 * the profiler.
1031 */ 1037 */
1032 DART_EXPORT void Dart_IsolateBlocked(); 1038 DART_EXPORT void Dart_ThreadDisableProfiling();
1033 1039
1034 /** 1040 /**
1035 * Notifies the VM that the current isolate is no longer blocked. 1041 * Notifies the VM that the current thread should be profiled.
1042 *
1043 * NOTE: It is only legal to call this function *after* calling
1044 * Dart_ThreadDisableProfiling.
1045 *
1046 * NOTE: By default, if a thread has entered an isolate it will be profiled.
1036 */ 1047 */
1037 DART_EXPORT void Dart_IsolateUnblocked(); 1048 DART_EXPORT void Dart_ThreadEnableProfiling();
1038 1049
1039 /** 1050 /**
1040 * Exits an isolate. After this call, Dart_CurrentIsolate will 1051 * Exits an isolate. After this call, Dart_CurrentIsolate will
1041 * return NULL. 1052 * return NULL.
1042 * 1053 *
1043 * Requires there to be a current isolate. 1054 * Requires there to be a current isolate.
1044 */ 1055 */
1045 DART_EXPORT void Dart_ExitIsolate(); 1056 DART_EXPORT void Dart_ExitIsolate();
1046 /* TODO(turnidge): We don't want users of the api to be able to exit a 1057 /* TODO(turnidge): We don't want users of the api to be able to exit a
1047 * "pure" dart isolate. Implement and document. */ 1058 * "pure" dart isolate. Implement and document. */
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after
2952 2963
2953 DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot( 2964 DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot(
2954 uint8_t** vm_isolate_snapshot_buffer, 2965 uint8_t** vm_isolate_snapshot_buffer,
2955 intptr_t* vm_isolate_snapshot_size, 2966 intptr_t* vm_isolate_snapshot_size,
2956 uint8_t** isolate_snapshot_buffer, 2967 uint8_t** isolate_snapshot_buffer,
2957 intptr_t* isolate_snapshot_size, 2968 intptr_t* isolate_snapshot_size,
2958 uint8_t** instructions_snapshot_buffer, 2969 uint8_t** instructions_snapshot_buffer,
2959 intptr_t* instructions_snapshot_size); 2970 intptr_t* instructions_snapshot_size);
2960 2971
2961 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2972 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/tests/vm/vm.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698