Commit 880934b1 authored by yurys@chromium.org's avatar yurys@chromium.org

Remove unnecessary check from Logger::LogCodeObject

Logger::LogCodeObjects is the only caller of the method. And all its
call sites check for at least one of the coditions before calling
LogCodeObjects. So there is no need to check it again.

BUG=None
R=jkummerow@chromium.org, loislo@chromium.org

Review URL: https://codereview.chromium.org/15980007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 79569924
...@@ -461,10 +461,7 @@ void CpuProfiler::StartProcessorIfNotStarted() { ...@@ -461,10 +461,7 @@ void CpuProfiler::StartProcessorIfNotStarted() {
// Enumerate stuff we already have in the heap. // Enumerate stuff we already have in the heap.
if (isolate_->heap()->HasBeenSetUp()) { if (isolate_->heap()->HasBeenSetUp()) {
if (!FLAG_prof_browser_mode) { if (!FLAG_prof_browser_mode) {
bool saved_log_code_flag = FLAG_log_code;
FLAG_log_code = true;
isolate_->logger()->LogCodeObjects(); isolate_->logger()->LogCodeObjects();
FLAG_log_code = saved_log_code_flag;
} }
isolate_->logger()->LogCompiledFunctions(); isolate_->logger()->LogCompiledFunctions();
isolate_->logger()->LogAccessorCallbacks(); isolate_->logger()->LogAccessorCallbacks();
......
...@@ -1581,7 +1581,6 @@ static int EnumerateCompiledFunctions(Heap* heap, ...@@ -1581,7 +1581,6 @@ static int EnumerateCompiledFunctions(Heap* heap,
void Logger::LogCodeObject(Object* object) { void Logger::LogCodeObject(Object* object) {
if (FLAG_log_code || FLAG_ll_prof || is_logging_code_events()) {
Code* code_object = Code::cast(object); Code* code_object = Code::cast(object);
LogEventsAndTags tag = Logger::STUB_TAG; LogEventsAndTags tag = Logger::STUB_TAG;
const char* description = "Unknown code from the snapshot"; const char* description = "Unknown code from the snapshot";
...@@ -1631,7 +1630,6 @@ void Logger::LogCodeObject(Object* object) { ...@@ -1631,7 +1630,6 @@ void Logger::LogCodeObject(Object* object) {
break; break;
} }
PROFILE(isolate_, CodeCreateEvent(tag, code_object, description)); PROFILE(isolate_, CodeCreateEvent(tag, code_object, description));
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment