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

Side by Side Diff: src/cpu-profiler.cc

Issue 15980007: Remove unnecessary check from Logger::LogCodeObject (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/log.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 // Disable logging when using the new implementation. 454 // Disable logging when using the new implementation.
455 saved_logging_nesting_ = isolate_->logger()->logging_nesting_; 455 saved_logging_nesting_ = isolate_->logger()->logging_nesting_;
456 isolate_->logger()->logging_nesting_ = 0; 456 isolate_->logger()->logging_nesting_ = 0;
457 generator_ = new ProfileGenerator(profiles_); 457 generator_ = new ProfileGenerator(profiles_);
458 processor_ = new ProfilerEventsProcessor(generator_, profiles_); 458 processor_ = new ProfilerEventsProcessor(generator_, profiles_);
459 is_profiling_ = true; 459 is_profiling_ = true;
460 processor_->StartSynchronously(); 460 processor_->StartSynchronously();
461 // Enumerate stuff we already have in the heap. 461 // Enumerate stuff we already have in the heap.
462 if (isolate_->heap()->HasBeenSetUp()) { 462 if (isolate_->heap()->HasBeenSetUp()) {
463 if (!FLAG_prof_browser_mode) { 463 if (!FLAG_prof_browser_mode) {
464 bool saved_log_code_flag = FLAG_log_code;
465 FLAG_log_code = true;
466 isolate_->logger()->LogCodeObjects(); 464 isolate_->logger()->LogCodeObjects();
467 FLAG_log_code = saved_log_code_flag;
468 } 465 }
469 isolate_->logger()->LogCompiledFunctions(); 466 isolate_->logger()->LogCompiledFunctions();
470 isolate_->logger()->LogAccessorCallbacks(); 467 isolate_->logger()->LogAccessorCallbacks();
471 } 468 }
472 // Enable stack sampling. 469 // Enable stack sampling.
473 Sampler* sampler = isolate_->logger()->sampler(); 470 Sampler* sampler = isolate_->logger()->sampler();
474 sampler->IncreaseProfilingDepth(); 471 sampler->IncreaseProfilingDepth();
475 if (!sampler->IsActive()) { 472 if (!sampler->IsActive()) {
476 sampler->Start(); 473 sampler->Start();
477 need_to_stop_sampler_ = true; 474 need_to_stop_sampler_ = true;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 processor_->Join(); 520 processor_->Join();
524 delete processor_; 521 delete processor_;
525 delete generator_; 522 delete generator_;
526 processor_ = NULL; 523 processor_ = NULL;
527 generator_ = NULL; 524 generator_ = NULL;
528 logger->logging_nesting_ = saved_logging_nesting_; 525 logger->logging_nesting_ = saved_logging_nesting_;
529 } 526 }
530 527
531 528
532 } } // namespace v8::internal 529 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698