| 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 <memory> | 8 #include <memory> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 } | 1406 } |
| 1407 } | 1407 } |
| 1408 | 1408 |
| 1409 class EnumerateOptimizedFunctionsVisitor: public OptimizedFunctionVisitor { | 1409 class EnumerateOptimizedFunctionsVisitor: public OptimizedFunctionVisitor { |
| 1410 public: | 1410 public: |
| 1411 EnumerateOptimizedFunctionsVisitor(Handle<SharedFunctionInfo>* sfis, | 1411 EnumerateOptimizedFunctionsVisitor(Handle<SharedFunctionInfo>* sfis, |
| 1412 Handle<AbstractCode>* code_objects, | 1412 Handle<AbstractCode>* code_objects, |
| 1413 int* count) | 1413 int* count) |
| 1414 : sfis_(sfis), code_objects_(code_objects), count_(count) {} | 1414 : sfis_(sfis), code_objects_(code_objects), count_(count) {} |
| 1415 | 1415 |
| 1416 virtual void EnterContext(Context* context) {} | |
| 1417 virtual void LeaveContext(Context* context) {} | |
| 1418 | |
| 1419 virtual void VisitFunction(JSFunction* function) { | 1416 virtual void VisitFunction(JSFunction* function) { |
| 1420 SharedFunctionInfo* sfi = SharedFunctionInfo::cast(function->shared()); | 1417 SharedFunctionInfo* sfi = SharedFunctionInfo::cast(function->shared()); |
| 1421 Object* maybe_script = sfi->script(); | 1418 Object* maybe_script = sfi->script(); |
| 1422 if (maybe_script->IsScript() | 1419 if (maybe_script->IsScript() |
| 1423 && !Script::cast(maybe_script)->HasValidSource()) return; | 1420 && !Script::cast(maybe_script)->HasValidSource()) return; |
| 1424 | 1421 |
| 1425 DCHECK(function->abstract_code()->kind() == | 1422 DCHECK(function->abstract_code()->kind() == |
| 1426 AbstractCode::OPTIMIZED_FUNCTION); | 1423 AbstractCode::OPTIMIZED_FUNCTION); |
| 1427 AddFunctionAndCode(sfi, function->abstract_code(), sfis_, code_objects_, | 1424 AddFunctionAndCode(sfi, function->abstract_code(), sfis_, code_objects_, |
| 1428 *count_); | 1425 *count_); |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1858 | 1855 |
| 1859 if (profiler_listener_.get() != nullptr) { | 1856 if (profiler_listener_.get() != nullptr) { |
| 1860 removeCodeEventListener(profiler_listener_.get()); | 1857 removeCodeEventListener(profiler_listener_.get()); |
| 1861 } | 1858 } |
| 1862 | 1859 |
| 1863 return log_->Close(); | 1860 return log_->Close(); |
| 1864 } | 1861 } |
| 1865 | 1862 |
| 1866 } // namespace internal | 1863 } // namespace internal |
| 1867 } // namespace v8 | 1864 } // namespace v8 |
| OLD | NEW |