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

Side by Side Diff: src/log.cc

Issue 1934453003: [prof] export slide offset in profile log (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rename Created 4 years, 7 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') | test/mjsunit/tools/tickprocessor.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/log.h" 5 #include "src/log.h"
6 6
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 } 658 }
659 659
660 660
661 void Profiler::Engage() { 661 void Profiler::Engage() {
662 if (engaged_) return; 662 if (engaged_) return;
663 engaged_ = true; 663 engaged_ = true;
664 664
665 std::vector<base::OS::SharedLibraryAddress> addresses = 665 std::vector<base::OS::SharedLibraryAddress> addresses =
666 base::OS::GetSharedLibraryAddresses(); 666 base::OS::GetSharedLibraryAddresses();
667 for (size_t i = 0; i < addresses.size(); ++i) { 667 for (size_t i = 0; i < addresses.size(); ++i) {
668 LOG(isolate_, SharedLibraryEvent( 668 LOG(isolate_,
669 addresses[i].library_path, addresses[i].start, addresses[i].end)); 669 SharedLibraryEvent(addresses[i].library_path, addresses[i].start,
670 addresses[i].end, addresses[i].aslr_slide));
670 } 671 }
671 672
672 // Start thread processing the profiler buffer. 673 // Start thread processing the profiler buffer.
673 base::NoBarrier_Store(&running_, 1); 674 base::NoBarrier_Store(&running_, 1);
674 Start(); 675 Start();
675 676
676 // Register to get ticks. 677 // Register to get ticks.
677 Logger* logger = isolate_->logger(); 678 Logger* logger = isolate_->logger();
678 logger->ticker_->SetProfiler(this); 679 logger->ticker_->SetProfiler(this);
679 680
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 va_end(ap); 819 va_end(ap);
819 msg.WriteToLogFile(); 820 msg.WriteToLogFile();
820 } 821 }
821 822
822 823
823 void Logger::ApiSecurityCheck() { 824 void Logger::ApiSecurityCheck() {
824 if (!log_->IsEnabled() || !FLAG_log_api) return; 825 if (!log_->IsEnabled() || !FLAG_log_api) return;
825 ApiEvent("api,check-security"); 826 ApiEvent("api,check-security");
826 } 827 }
827 828
828
829 void Logger::SharedLibraryEvent(const std::string& library_path, 829 void Logger::SharedLibraryEvent(const std::string& library_path,
830 uintptr_t start, 830 uintptr_t start, uintptr_t end,
831 uintptr_t end) { 831 intptr_t aslr_slide) {
832 if (!log_->IsEnabled() || !FLAG_prof_cpp) return; 832 if (!log_->IsEnabled() || !FLAG_prof_cpp) return;
833 Log::MessageBuilder msg(log_); 833 Log::MessageBuilder msg(log_);
834 msg.Append("shared-library,\"%s\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR, 834 msg.Append("shared-library,\"%s\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR
835 library_path.c_str(), start, end); 835 ",%" V8PRIdPTR,
836 library_path.c_str(), start, end, aslr_slide);
836 msg.WriteToLogFile(); 837 msg.WriteToLogFile();
837 } 838 }
838 839
839 840
840 void Logger::CodeDeoptEvent(Code* code, Address pc, int fp_to_sp_delta) { 841 void Logger::CodeDeoptEvent(Code* code, Address pc, int fp_to_sp_delta) {
841 PROFILER_LOG(CodeDeoptEvent(code, pc, fp_to_sp_delta)); 842 PROFILER_LOG(CodeDeoptEvent(code, pc, fp_to_sp_delta));
842 if (!log_->IsEnabled() || !FLAG_log_internal_timer_events) return; 843 if (!log_->IsEnabled() || !FLAG_log_internal_timer_events) return;
843 Log::MessageBuilder msg(log_); 844 Log::MessageBuilder msg(log_);
844 int since_epoch = static_cast<int>(timer_.Elapsed().InMicroseconds()); 845 int since_epoch = static_cast<int>(timer_.Elapsed().InMicroseconds());
845 msg.Append("code-deopt,%d,%d", since_epoch, code->CodeSize()); 846 msg.Append("code-deopt,%d,%d", since_epoch, code->CodeSize());
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 removeCodeEventListener(jit_logger_); 1851 removeCodeEventListener(jit_logger_);
1851 delete jit_logger_; 1852 delete jit_logger_;
1852 jit_logger_ = NULL; 1853 jit_logger_ = NULL;
1853 } 1854 }
1854 1855
1855 return log_->Close(); 1856 return log_->Close();
1856 } 1857 }
1857 1858
1858 } // namespace internal 1859 } // namespace internal
1859 } // namespace v8 1860 } // namespace v8
OLDNEW
« no previous file with comments | « src/log.h ('k') | test/mjsunit/tools/tickprocessor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698