Index: runtime/bin/dartutils.cc |
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc |
index c443fc91f6ed86d008b3a41397230ab16a79b657..ab4d6be095923a49646d05fe2374a5316f01ca2a 100644 |
--- a/runtime/bin/dartutils.cc |
+++ b/runtime/bin/dartutils.cc |
@@ -15,6 +15,7 @@ |
#include "bin/extensions.h" |
#include "bin/file.h" |
#include "bin/io_buffer.h" |
+#include "bin/isolate_data.h" |
#include "bin/platform.h" |
#include "bin/socket.h" |
#include "bin/utils.h" |
@@ -486,7 +487,9 @@ Dart_Handle DartUtils::LoadScript(const char* script_uri, |
return NewDartUnsupportedError("Service did not return load port."); |
} |
Builtin::SetLoadPort(load_port); |
- |
+ IsolateData* isolate_data = |
+ reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData()); |
+ Dart_TimelineAsyncBegin("LoadScript", &(isolate_data->load_async_id)); |
return LoadDataAsync_Invoke(Dart_Null(), uri, Dart_Null(), builtin_lib); |
} |
@@ -591,6 +594,11 @@ void FUNCTION_NAME(Builtin_LoadSource)(Dart_NativeArguments args) { |
// no more outstanding load requests. |
void FUNCTION_NAME(Builtin_DoneLoading)(Dart_NativeArguments args) { |
Dart_Handle res = Dart_FinalizeLoading(true); |
+ IsolateData* isolate_data = |
+ reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData()); |
+ if (isolate_data->load_async_id >= 0) { |
+ Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id); |
+ } |
if (Dart_IsError(res)) { |
// TODO(hausner): If compilation/loading errors are supposed to |
// be observable by the program, we need to mark the bad library |