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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 #endif | 883 #endif |
884 } | 884 } |
885 | 885 |
886 | 886 |
887 void Logger::HeapSampleJSConstructorEvent(const char* constructor, | 887 void Logger::HeapSampleJSConstructorEvent(const char* constructor, |
888 int number, int bytes) { | 888 int number, int bytes) { |
889 #ifdef ENABLE_LOGGING_AND_PROFILING | 889 #ifdef ENABLE_LOGGING_AND_PROFILING |
890 if (!Log::IsEnabled() || !FLAG_log_gc) return; | 890 if (!Log::IsEnabled() || !FLAG_log_gc) return; |
891 LogMessageBuilder msg; | 891 LogMessageBuilder msg; |
892 msg.Append("heap-js-cons-item,%s,%d,%d\n", | 892 msg.Append("heap-js-cons-item,%s,%d,%d\n", |
893 constructor != NULL ? | 893 constructor[0] != '\0' ? constructor : "(anonymous)", |
894 (constructor[0] != '\0' ? constructor : "(anonymous)") : | |
895 "(no_constructor)", | |
896 number, bytes); | 894 number, bytes); |
897 msg.WriteToLogFile(); | 895 msg.WriteToLogFile(); |
898 #endif | 896 #endif |
899 } | 897 } |
900 | 898 |
901 | 899 |
902 void Logger::DebugTag(const char* call_site_tag) { | 900 void Logger::DebugTag(const char* call_site_tag) { |
903 #ifdef ENABLE_LOGGING_AND_PROFILING | 901 #ifdef ENABLE_LOGGING_AND_PROFILING |
904 if (!Log::IsEnabled() || !FLAG_log) return; | 902 if (!Log::IsEnabled() || !FLAG_log) return; |
905 LogMessageBuilder msg; | 903 LogMessageBuilder msg; |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 // Otherwise, if the sliding state window computation has not been | 1248 // Otherwise, if the sliding state window computation has not been |
1251 // started we do it now. | 1249 // started we do it now. |
1252 if (sliding_state_window_ == NULL) { | 1250 if (sliding_state_window_ == NULL) { |
1253 sliding_state_window_ = new SlidingStateWindow(); | 1251 sliding_state_window_ = new SlidingStateWindow(); |
1254 } | 1252 } |
1255 #endif | 1253 #endif |
1256 } | 1254 } |
1257 | 1255 |
1258 | 1256 |
1259 } } // namespace v8::internal | 1257 } } // namespace v8::internal |
OLD | NEW |