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

Side by Side Diff: src/log.cc

Issue 17599007: Log deopts with --log-timer-events. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/log.h ('k') | tools/profviz/composer.js » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 if (!log_->IsEnabled() || !FLAG_prof) return; 630 if (!log_->IsEnabled() || !FLAG_prof) return;
631 LogMessageBuilder msg(this); 631 LogMessageBuilder msg(this);
632 msg.Append("shared-library,\"%ls\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR "\n", 632 msg.Append("shared-library,\"%ls\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR "\n",
633 library_path, 633 library_path,
634 start, 634 start,
635 end); 635 end);
636 msg.WriteToLogFile(); 636 msg.WriteToLogFile();
637 } 637 }
638 638
639 639
640 void Logger::CodeDeoptEvent(Code* code) {
641 if (!log_->IsEnabled()) return;
642 ASSERT(FLAG_log_internal_timer_events);
643 LogMessageBuilder msg(this);
644 int since_epoch = static_cast<int>(OS::Ticks() - epoch_);
645 msg.Append("code-deopt,%ld,%d\n", since_epoch, code->CodeSize());
646 msg.WriteToLogFile();
647 }
648
649
640 void Logger::TimerEvent(StartEnd se, const char* name) { 650 void Logger::TimerEvent(StartEnd se, const char* name) {
641 if (!log_->IsEnabled()) return; 651 if (!log_->IsEnabled()) return;
642 ASSERT(FLAG_log_internal_timer_events); 652 ASSERT(FLAG_log_internal_timer_events);
643 LogMessageBuilder msg(this); 653 LogMessageBuilder msg(this);
644 int since_epoch = static_cast<int>(OS::Ticks() - epoch_); 654 int since_epoch = static_cast<int>(OS::Ticks() - epoch_);
645 const char* format = (se == START) ? "timer-event-start,\"%s\",%ld\n" 655 const char* format = (se == START) ? "timer-event-start,\"%s\",%ld\n"
646 : "timer-event-end,\"%s\",%ld\n"; 656 : "timer-event-end,\"%s\",%ld\n";
647 msg.Append(format, name, since_epoch); 657 msg.Append(format, name, since_epoch);
648 msg.WriteToLogFile(); 658 msg.WriteToLogFile();
649 } 659 }
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 profiler_ = NULL; 1811 profiler_ = NULL;
1802 } 1812 }
1803 1813
1804 delete ticker_; 1814 delete ticker_;
1805 ticker_ = NULL; 1815 ticker_ = NULL;
1806 1816
1807 return log_->Close(); 1817 return log_->Close();
1808 } 1818 }
1809 1819
1810 } } // namespace v8::internal 1820 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | tools/profviz/composer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698