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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 // Using non-relative system time in order to be able to synchronize with | 998 // Using non-relative system time in order to be able to synchronize with |
999 // external memory profiling events (e.g. DOM memory size). | 999 // external memory profiling events (e.g. DOM memory size). |
1000 msg.Append("heap-sample-begin,\"%s\",\"%s\",%.0f\n", | 1000 msg.Append("heap-sample-begin,\"%s\",\"%s\",%.0f\n", |
1001 space, kind, OS::TimeCurrentMillis()); | 1001 space, kind, OS::TimeCurrentMillis()); |
1002 msg.WriteToLogFile(); | 1002 msg.WriteToLogFile(); |
1003 #endif | 1003 #endif |
1004 } | 1004 } |
1005 | 1005 |
1006 | 1006 |
1007 void Logger::HeapSampleStats(const char* space, const char* kind, | 1007 void Logger::HeapSampleStats(const char* space, const char* kind, |
1008 int capacity, int used) { | 1008 intptr_t capacity, intptr_t used) { |
1009 #ifdef ENABLE_LOGGING_AND_PROFILING | 1009 #ifdef ENABLE_LOGGING_AND_PROFILING |
1010 if (!Log::IsEnabled() || !FLAG_log_gc) return; | 1010 if (!Log::IsEnabled() || !FLAG_log_gc) return; |
1011 LogMessageBuilder msg; | 1011 LogMessageBuilder msg; |
1012 msg.Append("heap-sample-stats,\"%s\",\"%s\",%d,%d\n", | 1012 msg.Append("heap-sample-stats,\"%s\",\"%s\"," |
| 1013 "%" V8_PTR_PREFIX "d,%" V8_PTR_PREFIX "d\n", |
1013 space, kind, capacity, used); | 1014 space, kind, capacity, used); |
1014 msg.WriteToLogFile(); | 1015 msg.WriteToLogFile(); |
1015 #endif | 1016 #endif |
1016 } | 1017 } |
1017 | 1018 |
1018 | 1019 |
1019 void Logger::HeapSampleEndEvent(const char* space, const char* kind) { | 1020 void Logger::HeapSampleEndEvent(const char* space, const char* kind) { |
1020 #ifdef ENABLE_LOGGING_AND_PROFILING | 1021 #ifdef ENABLE_LOGGING_AND_PROFILING |
1021 if (!Log::IsEnabled() || !FLAG_log_gc) return; | 1022 if (!Log::IsEnabled() || !FLAG_log_gc) return; |
1022 LogMessageBuilder msg; | 1023 LogMessageBuilder msg; |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1569 } | 1570 } |
1570 // Otherwise, if the sliding state window computation has not been | 1571 // Otherwise, if the sliding state window computation has not been |
1571 // started we do it now. | 1572 // started we do it now. |
1572 if (sliding_state_window_ == NULL) { | 1573 if (sliding_state_window_ == NULL) { |
1573 sliding_state_window_ = new SlidingStateWindow(); | 1574 sliding_state_window_ = new SlidingStateWindow(); |
1574 } | 1575 } |
1575 #endif | 1576 #endif |
1576 } | 1577 } |
1577 | 1578 |
1578 } } // namespace v8::internal | 1579 } } // namespace v8::internal |
OLD | NEW |