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

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

Issue 911713003: add transitions for global properties in ics (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/objects.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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 400
401 401
402 TEST(HeapSnapshotSlicedString) { 402 TEST(HeapSnapshotSlicedString) {
403 LocalContext env; 403 LocalContext env;
404 v8::HandleScope scope(env->GetIsolate()); 404 v8::HandleScope scope(env->GetIsolate());
405 v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler(); 405 v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
406 CompileRun( 406 CompileRun(
407 "parent_string = \"123456789.123456789.123456789.123456789.123456789." 407 "parent_string = \"123456789.123456789.123456789.123456789.123456789."
408 "123456789.123456789.123456789.123456789.123456789." 408 "123456789.123456789.123456789.123456789.123456789."
409 "123456789.123456789.123456789.123456789.123456789." 409 "123456789.123456789.123456789.123456789.123456789."
410 "123456789.123456789.123456789.123456789.123456789."
411 "123456789.123456789.123456789.123456789.123456789."
412 "123456789.123456789.123456789.123456789.123456789."
413 "123456789.123456789.123456789.123456789.123456789."
410 "123456789.123456789.123456789.123456789.123456789.\";" 414 "123456789.123456789.123456789.123456789.123456789.\";"
411 "child_string = parent_string.slice(100);"); 415 "child_string = parent_string.slice(100);");
412 const v8::HeapSnapshot* snapshot = 416 const v8::HeapSnapshot* snapshot =
413 heap_profiler->TakeHeapSnapshot(v8_str("strings")); 417 heap_profiler->TakeHeapSnapshot(v8_str("strings"));
414 CHECK(ValidateSnapshot(snapshot)); 418 CHECK(ValidateSnapshot(snapshot));
415 const v8::HeapGraphNode* global = GetGlobalObject(snapshot); 419 const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
416 const v8::HeapGraphNode* parent_string = 420 const v8::HeapGraphNode* parent_string =
417 GetProperty(global, v8::HeapGraphEdge::kProperty, "parent_string"); 421 GetProperty(global, v8::HeapGraphEdge::kProperty, "parent_string");
418 CHECK(parent_string); 422 CHECK(parent_string);
419 const v8::HeapGraphNode* child_string = 423 const v8::HeapGraphNode* child_string =
(...skipping 2405 matching lines...) Expand 10 before | Expand all | Expand 10 after
2825 map.AddRange(ToAddress(0x180), 0x80, 6U); 2829 map.AddRange(ToAddress(0x180), 0x80, 6U);
2826 map.AddRange(ToAddress(0x180), 0x80, 7U); 2830 map.AddRange(ToAddress(0x180), 0x80, 7U);
2827 CHECK_EQ(7u, map.GetTraceNodeId(ToAddress(0x180))); 2831 CHECK_EQ(7u, map.GetTraceNodeId(ToAddress(0x180)));
2828 CHECK_EQ(5u, map.GetTraceNodeId(ToAddress(0x200))); 2832 CHECK_EQ(5u, map.GetTraceNodeId(ToAddress(0x200)));
2829 CHECK_EQ(3u, map.size()); 2833 CHECK_EQ(3u, map.size());
2830 2834
2831 map.Clear(); 2835 map.Clear();
2832 CHECK_EQ(0u, map.size()); 2836 CHECK_EQ(0u, map.size());
2833 CHECK_EQ(0u, map.GetTraceNodeId(ToAddress(0x400))); 2837 CHECK_EQ(0u, map.GetTraceNodeId(ToAddress(0x400)));
2834 } 2838 }
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698