| 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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 void Logger::HeapSampleItemEvent(const char* type, int number, int bytes) { | 877 void Logger::HeapSampleItemEvent(const char* type, int number, int bytes) { |
| 878 #ifdef ENABLE_LOGGING_AND_PROFILING | 878 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 879 if (!Log::IsEnabled() || !FLAG_log_gc) return; | 879 if (!Log::IsEnabled() || !FLAG_log_gc) return; |
| 880 LogMessageBuilder msg; | 880 LogMessageBuilder msg; |
| 881 msg.Append("heap-sample-item,%s,%d,%d\n", type, number, bytes); | 881 msg.Append("heap-sample-item,%s,%d,%d\n", type, number, bytes); |
| 882 msg.WriteToLogFile(); | 882 msg.WriteToLogFile(); |
| 883 #endif | 883 #endif |
| 884 } | 884 } |
| 885 | 885 |
| 886 | 886 |
| 887 void Logger::HeapSampleJSConstructorEvent(const char* constructor, |
| 888 int number, int bytes) { |
| 889 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 890 if (!Log::IsEnabled() || !FLAG_log_gc) return; |
| 891 LogMessageBuilder msg; |
| 892 msg.Append("heap-js-cons-item,%s,%d,%d\n", |
| 893 constructor != NULL ? |
| 894 (constructor[0] != '\0' ? constructor : "(anonymous)") : |
| 895 "(no_constructor)", |
| 896 number, bytes); |
| 897 msg.WriteToLogFile(); |
| 898 #endif |
| 899 } |
| 900 |
| 901 |
| 887 void Logger::DebugTag(const char* call_site_tag) { | 902 void Logger::DebugTag(const char* call_site_tag) { |
| 888 #ifdef ENABLE_LOGGING_AND_PROFILING | 903 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 889 if (!Log::IsEnabled() || !FLAG_log) return; | 904 if (!Log::IsEnabled() || !FLAG_log) return; |
| 890 LogMessageBuilder msg; | 905 LogMessageBuilder msg; |
| 891 msg.Append("debug-tag,%s\n", call_site_tag); | 906 msg.Append("debug-tag,%s\n", call_site_tag); |
| 892 msg.WriteToLogFile(); | 907 msg.WriteToLogFile(); |
| 893 #endif | 908 #endif |
| 894 } | 909 } |
| 895 | 910 |
| 896 | 911 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 // Otherwise, if the sliding state window computation has not been | 1225 // Otherwise, if the sliding state window computation has not been |
| 1211 // started we do it now. | 1226 // started we do it now. |
| 1212 if (sliding_state_window_ == NULL) { | 1227 if (sliding_state_window_ == NULL) { |
| 1213 sliding_state_window_ = new SlidingStateWindow(); | 1228 sliding_state_window_ = new SlidingStateWindow(); |
| 1214 } | 1229 } |
| 1215 #endif | 1230 #endif |
| 1216 } | 1231 } |
| 1217 | 1232 |
| 1218 | 1233 |
| 1219 } } // namespace v8::internal | 1234 } } // namespace v8::internal |
| OLD | NEW |