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

Side by Side Diff: src/log.cc

Issue 21534: Minor fix to fix building without ENABLE_LOGGING_AND_PROFILING defined. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 #ifdef ENABLE_LOGGING_AND_PROFILING 672 #ifdef ENABLE_LOGGING_AND_PROFILING
673 if (logfile_ == NULL || !FLAG_log) return; 673 if (logfile_ == NULL || !FLAG_log) return;
674 LogMessageBuilder msg; 674 LogMessageBuilder msg;
675 msg.Append("delete,%s,0x%x\n", name, 675 msg.Append("delete,%s,0x%x\n", name,
676 reinterpret_cast<unsigned int>(object)); 676 reinterpret_cast<unsigned int>(object));
677 msg.WriteToLogFile(); 677 msg.WriteToLogFile();
678 #endif 678 #endif
679 } 679 }
680 680
681 681
682 #ifdef ENABLE_LOGGING_AND_PROFILING
682 int Logger::CodeObjectSize(Code* code) { 683 int Logger::CodeObjectSize(Code* code) {
683 // Check that the assumptions about the layout of the code object holds. 684 // Check that the assumptions about the layout of the code object holds.
684 ASSERT_EQ(reinterpret_cast<unsigned int>(code->instruction_start()) - 685 ASSERT_EQ(reinterpret_cast<unsigned int>(code->instruction_start()) -
685 reinterpret_cast<unsigned int>(code->address()), 686 reinterpret_cast<unsigned int>(code->address()),
686 Code::kHeaderSize); 687 Code::kHeaderSize);
687 return code->instruction_size() + Code::kHeaderSize; 688 return code->instruction_size() + Code::kHeaderSize;
688 } 689 }
690 #endif
689 691
690 692
691 void Logger::CodeCreateEvent(const char* tag, Code* code, const char* comment) { 693 void Logger::CodeCreateEvent(const char* tag, Code* code, const char* comment) {
692 #ifdef ENABLE_LOGGING_AND_PROFILING 694 #ifdef ENABLE_LOGGING_AND_PROFILING
693 if (logfile_ == NULL || !FLAG_log_code) return; 695 if (logfile_ == NULL || !FLAG_log_code) return;
694 LogMessageBuilder msg; 696 LogMessageBuilder msg;
695 msg.Append("code-creation,%s,0x%x,%d,\"", tag, 697 msg.Append("code-creation,%s,0x%x,%d,\"", tag,
696 reinterpret_cast<unsigned int>(code->address()), 698 reinterpret_cast<unsigned int>(code->address()),
697 CodeObjectSize(code)); 699 CodeObjectSize(code));
698 for (const char* p = comment; *p != '\0'; p++) { 700 for (const char* p = comment; *p != '\0'; p++) {
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 if (FLAG_log_state_changes) { 1130 if (FLAG_log_state_changes) {
1129 LOG(UncheckedStringEvent("Leaving", StateToString(state_))); 1131 LOG(UncheckedStringEvent("Leaving", StateToString(state_)));
1130 if (previous_) { 1132 if (previous_) {
1131 LOG(UncheckedStringEvent("To", StateToString(previous_->state_))); 1133 LOG(UncheckedStringEvent("To", StateToString(previous_->state_)));
1132 } 1134 }
1133 } 1135 }
1134 } 1136 }
1135 #endif 1137 #endif
1136 1138
1137 } } // namespace v8::internal 1139 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698