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

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

Issue 878263002: Add MEGAMORPHIC state support for KeyedLoadIC (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/runtime/runtime-object.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 2377 matching lines...) Expand 10 before | Expand all | Expand 10 after
2388 const char* stub_path[] = { 2388 const char* stub_path[] = {
2389 "::(GC roots)", 2389 "::(GC roots)",
2390 "::(Strong roots)", 2390 "::(Strong roots)",
2391 "code_stubs::", 2391 "code_stubs::",
2392 "::(ArraySingleArgumentConstructorStub code)" 2392 "::(ArraySingleArgumentConstructorStub code)"
2393 }; 2393 };
2394 const v8::HeapGraphNode* node = GetNodeByPath(snapshot, 2394 const v8::HeapGraphNode* node = GetNodeByPath(snapshot,
2395 stub_path, arraysize(stub_path)); 2395 stub_path, arraysize(stub_path));
2396 CHECK_NE(NULL, node); 2396 CHECK_NE(NULL, node);
2397 2397
2398 const char* builtin_path1[] = { 2398 const char* builtin_path1[] = {"::(GC roots)", "::(Builtins)",
2399 "::(GC roots)", 2399 "::(KeyedLoadIC_Megamorphic builtin)"};
2400 "::(Builtins)",
2401 "::(KeyedLoadIC_Generic builtin)"
2402 };
2403 node = GetNodeByPath(snapshot, builtin_path1, arraysize(builtin_path1)); 2400 node = GetNodeByPath(snapshot, builtin_path1, arraysize(builtin_path1));
2404 CHECK_NE(NULL, node); 2401 CHECK_NE(NULL, node);
2405 2402
2406 const char* builtin_path2[] = {"::(GC roots)", "::(Builtins)", 2403 const char* builtin_path2[] = {"::(GC roots)", "::(Builtins)",
2407 "::(CompileLazy builtin)"}; 2404 "::(CompileLazy builtin)"};
2408 node = GetNodeByPath(snapshot, builtin_path2, arraysize(builtin_path2)); 2405 node = GetNodeByPath(snapshot, builtin_path2, arraysize(builtin_path2));
2409 CHECK_NE(NULL, node); 2406 CHECK_NE(NULL, node);
2410 v8::String::Utf8Value node_name(node->GetName()); 2407 v8::String::Utf8Value node_name(node->GetName());
2411 CHECK_EQ("(CompileLazy builtin)", *node_name); 2408 CHECK_EQ("(CompileLazy builtin)", *node_name);
2412 } 2409 }
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
2838 map.AddRange(ToAddress(0x180), 0x80, 6U); 2835 map.AddRange(ToAddress(0x180), 0x80, 6U);
2839 map.AddRange(ToAddress(0x180), 0x80, 7U); 2836 map.AddRange(ToAddress(0x180), 0x80, 7U);
2840 CHECK_EQ(7, map.GetTraceNodeId(ToAddress(0x180))); 2837 CHECK_EQ(7, map.GetTraceNodeId(ToAddress(0x180)));
2841 CHECK_EQ(5, map.GetTraceNodeId(ToAddress(0x200))); 2838 CHECK_EQ(5, map.GetTraceNodeId(ToAddress(0x200)));
2842 CHECK_EQ(3, static_cast<int>(map.size())); 2839 CHECK_EQ(3, static_cast<int>(map.size()));
2843 2840
2844 map.Clear(); 2841 map.Clear();
2845 CHECK_EQ(0, static_cast<int>(map.size())); 2842 CHECK_EQ(0, static_cast<int>(map.size()));
2846 CHECK_EQ(0, map.GetTraceNodeId(ToAddress(0x400))); 2843 CHECK_EQ(0, map.GetTraceNodeId(ToAddress(0x400)));
2847 } 2844 }
OLDNEW
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698