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

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

Issue 145973006: Do not overwrite builtin code names in heap profiler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap-snapshot-generator.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 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 const char* stub_path[] = { 2106 const char* stub_path[] = {
2107 "::(GC roots)", 2107 "::(GC roots)",
2108 "::(Strong roots)", 2108 "::(Strong roots)",
2109 "code_stubs::", 2109 "code_stubs::",
2110 "::(ArraySingleArgumentConstructorStub code)" 2110 "::(ArraySingleArgumentConstructorStub code)"
2111 }; 2111 };
2112 const v8::HeapGraphNode* node = GetNodeByPath(snapshot, 2112 const v8::HeapGraphNode* node = GetNodeByPath(snapshot,
2113 stub_path, ARRAY_SIZE(stub_path)); 2113 stub_path, ARRAY_SIZE(stub_path));
2114 CHECK_NE(NULL, node); 2114 CHECK_NE(NULL, node);
2115 2115
2116 const char* builtin_path[] = { 2116 const char* builtin_path1[] = {
2117 "::(GC roots)", 2117 "::(GC roots)",
2118 "::(Builtins)", 2118 "::(Builtins)",
2119 "::(KeyedLoadIC_Generic code)" 2119 "::(KeyedLoadIC_Generic builtin)"
2120 }; 2120 };
2121 node = GetNodeByPath(snapshot, builtin_path, ARRAY_SIZE(builtin_path)); 2121 node = GetNodeByPath(snapshot, builtin_path1, ARRAY_SIZE(builtin_path1));
2122 CHECK_NE(NULL, node); 2122 CHECK_NE(NULL, node);
2123
2124 const char* builtin_path2[] = {
2125 "::(GC roots)",
2126 "::(Builtins)",
2127 "::(CompileUnoptimized builtin)"
2128 };
2129 node = GetNodeByPath(snapshot, builtin_path2, ARRAY_SIZE(builtin_path2));
2130 CHECK_NE(NULL, node);
2131 v8::String::Utf8Value node_name(node->GetName());
2132 CHECK_EQ("(CompileUnoptimized builtin)", *node_name);
2123 } 2133 }
2124 2134
2125 2135
2126 static const char* record_trace_tree_source = 2136 static const char* record_trace_tree_source =
2127 "var topFunctions = [];\n" 2137 "var topFunctions = [];\n"
2128 "var global = this;\n" 2138 "var global = this;\n"
2129 "function generateFunctions(width, depth) {\n" 2139 "function generateFunctions(width, depth) {\n"
2130 " var script = [];\n" 2140 " var script = [];\n"
2131 " for (var i = 0; i < width; i++) {\n" 2141 " for (var i = 0; i < width; i++) {\n"
2132 " for (var j = 0; j < depth; j++) {\n" 2142 " for (var j = 0; j < depth; j++) {\n"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2333 const v8::HeapGraphNode* arr1_obj = 2343 const v8::HeapGraphNode* arr1_obj =
2334 GetProperty(global, v8::HeapGraphEdge::kProperty, "arr1"); 2344 GetProperty(global, v8::HeapGraphEdge::kProperty, "arr1");
2335 CHECK_NE(NULL, arr1_obj); 2345 CHECK_NE(NULL, arr1_obj);
2336 const v8::HeapGraphNode* arr1_buffer = 2346 const v8::HeapGraphNode* arr1_buffer =
2337 GetProperty(arr1_obj, v8::HeapGraphEdge::kInternal, "buffer"); 2347 GetProperty(arr1_obj, v8::HeapGraphEdge::kInternal, "buffer");
2338 CHECK_NE(NULL, arr1_buffer); 2348 CHECK_NE(NULL, arr1_buffer);
2339 const v8::HeapGraphNode* first_view = 2349 const v8::HeapGraphNode* first_view =
2340 GetProperty(arr1_buffer, v8::HeapGraphEdge::kWeak, "weak_first_view"); 2350 GetProperty(arr1_buffer, v8::HeapGraphEdge::kWeak, "weak_first_view");
2341 CHECK_NE(NULL, first_view); 2351 CHECK_NE(NULL, first_view);
2342 } 2352 }
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698