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

Side by Side Diff: src/log.cc

Issue 125183: Fix profiling for shared libraries on Linux loaded at negative addresses... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/log.h ('k') | src/platform-linux.cc » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } else if (key->IsUndefined()) { 419 } else if (key->IsUndefined()) {
420 ApiEvent("api,check-security,undefined\n"); 420 ApiEvent("api,check-security,undefined\n");
421 } else { 421 } else {
422 ApiEvent("api,check-security,['no-name']\n"); 422 ApiEvent("api,check-security,['no-name']\n");
423 } 423 }
424 #endif 424 #endif
425 } 425 }
426 426
427 427
428 void Logger::SharedLibraryEvent(const char* library_path, 428 void Logger::SharedLibraryEvent(const char* library_path,
429 unsigned start, 429 uintptr_t start,
430 unsigned end) { 430 uintptr_t end) {
431 #ifdef ENABLE_LOGGING_AND_PROFILING 431 #ifdef ENABLE_LOGGING_AND_PROFILING
432 if (!Log::IsEnabled() || !FLAG_prof) return; 432 if (!Log::IsEnabled() || !FLAG_prof) return;
433 LogMessageBuilder msg; 433 LogMessageBuilder msg;
434 msg.Append("shared-library,\"%s\",0x%08x,0x%08x\n", library_path, 434 msg.Append("shared-library,\"%s\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR "\n",
435 start, end); 435 library_path,
436 start,
437 end);
436 msg.WriteToLogFile(); 438 msg.WriteToLogFile();
437 #endif 439 #endif
438 } 440 }
439 441
440 442
441 void Logger::SharedLibraryEvent(const wchar_t* library_path, 443 void Logger::SharedLibraryEvent(const wchar_t* library_path,
442 unsigned start, 444 uintptr_t start,
443 unsigned end) { 445 uintptr_t end) {
444 #ifdef ENABLE_LOGGING_AND_PROFILING 446 #ifdef ENABLE_LOGGING_AND_PROFILING
445 if (!Log::IsEnabled() || !FLAG_prof) return; 447 if (!Log::IsEnabled() || !FLAG_prof) return;
446 LogMessageBuilder msg; 448 LogMessageBuilder msg;
447 msg.Append("shared-library,\"%ls\",0x%08x,0x%08x\n", library_path, 449 msg.Append("shared-library,\"%ls\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR "\n",
448 start, end); 450 library_path,
451 start,
452 end);
449 msg.WriteToLogFile(); 453 msg.WriteToLogFile();
450 #endif 454 #endif
451 } 455 }
452 456
453 457
454 #ifdef ENABLE_LOGGING_AND_PROFILING 458 #ifdef ENABLE_LOGGING_AND_PROFILING
455 void Logger::LogRegExpSource(Handle<JSRegExp> regexp) { 459 void Logger::LogRegExpSource(Handle<JSRegExp> regexp) {
456 // Prints "/" + re.source + "/" + 460 // Prints "/" + re.source + "/" +
457 // (re.global?"g":"") + (re.ignorecase?"i":"") + (re.multiline?"m":"") 461 // (re.global?"g":"") + (re.ignorecase?"i":"") + (re.multiline?"m":"")
458 LogMessageBuilder msg; 462 LogMessageBuilder msg;
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 } else if (previous_->state_ == EXTERNAL) { 1247 } else if (previous_->state_ == EXTERNAL) {
1244 // We are leaving V8. 1248 // We are leaving V8.
1245 Heap::Protect(); 1249 Heap::Protect();
1246 } 1250 }
1247 } 1251 }
1248 #endif 1252 #endif
1249 } 1253 }
1250 #endif 1254 #endif
1251 1255
1252 } } // namespace v8::internal 1256 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | src/platform-linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698