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

Unified Diff: runtime/vm/profiler_service.h

Issue 2771293003: Resubmission of native memory allocation info surfacing in Observatory. Fixed crashing tests and st… (Closed)
Patch Set: Added page to Observatory to display native memory allocation information. Created 3 years, 9 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/profiler.cc ('k') | runtime/vm/profiler_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler_service.h
diff --git a/runtime/vm/profiler_service.h b/runtime/vm/profiler_service.h
index d9205b3b7a1ee851107a8f1778c3f4e0d1de36b1..8045906e14442710f4cfed8e2663d27a4d32f1a6 100644
--- a/runtime/vm/profiler_service.h
+++ b/runtime/vm/profiler_service.h
@@ -29,6 +29,7 @@ class ProfileCodeTable;
class RawCode;
class RawFunction;
class SampleFilter;
+class ProcessedSample;
class ProcessedSampleBuffer;
class ProfileFunctionSourcePosition {
@@ -257,7 +258,18 @@ class ProfileTrieNode : public ZoneAllocated {
intptr_t count() const { return count_; }
- void Tick() { count_++; }
+ void Tick(ProcessedSample* sample, bool exclusive = false);
+
+ void IncrementAllocation(intptr_t allocation, bool exclusive) {
+ ASSERT(allocation >= 0);
+ if (exclusive) {
+ exclusive_allocations_ += allocation;
+ }
+ inclusive_allocations_ += allocation;
+ }
+
+ intptr_t inclusive_allocations() const { return inclusive_allocations_; }
+ intptr_t exclusive_allocations() const { return exclusive_allocations_; }
intptr_t NumChildren() const { return children_.length(); }
@@ -284,6 +296,8 @@ class ProfileTrieNode : public ZoneAllocated {
intptr_t table_index_;
intptr_t count_;
+ intptr_t exclusive_allocations_;
+ intptr_t inclusive_allocations_;
ZoneGrowableArray<ProfileTrieNode*> children_;
intptr_t frame_id_;
@@ -378,6 +392,10 @@ class ProfileTrieWalker : public ValueObject {
intptr_t CurrentInclusiveTicks();
// Return the current node's peer's exclusive tick count.
intptr_t CurrentExclusiveTicks();
+ // Return the current node's inclusive allocation count.
+ intptr_t CurrentInclusiveAllocations();
+ // Return the current node's exclusive allocation count.
+ intptr_t CurrentExclusiveAllocations();
// Return the current node's tick count.
intptr_t CurrentNodeTickCount();
// Return the number siblings (including yourself).
« no previous file with comments | « runtime/vm/profiler.cc ('k') | runtime/vm/profiler_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698