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

Side by Side Diff: src/log.cc

Issue 202018: Heap profiler: account primitive string objects as being constructed using 'String'. (Closed)
Patch Set: Fixed comments 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/heap.cc ('k') | src/objects.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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698