Revision: 2517
Author: [email protected]
Date: Tue Jul 21 10:25:07 2009
Log: - Remove unneeded include of ucontext.h as it is deprecated on Snow  
Leopard.
- Avoid calculating shared library addresses if profiling is not enabled.

Review URL: http://codereview.chromium.org/155814
http://code.google.com/p/v8/source/detail?r=2517

Modified:
  /branches/bleeding_edge/src/platform-macos.cc

=======================================
--- /branches/bleeding_edge/src/platform-macos.cc       Mon Jul 13 22:01:06 2009
+++ /branches/bleeding_edge/src/platform-macos.cc       Tue Jul 21 10:25:07 2009
@@ -28,7 +28,6 @@
  // Platform specific code for MacOS goes here. For the POSIX comaptible  
parts
  // the implementation is in platform-posix.cc.

-#include <ucontext.h>
  #include <unistd.h>
  #include <sys/mman.h>
  #include <mach/mach_init.h>
@@ -207,6 +206,7 @@


  void OS::LogSharedLibraryAddresses() {
+#ifdef ENABLE_LOGGING_AND_PROFILING
    unsigned int images_count = _dyld_image_count();
    for (unsigned int i = 0; i < images_count; ++i) {
      const mach_header* header = _dyld_get_image_header(i);
@@ -218,6 +218,7 @@
      const uintptr_t start = reinterpret_cast<uintptr_t>(code_ptr) + slide;
      LOG(SharedLibraryEvent(_dyld_get_image_name(i), start, start + size));
    }
+#endif  // ENABLE_LOGGING_AND_PROFILING
  }



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to