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

Side by Side Diff: test/cctest/test-log.cc

Issue 2020363002: Revert of [heap] Do not invoke GC to make heap iterable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « test/cctest/test-heap-profiler.cc ('k') | test/mjsunit/debug-referenced-by.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 ScopedLoggerInitializer initialize_logger(saved_log, saved_prof, isolate); 478 ScopedLoggerInitializer initialize_logger(saved_log, saved_prof, isolate);
479 Logger* logger = initialize_logger.logger(); 479 Logger* logger = initialize_logger.logger();
480 480
481 // Compile and run a function that creates other functions. 481 // Compile and run a function that creates other functions.
482 CompileRun( 482 CompileRun(
483 "(function f(obj) {\n" 483 "(function f(obj) {\n"
484 " obj.test =\n" 484 " obj.test =\n"
485 " (function a(j) { return function b() { return j; } })(100);\n" 485 " (function a(j) { return function b() { return j; } })(100);\n"
486 "})(this);"); 486 "})(this);");
487 logger->StopProfiler(); 487 logger->StopProfiler();
488 reinterpret_cast<i::Isolate*>(isolate)->heap()->CollectAllGarbage(
489 i::Heap::kMakeHeapIterableMask);
488 logger->StringEvent("test-logging-done", ""); 490 logger->StringEvent("test-logging-done", "");
489 491
490 // Iterate heap to find compiled functions, will write to log. 492 // Iterate heap to find compiled functions, will write to log.
491 logger->LogCompiledFunctions(); 493 logger->LogCompiledFunctions();
492 logger->StringEvent("test-traversal-done", ""); 494 logger->StringEvent("test-traversal-done", "");
493 495
494 bool exists = false; 496 bool exists = false;
495 i::Vector<const char> log( 497 i::Vector<const char> log(
496 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true)); 498 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
497 CHECK(exists); 499 CHECK(exists);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac" 608 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac"
607 "(){})();"; 609 "(){})();";
608 610
609 CompileRun(source_text); 611 CompileRun(source_text);
610 612
611 // Must not crash. 613 // Must not crash.
612 logger->LogCompiledFunctions(); 614 logger->LogCompiledFunctions();
613 } 615 }
614 isolate->Dispose(); 616 isolate->Dispose();
615 } 617 }
OLDNEW
« no previous file with comments | « test/cctest/test-heap-profiler.cc ('k') | test/mjsunit/debug-referenced-by.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698