Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: src/log.cc

Issue 149611: Add heap log processing script originally written by Kevin. (Closed)
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/process-heap-prof.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 msg.Append('\n'); 836 msg.Append('\n');
837 msg.WriteToLogFile(); 837 msg.WriteToLogFile();
838 #endif 838 #endif
839 } 839 }
840 840
841 841
842 void Logger::HeapSampleBeginEvent(const char* space, const char* kind) { 842 void Logger::HeapSampleBeginEvent(const char* space, const char* kind) {
843 #ifdef ENABLE_LOGGING_AND_PROFILING 843 #ifdef ENABLE_LOGGING_AND_PROFILING
844 if (!Log::IsEnabled() || !FLAG_log_gc) return; 844 if (!Log::IsEnabled() || !FLAG_log_gc) return;
845 LogMessageBuilder msg; 845 LogMessageBuilder msg;
846 msg.Append("heap-sample-begin,\"%s\",\"%s\"\n", space, kind); 846 msg.Append("heap-sample-begin,\"%s\",\"%s\"", space, kind);
847 uint32_t sec, usec;
848 if (OS::GetUserTime(&sec, &usec) != -1) {
849 msg.Append(",%d,%d", sec, usec);
850 }
851 msg.Append('\n');
847 msg.WriteToLogFile(); 852 msg.WriteToLogFile();
848 #endif 853 #endif
849 } 854 }
850 855
851 856
852 void Logger::HeapSampleEndEvent(const char* space, const char* kind) { 857 void Logger::HeapSampleEndEvent(const char* space, const char* kind) {
853 #ifdef ENABLE_LOGGING_AND_PROFILING 858 #ifdef ENABLE_LOGGING_AND_PROFILING
854 if (!Log::IsEnabled() || !FLAG_log_gc) return; 859 if (!Log::IsEnabled() || !FLAG_log_gc) return;
855 LogMessageBuilder msg; 860 LogMessageBuilder msg;
856 msg.Append("heap-sample-end,\"%s\",\"%s\"\n", space, kind); 861 msg.Append("heap-sample-end,\"%s\",\"%s\"\n", space, kind);
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 // Otherwise, if the sliding state window computation has not been 1200 // Otherwise, if the sliding state window computation has not been
1196 // started we do it now. 1201 // started we do it now.
1197 if (sliding_state_window_ == NULL) { 1202 if (sliding_state_window_ == NULL) {
1198 sliding_state_window_ = new SlidingStateWindow(); 1203 sliding_state_window_ = new SlidingStateWindow();
1199 } 1204 }
1200 #endif 1205 #endif
1201 } 1206 }
1202 1207
1203 1208
1204 } } // namespace v8::internal 1209 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | tools/process-heap-prof.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698