Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 869 } | 869 } |
| 870 | 870 |
| 871 | 871 |
| 872 void Logger::FunctionCreateEvent(JSFunction* function) { | 872 void Logger::FunctionCreateEvent(JSFunction* function) { |
| 873 #ifdef ENABLE_LOGGING_AND_PROFILING | 873 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 874 static Address prev_code = NULL; | 874 static Address prev_code = NULL; |
| 875 if (!Log::IsEnabled() || !FLAG_log_code) return; | 875 if (!Log::IsEnabled() || !FLAG_log_code) return; |
| 876 LogMessageBuilder msg; | 876 LogMessageBuilder msg; |
| 877 msg.Append("%s,", log_events_[FUNCTION_CREATION_EVENT]); | 877 msg.Append("%s,", log_events_[FUNCTION_CREATION_EVENT]); |
| 878 msg.AppendAddress(function->address()); | 878 msg.AppendAddress(function->address()); |
| 879 msg.Append(','); | 879 msg.Append(','); |
|
Søren Thygesen Gjesse
2010/09/24 10:20:07
I think a comment here on why we use unchecked_cod
mnaganov (inactive)
2010/09/24 11:43:40
Done.
| |
| 880 msg.AppendAddress(function->code()->address(), prev_code); | 880 msg.AppendAddress(function->unchecked_code()->address(), prev_code); |
| 881 prev_code = function->code()->address(); | 881 prev_code = function->unchecked_code()->address(); |
| 882 if (FLAG_compress_log) { | 882 if (FLAG_compress_log) { |
| 883 ASSERT(compression_helper_ != NULL); | 883 ASSERT(compression_helper_ != NULL); |
| 884 if (!compression_helper_->HandleMessage(&msg)) return; | 884 if (!compression_helper_->HandleMessage(&msg)) return; |
| 885 } | 885 } |
| 886 msg.Append('\n'); | 886 msg.Append('\n'); |
| 887 msg.WriteToLogFile(); | 887 msg.WriteToLogFile(); |
| 888 #endif | 888 #endif |
| 889 } | 889 } |
| 890 | 890 |
| 891 | 891 |
| 892 void Logger::FunctionCreateEventFromMove(JSFunction* function, | |
| 893 HeapObject*) { | |
| 894 #ifdef ENABLE_LOGGING_AND_PROFILING | |
| 895 if (function->unchecked_code() != Builtins::builtin(Builtins::LazyCompile)) { | |
| 896 FunctionCreateEvent(function); | |
| 897 } | |
| 898 #endif | |
| 899 } | |
| 900 | |
| 901 | |
| 892 void Logger::FunctionMoveEvent(Address from, Address to) { | 902 void Logger::FunctionMoveEvent(Address from, Address to) { |
| 893 #ifdef ENABLE_LOGGING_AND_PROFILING | 903 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 894 MoveEventInternal(FUNCTION_MOVE_EVENT, from, to); | 904 MoveEventInternal(FUNCTION_MOVE_EVENT, from, to); |
| 895 #endif | 905 #endif |
| 896 } | 906 } |
| 897 | 907 |
| 898 | 908 |
| 899 void Logger::FunctionDeleteEvent(Address from) { | 909 void Logger::FunctionDeleteEvent(Address from) { |
| 900 #ifdef ENABLE_LOGGING_AND_PROFILING | 910 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 901 DeleteEventInternal(FUNCTION_DELETE_EVENT, from); | 911 DeleteEventInternal(FUNCTION_DELETE_EVENT, from); |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1556 } | 1566 } |
| 1557 // Otherwise, if the sliding state window computation has not been | 1567 // Otherwise, if the sliding state window computation has not been |
| 1558 // started we do it now. | 1568 // started we do it now. |
| 1559 if (sliding_state_window_ == NULL) { | 1569 if (sliding_state_window_ == NULL) { |
| 1560 sliding_state_window_ = new SlidingStateWindow(); | 1570 sliding_state_window_ = new SlidingStateWindow(); |
| 1561 } | 1571 } |
| 1562 #endif | 1572 #endif |
| 1563 } | 1573 } |
| 1564 | 1574 |
| 1565 } } // namespace v8::internal | 1575 } } // namespace v8::internal |
| OLD | NEW |