| OLD | NEW | 
|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "src/log.h" | 5 #include "src/log.h" | 
| 6 | 6 | 
| 7 #include <cstdarg> | 7 #include <cstdarg> | 
| 8 #include <sstream> | 8 #include <sstream> | 
| 9 | 9 | 
| 10 #include "src/v8.h" | 10 #include "src/v8.h" | 
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 281   perf_output_handle_ = NULL; | 281   perf_output_handle_ = NULL; | 
| 282 } | 282 } | 
| 283 | 283 | 
| 284 | 284 | 
| 285 void PerfBasicLogger::LogRecordedBuffer(Code* code, | 285 void PerfBasicLogger::LogRecordedBuffer(Code* code, | 
| 286                                        SharedFunctionInfo*, | 286                                        SharedFunctionInfo*, | 
| 287                                        const char* name, | 287                                        const char* name, | 
| 288                                        int length) { | 288                                        int length) { | 
| 289   DCHECK(code->instruction_start() == code->address() + Code::kHeaderSize); | 289   DCHECK(code->instruction_start() == code->address() + Code::kHeaderSize); | 
| 290 | 290 | 
|  | 291   if (FLAG_perf_basic_prof_only_functions && | 
|  | 292       (code->kind() != Code::FUNCTION && | 
|  | 293        code->kind() != Code::OPTIMIZED_FUNCTION)) { | 
|  | 294     return; | 
|  | 295   } | 
|  | 296 | 
| 291   base::OS::FPrint(perf_output_handle_, "%llx %x %.*s\n", | 297   base::OS::FPrint(perf_output_handle_, "%llx %x %.*s\n", | 
| 292                    reinterpret_cast<uint64_t>(code->instruction_start()), | 298                    reinterpret_cast<uint64_t>(code->instruction_start()), | 
| 293                    code->instruction_size(), length, name); | 299                    code->instruction_size(), length, name); | 
| 294 } | 300 } | 
| 295 | 301 | 
| 296 | 302 | 
| 297 // Low-level logging support. | 303 // Low-level logging support. | 
| 298 #define LL_LOG(Call) if (ll_logger_) ll_logger_->Call; | 304 #define LL_LOG(Call) if (ll_logger_) ll_logger_->Call; | 
| 299 | 305 | 
| 300 class LowLevelLogger : public CodeEventLogger { | 306 class LowLevelLogger : public CodeEventLogger { | 
| (...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1898     removeCodeEventListener(jit_logger_); | 1904     removeCodeEventListener(jit_logger_); | 
| 1899     delete jit_logger_; | 1905     delete jit_logger_; | 
| 1900     jit_logger_ = NULL; | 1906     jit_logger_ = NULL; | 
| 1901   } | 1907   } | 
| 1902 | 1908 | 
| 1903   return log_->Close(); | 1909   return log_->Close(); | 
| 1904 } | 1910 } | 
| 1905 | 1911 | 
| 1906 }  // namespace internal | 1912 }  // namespace internal | 
| 1907 }  // namespace v8 | 1913 }  // namespace v8 | 
| OLD | NEW | 
|---|