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

Unified Diff: src/log.cc

Issue 328993003: Drop dependency on Isolate* from platform.h (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/log.h ('k') | src/platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/log.h ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698