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

Unified Diff: src/profiler/sampling-heap-profiler.h

Issue 1919223003: Sampling heap profiler: remove empty nodes from profile. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressing comment Created 4 years, 8 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 | « no previous file | src/profiler/sampling-heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/sampling-heap-profiler.h
diff --git a/src/profiler/sampling-heap-profiler.h b/src/profiler/sampling-heap-profiler.h
index aa7a512664c0232a5c868071e62364a0f3cbcea2..7b2386712d4ef14d37054687fa1ea380c2d22cdb 100644
--- a/src/profiler/sampling-heap-profiler.h
+++ b/src/profiler/sampling-heap-profiler.h
@@ -71,11 +71,13 @@ class SamplingHeapProfiler {
class AllocationNode {
public:
- AllocationNode(const char* const name, int script_id,
- const int start_position)
- : script_id_(script_id),
+ AllocationNode(AllocationNode* parent, const char* name, int script_id,
+ int start_position)
+ : parent_(parent),
+ script_id_(script_id),
script_position_(start_position),
- name_(name) {}
+ name_(name),
+ pinned_(false) {}
~AllocationNode() {
for (auto child : children_) {
delete child;
@@ -85,9 +87,11 @@ class SamplingHeapProfiler {
private:
std::map<size_t, unsigned int> allocations_;
std::vector<AllocationNode*> children_;
+ AllocationNode* const parent_;
const int script_id_;
const int script_position_;
const char* const name_;
+ bool pinned_;
friend class SamplingHeapProfiler;
« no previous file with comments | « no previous file | src/profiler/sampling-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698