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

Side by Side Diff: src/log.cc

Issue 200132: Add initial version of retainers heap profile. (Closed)
Patch Set: Comments addressed Created 11 years, 3 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 | « src/log.h ('k') | src/string-stream.h » ('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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
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[0] != '\0' ? constructor : "(anonymous)", 893 constructor[0] != '\0' ? constructor : "(anonymous)",
894 number, bytes); 894 number, bytes);
895 msg.WriteToLogFile(); 895 msg.WriteToLogFile();
896 #endif 896 #endif
897 } 897 }
898 898
899 899
900 void Logger::HeapSampleJSRetainersEvent(const char* event) {
901 #ifdef ENABLE_LOGGING_AND_PROFILING
902 if (!Log::IsEnabled() || !FLAG_log_gc) return;
903 LogMessageBuilder msg;
904 msg.Append("heap-js-ret-item,%s\n", event);
905 msg.WriteToLogFile();
906 #endif
907 }
908
909
900 void Logger::DebugTag(const char* call_site_tag) { 910 void Logger::DebugTag(const char* call_site_tag) {
901 #ifdef ENABLE_LOGGING_AND_PROFILING 911 #ifdef ENABLE_LOGGING_AND_PROFILING
902 if (!Log::IsEnabled() || !FLAG_log) return; 912 if (!Log::IsEnabled() || !FLAG_log) return;
903 LogMessageBuilder msg; 913 LogMessageBuilder msg;
904 msg.Append("debug-tag,%s\n", call_site_tag); 914 msg.Append("debug-tag,%s\n", call_site_tag);
905 msg.WriteToLogFile(); 915 msg.WriteToLogFile();
906 #endif 916 #endif
907 } 917 }
908 918
909 919
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 // Otherwise, if the sliding state window computation has not been 1258 // Otherwise, if the sliding state window computation has not been
1249 // started we do it now. 1259 // started we do it now.
1250 if (sliding_state_window_ == NULL) { 1260 if (sliding_state_window_ == NULL) {
1251 sliding_state_window_ = new SlidingStateWindow(); 1261 sliding_state_window_ = new SlidingStateWindow();
1252 } 1262 }
1253 #endif 1263 #endif
1254 } 1264 }
1255 1265
1256 1266
1257 } } // namespace v8::internal 1267 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | src/string-stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698