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

Unified Diff: runtime/vm/profiler.h

Issue 1211633002: Introduce mechanism to record an allocation of a class (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/object.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.h
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index cea7bd5b1fce26b9e22851c327c3bd683890104f..b4a4d0b745eb653b584dbccd376f47d5cee0cd6f 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -44,6 +44,8 @@ class Profiler : public AllStatic {
return sample_buffer_;
}
+ static void RecordAllocation(Isolate* isolate, intptr_t cid);
+
private:
static bool initialized_;
static Monitor* monitor_;
@@ -308,6 +310,11 @@ class Sample {
metadata_ = metadata;
}
+ void SetAllocationCid(intptr_t cid) {
+ set_is_allocation_sample(true);
+ set_metadata(cid);
+ }
+
static void InitOnce();
static intptr_t instance_size() {
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698