Ignore:
Timestamp:
Jul 2, 2008, 9:55:22 PM (17 years ago)
Author:
[email protected]
Message:

Add the ability to trace JavaScriptCore garabge collections using dtrace.

Reviewed by Sam Weinig.

  • JavaScriptCore.xcodeproj/project.pbxproj: Generate the dtrace probe header

file when building on a new enough version of Mac OS X.

  • JavaScriptCorePrefix.h: Add our standard Mac OS X version detection macros.
  • kjs/Tracing.d: Declare three dtrace probes.
  • kjs/Tracing.h: Include the generated dtrace macros if dtrace is available,

otherwise provide versions that do nothing.

  • kjs/collector.cpp:

(KJS::Heap::collect): Fire dtrace probes when starting a collection, after the
mark phase has completed, and when the collection is complete.

  • wtf/Platform.h: Define HAVE_DTRACE when building on a new enough version of Mac OS X.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCorePrefix.h

    r27730 r34969  
    2626#endif
    2727
     28#if defined(__APPLE__)
     29#import <AvailabilityMacros.h>
     30#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
     31#define BUILDING_ON_TIGER 1
     32#elif MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
     33#define BUILDING_ON_LEOPARD 1
     34#endif
     35#endif
     36
    2837#ifdef __cplusplus
    2938#define new ("if you use new/delete make sure to include config.h at the top of the file"())
Note: See TracChangeset for help on using the changeset viewer.