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

Unified Diff: test/cctest/test-heap-profiler.cc

Issue 2674593003: [TypeFeedbackVector] Root feedback vectors at function literal site. (Closed)
Patch Set: REBASE+liveedit fix. Created 3 years, 10 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 | « test/cctest/test-feedback-vector.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index 9780b3f519c189827b7d1cb911f9a3e33823717c..549989550aa15e666a6625ed95047fe4e365c46c 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -2252,15 +2252,19 @@ TEST(AllocationSitesAreVisible) {
const v8::HeapGraphNode* fun_code =
GetProperty(global, v8::HeapGraphEdge::kProperty, "fun");
CHECK(fun_code);
- const v8::HeapGraphNode* literals =
- GetProperty(fun_code, v8::HeapGraphEdge::kInternal, "literals");
- CHECK(literals);
- CHECK_EQ(v8::HeapGraphNode::kArray, literals->GetType());
- CHECK_EQ(1, literals->GetChildrenCount());
-
- // The first value in the literals array should be the boilerplate,
+ const v8::HeapGraphNode* vector_cell = GetProperty(
+ fun_code, v8::HeapGraphEdge::kInternal, "feedback_vector_cell");
+ // TODO(mvstanton): I'm not sure if this is the best way to expose
+ // literals. Is it too much to expose the Cell?
+ CHECK(vector_cell);
+ const v8::HeapGraphNode* vector =
+ GetProperty(vector_cell, v8::HeapGraphEdge::kInternal, "value");
+ CHECK_EQ(v8::HeapGraphNode::kArray, vector->GetType());
+ CHECK_EQ(3, vector->GetChildrenCount());
+
+ // The first value in the feedback vector should be the boilerplate,
// after an AllocationSite.
- const v8::HeapGraphEdge* prop = literals->GetChild(0);
+ const v8::HeapGraphEdge* prop = vector->GetChild(2);
const v8::HeapGraphNode* allocation_site = prop->GetToNode();
v8::String::Utf8Value name(allocation_site->GetName());
CHECK_EQ(0, strcmp("system / AllocationSite", *name));
« no previous file with comments | « test/cctest/test-feedback-vector.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698