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

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

Issue 1961373003: [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, 7 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-debug.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);
490 logger->StringEvent("test-logging-done", ""); 488 logger->StringEvent("test-logging-done", "");
491 489
492 // Iterate heap to find compiled functions, will write to log. 490 // Iterate heap to find compiled functions, will write to log.
493 logger->LogCompiledFunctions(); 491 logger->LogCompiledFunctions();
494 logger->StringEvent("test-traversal-done", ""); 492 logger->StringEvent("test-traversal-done", "");
495 493
496 bool exists = false; 494 bool exists = false;
497 i::Vector<const char> log( 495 i::Vector<const char> log(
498 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true)); 496 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
499 CHECK(exists); 497 CHECK(exists);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac" 606 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac"
609 "(){})();"; 607 "(){})();";
610 608
611 CompileRun(source_text); 609 CompileRun(source_text);
612 610
613 // Must not crash. 611 // Must not crash.
614 logger->LogCompiledFunctions(); 612 logger->LogCompiledFunctions();
615 } 613 }
616 isolate->Dispose(); 614 isolate->Dispose();
617 } 615 }
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/mjsunit/debug-referenced-by.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698