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

Unified Diff: runtime/vm/timeline.cc

Issue 1526463005: Emit Timeline events for most Dart_API calls (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/timeline.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/timeline.cc
diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc
index 0f033e5e6cef3c9868192b9383b998adc2646fc9..ab28bee4e6219f5ff9dfe99f0f245a39e0bf7956 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -82,6 +82,10 @@ void Timeline::InitOnce() {
}
vm_stream_ = new TimelineStream();
vm_stream_->Init("VM", EnableStreamByDefault("VM"), NULL);
+ vm_api_stream_ = new TimelineStream();
+ vm_api_stream_->Init("API",
+ EnableStreamByDefault("API"),
+ &stream_API_enabled_);
// Global overrides.
#define ISOLATE_TIMELINE_STREAM_FLAG_DEFAULT(name, not_used) \
stream_##name##_enabled_ = EnableStreamByDefault(#name);
@@ -99,6 +103,8 @@ void Timeline::Shutdown() {
recorder_ = NULL;
delete vm_stream_;
vm_stream_ = NULL;
+ delete vm_api_stream_;
+ vm_api_stream_ = NULL;
}
@@ -119,6 +125,12 @@ TimelineStream* Timeline::GetVMStream() {
}
+TimelineStream* Timeline::GetVMApiStream() {
+ ASSERT(vm_api_stream_ != NULL);
+ return vm_api_stream_;
+}
+
+
void Timeline::ReclaimCachedBlocksFromThreads() {
TimelineEventRecorder* recorder = Timeline::recorder();
if (recorder == NULL) {
@@ -153,6 +165,7 @@ void Timeline::Clear() {
TimelineEventRecorder* Timeline::recorder_ = NULL;
TimelineStream* Timeline::vm_stream_ = NULL;
+TimelineStream* Timeline::vm_api_stream_ = NULL;
#define ISOLATE_TIMELINE_STREAM_DEFINE_FLAG(name, enabled_by_default) \
bool Timeline::stream_##name##_enabled_ = enabled_by_default;
@@ -511,7 +524,6 @@ TimelineEventScope::TimelineEventScope(Thread* thread,
arguments_(NULL),
arguments_length_(0),
enabled_(false) {
- ASSERT(thread != NULL);
Init();
}
« no previous file with comments | « runtime/vm/timeline.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698