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

Unified Diff: runtime/vm/heap.cc

Issue 1170503004: Initial Timeline Events (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/deopt_instructions.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.cc
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index 3b92f94e1cbcb1537f2d98ab2c775e52f7bcbafb..27d39d345e3d9e9be463032d02b7fbd9716ac90b 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -19,6 +19,7 @@
#include "vm/service_event.h"
#include "vm/stack_frame.h"
#include "vm/tags.h"
+#include "vm/timeline.h"
#include "vm/verifier.h"
#include "vm/virtual_memory.h"
#include "vm/weak_table.h"
@@ -271,6 +272,9 @@ void Heap::CollectGarbage(Space space,
switch (space) {
case kNew: {
VMTagScope tagScope(isolate(), VMTag::kGCNewSpaceTagId);
+ TimelineDurationScope tds(isolate(),
+ isolate()->GetGCStream(),
+ "CollectNewGeneration");
RecordBeforeGC(kNew, reason);
UpdateClassHeapStatsBeforeGC(kNew);
new_space_->Scavenge(invoke_api_callbacks);
@@ -287,6 +291,9 @@ void Heap::CollectGarbage(Space space,
case kOld:
case kCode: {
VMTagScope tagScope(isolate(), VMTag::kGCOldSpaceTagId);
+ TimelineDurationScope tds(isolate(),
+ isolate()->GetGCStream(),
+ "CollectOldGeneration");
RecordBeforeGC(kOld, reason);
UpdateClassHeapStatsBeforeGC(kOld);
old_space_->MarkSweep(invoke_api_callbacks);
@@ -324,6 +331,9 @@ void Heap::CollectAllGarbage() {
TIMERSCOPE(isolate(), time_gc);
{
VMTagScope tagScope(isolate(), VMTag::kGCNewSpaceTagId);
+ TimelineDurationScope tds(isolate(),
+ isolate()->GetGCStream(),
+ "CollectNewGeneration");
RecordBeforeGC(kNew, kFull);
UpdateClassHeapStatsBeforeGC(kNew);
new_space_->Scavenge(kInvokeApiCallbacks);
@@ -334,6 +344,9 @@ void Heap::CollectAllGarbage() {
}
{
VMTagScope tagScope(isolate(), VMTag::kGCOldSpaceTagId);
+ TimelineDurationScope tds(isolate(),
+ isolate()->GetGCStream(),
+ "CollectOldGeneration");
RecordBeforeGC(kOld, kFull);
UpdateClassHeapStatsBeforeGC(kOld);
old_space_->MarkSweep(kInvokeApiCallbacks);
« no previous file with comments | « runtime/vm/deopt_instructions.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698