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

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

Issue 2361813002: [turbofan] Don't take into account source size for inlining heuristics. (Closed)
Patch Set: Mozilla timeouts Created 4 years, 2 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/compiler/js-inlining-heuristic.cc ('k') | test/mjsunit/es6/tail-call-megatest.js » ('j') | 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 2565 matching lines...) Expand 10 before | Expand all | Expand 10 after
2576 2576
2577 const char* names[] = {"", "start", "f_0_0"}; 2577 const char* names[] = {"", "start", "f_0_0"};
2578 AllocationTraceNode* node = FindNode(tracker, ArrayVector(names)); 2578 AllocationTraceNode* node = FindNode(tracker, ArrayVector(names));
2579 CHECK(node); 2579 CHECK(node);
2580 CHECK_GE(node->allocation_count(), 12u); 2580 CHECK_GE(node->allocation_count(), 12u);
2581 CHECK_GE(node->allocation_size(), 4 * node->allocation_count()); 2581 CHECK_GE(node->allocation_size(), 4 * node->allocation_count());
2582 heap_profiler->StopTrackingHeapObjects(); 2582 heap_profiler->StopTrackingHeapObjects();
2583 } 2583 }
2584 2584
2585 TEST(TrackHeapAllocationsWithoutInlining) { 2585 TEST(TrackHeapAllocationsWithoutInlining) {
2586 i::FLAG_turbo_inlining = false;
2586 i::FLAG_max_inlined_source_size = 0; // Disable inlining 2587 i::FLAG_max_inlined_source_size = 0; // Disable inlining
2587 v8::HandleScope scope(v8::Isolate::GetCurrent()); 2588 v8::HandleScope scope(v8::Isolate::GetCurrent());
2588 LocalContext env; 2589 LocalContext env;
2589 2590
2590 v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler(); 2591 v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
2591 heap_profiler->StartTrackingHeapObjects(true); 2592 heap_profiler->StartTrackingHeapObjects(true);
2592 2593
2593 CompileRun(record_trace_tree_source); 2594 CompileRun(record_trace_tree_source);
2594 2595
2595 AllocationTracker* tracker = 2596 AllocationTracker* tracker =
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
3110 " a[i] = i;\n" 3111 " a[i] = i;\n"
3111 " for (var i = 0; i < 3; ++i)\n" 3112 " for (var i = 0; i < 3; ++i)\n"
3112 " a.shift();\n" 3113 " a.shift();\n"
3113 "}\n"); 3114 "}\n");
3114 3115
3115 CcTest::CollectGarbage(v8::internal::NEW_SPACE); 3116 CcTest::CollectGarbage(v8::internal::NEW_SPACE);
3116 // Should not crash. 3117 // Should not crash.
3117 3118
3118 heap_profiler->StopSamplingHeapProfiler(); 3119 heap_profiler->StopSamplingHeapProfiler();
3119 } 3120 }
OLDNEW
« no previous file with comments | « src/compiler/js-inlining-heuristic.cc ('k') | test/mjsunit/es6/tail-call-megatest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698