Index: src/log.cc |
diff --git a/src/log.cc b/src/log.cc |
index f6dfd2161d89b425c89b97f741acf8a3160b3a05..05d8f7a88710c65a2df18bef3bd21c1ff42b7d74 100644 |
--- a/src/log.cc |
+++ b/src/log.cc |
@@ -867,7 +867,12 @@ void Profiler::Engage() { |
if (engaged_) return; |
engaged_ = true; |
- OS::LogSharedLibraryAddresses(isolate_); |
+ std::vector<OS::SharedLibraryAddress> addresses = |
+ OS::GetSharedLibraryAddresses(); |
+ for (size_t i = 0; i < addresses.size(); ++i) { |
+ LOG(isolate_, SharedLibraryEvent( |
+ addresses[i].library_path, addresses[i].start, addresses[i].end)); |
+ } |
// Start thread processing the profiler buffer. |
running_ = true; |
@@ -1048,26 +1053,13 @@ void Logger::ApiNamedSecurityCheck(Object* key) { |
} |
-void Logger::SharedLibraryEvent(const char* library_path, |
+void Logger::SharedLibraryEvent(const std::string& library_path, |
uintptr_t start, |
uintptr_t end) { |
if (!log_->IsEnabled() || !FLAG_prof) return; |
Log::MessageBuilder msg(log_); |
msg.Append("shared-library,\"%s\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR "\n", |
- library_path, |
- start, |
- end); |
- msg.WriteToLogFile(); |
-} |
- |
- |
-void Logger::SharedLibraryEvent(const wchar_t* library_path, |
- uintptr_t start, |
- uintptr_t end) { |
- if (!log_->IsEnabled() || !FLAG_prof) return; |
- Log::MessageBuilder msg(log_); |
- msg.Append("shared-library,\"%ls\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR "\n", |
- library_path, |
+ library_path.c_str(), |
start, |
end); |
msg.WriteToLogFile(); |