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

Side by Side Diff: src/log.cc

Issue 551062: Fix issue 571: display descriptive names for code objects from snapshot. (Closed)
Patch Set: Created 10 years, 11 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/mksnapshot.cc » ('j') | src/serialize.cc » ('J')
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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 if (FLAG_compress_log) { 864 if (FLAG_compress_log) {
865 ASSERT(compression_helper_ != NULL); 865 ASSERT(compression_helper_ != NULL);
866 if (!compression_helper_->HandleMessage(&msg)) return; 866 if (!compression_helper_->HandleMessage(&msg)) return;
867 } 867 }
868 msg.Append('\n'); 868 msg.Append('\n');
869 msg.WriteToLogFile(); 869 msg.WriteToLogFile();
870 #endif 870 #endif
871 } 871 }
872 872
873 873
874 void Logger::SnapshotPositionEvent(Address addr, int pos) {
875 #ifdef ENABLE_LOGGING_AND_PROFILING
876 if (!Log::IsEnabled() || !FLAG_log_snapshot_positions) return;
877 LogMessageBuilder msg;
878 msg.Append("%s,", log_events_[SNAPSHOT_POSITION_EVENT]);
879 msg.AppendAddress(addr);
880 msg.Append(",%d", pos);
881 if (FLAG_compress_log) {
882 ASSERT(compression_helper_ != NULL);
883 if (!compression_helper_->HandleMessage(&msg)) return;
884 }
885 msg.Append('\n');
886 msg.WriteToLogFile();
887 #endif
888 }
889
890
874 void Logger::ResourceEvent(const char* name, const char* tag) { 891 void Logger::ResourceEvent(const char* name, const char* tag) {
875 #ifdef ENABLE_LOGGING_AND_PROFILING 892 #ifdef ENABLE_LOGGING_AND_PROFILING
876 if (!Log::IsEnabled() || !FLAG_log) return; 893 if (!Log::IsEnabled() || !FLAG_log) return;
877 LogMessageBuilder msg; 894 LogMessageBuilder msg;
878 msg.Append("%s,%s,", name, tag); 895 msg.Append("%s,%s,", name, tag);
879 896
880 uint32_t sec, usec; 897 uint32_t sec, usec;
881 if (OS::GetUserTime(&sec, &usec) != -1) { 898 if (OS::GetUserTime(&sec, &usec) != -1) {
882 msg.Append("%d,%d,", sec, usec); 899 msg.Append("%d,%d,", sec, usec);
883 } 900 }
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 // Otherwise, if the sliding state window computation has not been 1465 // Otherwise, if the sliding state window computation has not been
1449 // started we do it now. 1466 // started we do it now.
1450 if (sliding_state_window_ == NULL) { 1467 if (sliding_state_window_ == NULL) {
1451 sliding_state_window_ = new SlidingStateWindow(); 1468 sliding_state_window_ = new SlidingStateWindow();
1452 } 1469 }
1453 #endif 1470 #endif
1454 } 1471 }
1455 1472
1456 1473
1457 } } // namespace v8::internal 1474 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | src/mksnapshot.cc » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698