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

Unified Diff: runtime/vm/object_store.cc

Issue 2646443005: Track async causal stack traces (Closed)
Patch Set: rebase Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_store.cc
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index e35ed7aebfe8bda3c0f74ce5b44240b81c8405bc..27c92eb2608408974520af087326b82767156a03 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -9,6 +9,7 @@
#include "vm/isolate.h"
#include "vm/object.h"
#include "vm/raw_object.h"
+#include "vm/resolver.h"
#include "vm/symbols.h"
#include "vm/visitor.h"
@@ -93,6 +94,8 @@ ObjectStore::ObjectStore()
simple_instance_of_function_(Function::null()),
simple_instance_of_true_function_(Function::null()),
simple_instance_of_false_function_(Function::null()),
+ async_clear_thread_stack_trace_(Function::null()),
+ async_set_thread_stack_trace_(Function::null()),
library_load_error_table_(Array::null()),
unique_dynamic_targets_(Array::null()),
token_objects_(GrowableObjectArray::null()),
@@ -237,6 +240,21 @@ void ObjectStore::InitKnownObjects() {
ASSERT(!cls.IsNull());
set_stream_iterator_class(cls);
+ String& function_name = String::Handle(zone);
+ Function& function = Function::Handle(zone);
+ function_name ^= async_lib.PrivateName(Symbols::SetAsyncThreadStackTrace());
+ ASSERT(!function_name.IsNull());
+ function ^= Resolver::ResolveStatic(async_lib, Object::null_string(),
+ function_name, 1, Object::null_array());
+ set_async_set_thread_stack_trace(function);
+
+ function_name ^= async_lib.PrivateName(Symbols::ClearAsyncThreadStackTrace());
+ ASSERT(!function_name.IsNull());
+ function ^= Resolver::ResolveStatic(async_lib, Object::null_string(),
+ function_name, 0, Object::null_array());
+ ASSERT(!function.IsNull());
+ set_async_clear_thread_stack_trace(function);
+
const Library& internal_lib = Library::Handle(_internal_library());
cls = internal_lib.LookupClass(Symbols::Symbol());
set_symbol_class(cls);
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698