| 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 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 msg.Append("%s", event + pos); | 927 msg.Append("%s", event + pos); |
| 928 pos += event_len; | 928 pos += event_len; |
| 929 } | 929 } |
| 930 msg.Append('\n'); | 930 msg.Append('\n'); |
| 931 msg.WriteToLogFile(); | 931 msg.WriteToLogFile(); |
| 932 } while (pos < event_len); | 932 } while (pos < event_len); |
| 933 #endif | 933 #endif |
| 934 } | 934 } |
| 935 | 935 |
| 936 | 936 |
| 937 void Logger::HeapSampleJSProducerEvent(const char* constructor, |
| 938 Address* stack) { |
| 939 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 940 if (!Log::IsEnabled() || !FLAG_log_gc) return; |
| 941 LogMessageBuilder msg; |
| 942 msg.Append("heap-js-prod-item,%s", constructor); |
| 943 while (*stack != NULL) { |
| 944 msg.Append(",0x%" V8PRIxPTR, *stack++); |
| 945 } |
| 946 msg.Append("\n"); |
| 947 msg.WriteToLogFile(); |
| 948 #endif |
| 949 } |
| 950 |
| 951 |
| 937 void Logger::DebugTag(const char* call_site_tag) { | 952 void Logger::DebugTag(const char* call_site_tag) { |
| 938 #ifdef ENABLE_LOGGING_AND_PROFILING | 953 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 939 if (!Log::IsEnabled() || !FLAG_log) return; | 954 if (!Log::IsEnabled() || !FLAG_log) return; |
| 940 LogMessageBuilder msg; | 955 LogMessageBuilder msg; |
| 941 msg.Append("debug-tag,%s\n", call_site_tag); | 956 msg.Append("debug-tag,%s\n", call_site_tag); |
| 942 msg.WriteToLogFile(); | 957 msg.WriteToLogFile(); |
| 943 #endif | 958 #endif |
| 944 } | 959 } |
| 945 | 960 |
| 946 | 961 |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 // Otherwise, if the sliding state window computation has not been | 1296 // Otherwise, if the sliding state window computation has not been |
| 1282 // started we do it now. | 1297 // started we do it now. |
| 1283 if (sliding_state_window_ == NULL) { | 1298 if (sliding_state_window_ == NULL) { |
| 1284 sliding_state_window_ = new SlidingStateWindow(); | 1299 sliding_state_window_ = new SlidingStateWindow(); |
| 1285 } | 1300 } |
| 1286 #endif | 1301 #endif |
| 1287 } | 1302 } |
| 1288 | 1303 |
| 1289 | 1304 |
| 1290 } } // namespace v8::internal | 1305 } } // namespace v8::internal |
| OLD | NEW |