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

Side by Side Diff: test/cctest/test-heap-profiler.cc

Issue 952303002: Remove NativeContext from Literal array, since we always create the literals in the native context … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 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 unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-regexp.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2285 2285
2286 const v8::HeapGraphNode* global = GetGlobalObject(snapshot); 2286 const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
2287 CHECK(global); 2287 CHECK(global);
2288 const v8::HeapGraphNode* fun_code = 2288 const v8::HeapGraphNode* fun_code =
2289 GetProperty(global, v8::HeapGraphEdge::kProperty, "fun"); 2289 GetProperty(global, v8::HeapGraphEdge::kProperty, "fun");
2290 CHECK(fun_code); 2290 CHECK(fun_code);
2291 const v8::HeapGraphNode* literals = 2291 const v8::HeapGraphNode* literals =
2292 GetProperty(fun_code, v8::HeapGraphEdge::kInternal, "literals"); 2292 GetProperty(fun_code, v8::HeapGraphEdge::kInternal, "literals");
2293 CHECK(literals); 2293 CHECK(literals);
2294 CHECK_EQ(v8::HeapGraphNode::kArray, literals->GetType()); 2294 CHECK_EQ(v8::HeapGraphNode::kArray, literals->GetType());
2295 CHECK_EQ(2, literals->GetChildrenCount()); 2295 CHECK_EQ(1, literals->GetChildrenCount());
2296 2296
2297 // The second value in the literals array should be the boilerplate, 2297 // The first value in the literals array should be the boilerplate,
2298 // after an AllocationSite. 2298 // after an AllocationSite.
2299 const v8::HeapGraphEdge* prop = literals->GetChild(1); 2299 const v8::HeapGraphEdge* prop = literals->GetChild(0);
2300 const v8::HeapGraphNode* allocation_site = prop->GetToNode(); 2300 const v8::HeapGraphNode* allocation_site = prop->GetToNode();
2301 v8::String::Utf8Value name(allocation_site->GetName()); 2301 v8::String::Utf8Value name(allocation_site->GetName());
2302 CHECK_EQ(0, strcmp("system / AllocationSite", *name)); 2302 CHECK_EQ(0, strcmp("system / AllocationSite", *name));
2303 const v8::HeapGraphNode* transition_info = 2303 const v8::HeapGraphNode* transition_info =
2304 GetProperty(allocation_site, v8::HeapGraphEdge::kInternal, 2304 GetProperty(allocation_site, v8::HeapGraphEdge::kInternal,
2305 "transition_info"); 2305 "transition_info");
2306 CHECK(transition_info); 2306 CHECK(transition_info);
2307 2307
2308 const v8::HeapGraphNode* elements = 2308 const v8::HeapGraphNode* elements =
2309 GetProperty(transition_info, v8::HeapGraphEdge::kInternal, 2309 GetProperty(transition_info, v8::HeapGraphEdge::kInternal,
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
2829 map.AddRange(ToAddress(0x180), 0x80, 6U); 2829 map.AddRange(ToAddress(0x180), 0x80, 6U);
2830 map.AddRange(ToAddress(0x180), 0x80, 7U); 2830 map.AddRange(ToAddress(0x180), 0x80, 7U);
2831 CHECK_EQ(7u, map.GetTraceNodeId(ToAddress(0x180))); 2831 CHECK_EQ(7u, map.GetTraceNodeId(ToAddress(0x180)));
2832 CHECK_EQ(5u, map.GetTraceNodeId(ToAddress(0x200))); 2832 CHECK_EQ(5u, map.GetTraceNodeId(ToAddress(0x200)));
2833 CHECK_EQ(3u, map.size()); 2833 CHECK_EQ(3u, map.size());
2834 2834
2835 map.Clear(); 2835 map.Clear();
2836 CHECK_EQ(0u, map.size()); 2836 CHECK_EQ(0u, map.size());
2837 CHECK_EQ(0u, map.GetTraceNodeId(ToAddress(0x400))); 2837 CHECK_EQ(0u, map.GetTraceNodeId(ToAddress(0x400)));
2838 } 2838 }
OLDNEW
« no previous file with comments | « src/runtime/runtime-regexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698