Chromium Code Reviews| 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 <inttypes.h> | |
| 7 #include <cstdarg> | 8 #include <cstdarg> |
| 8 #include <sstream> | 9 #include <sstream> |
| 9 | 10 |
| 10 #include "src/bailout-reason.h" | 11 #include "src/bailout-reason.h" |
| 11 #include "src/base/platform/platform.h" | 12 #include "src/base/platform/platform.h" |
| 12 #include "src/bootstrapper.h" | 13 #include "src/bootstrapper.h" |
| 13 #include "src/code-stubs.h" | 14 #include "src/code-stubs.h" |
| 14 #include "src/deoptimizer.h" | 15 #include "src/deoptimizer.h" |
| 15 #include "src/global-handles.h" | 16 #include "src/global-handles.h" |
| 16 #include "src/interpreter/bytecodes.h" | 17 #include "src/interpreter/bytecodes.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 277 | 278 |
| 278 void PerfBasicLogger::LogRecordedBuffer(AbstractCode* code, SharedFunctionInfo*, | 279 void PerfBasicLogger::LogRecordedBuffer(AbstractCode* code, SharedFunctionInfo*, |
| 279 const char* name, int length) { | 280 const char* name, int length) { |
| 280 if (FLAG_perf_basic_prof_only_functions && | 281 if (FLAG_perf_basic_prof_only_functions && |
| 281 (code->kind() != AbstractCode::FUNCTION && | 282 (code->kind() != AbstractCode::FUNCTION && |
| 282 code->kind() != AbstractCode::INTERPRETED_FUNCTION && | 283 code->kind() != AbstractCode::INTERPRETED_FUNCTION && |
| 283 code->kind() != AbstractCode::OPTIMIZED_FUNCTION)) { | 284 code->kind() != AbstractCode::OPTIMIZED_FUNCTION)) { |
| 284 return; | 285 return; |
| 285 } | 286 } |
| 286 | 287 |
| 287 base::OS::FPrint(perf_output_handle_, "%p %x %.*s\n", | 288 base::OS::FPrint(perf_output_handle_, "%" PRIxPTR " %x %.*s\n", |
|
Jarin
2016/04/14 12:16:53
Couldn't you use V8PRIxPTR?
Stefano Sanfilippo
2016/04/14 12:31:54
Done.
| |
| 288 code->instruction_start(), code->instruction_size(), length, | 289 reinterpret_cast<uintptr_t>(code->instruction_start()), |
| 289 name); | 290 code->instruction_size(), length, name); |
| 290 } | 291 } |
| 291 | 292 |
| 292 // Low-level logging support. | 293 // Low-level logging support. |
| 293 #define LL_LOG(Call) if (ll_logger_) ll_logger_->Call; | 294 #define LL_LOG(Call) if (ll_logger_) ll_logger_->Call; |
| 294 | 295 |
| 295 class LowLevelLogger : public CodeEventLogger { | 296 class LowLevelLogger : public CodeEventLogger { |
| 296 public: | 297 public: |
| 297 explicit LowLevelLogger(const char* file_name); | 298 explicit LowLevelLogger(const char* file_name); |
| 298 ~LowLevelLogger() override; | 299 ~LowLevelLogger() override; |
| 299 | 300 |
| (...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1848 removeCodeEventListener(jit_logger_); | 1849 removeCodeEventListener(jit_logger_); |
| 1849 delete jit_logger_; | 1850 delete jit_logger_; |
| 1850 jit_logger_ = NULL; | 1851 jit_logger_ = NULL; |
| 1851 } | 1852 } |
| 1852 | 1853 |
| 1853 return log_->Close(); | 1854 return log_->Close(); |
| 1854 } | 1855 } |
| 1855 | 1856 |
| 1856 } // namespace internal | 1857 } // namespace internal |
| 1857 } // namespace v8 | 1858 } // namespace v8 |
| OLD | NEW |