source: webkit/trunk/JavaScriptCore/JavaScriptCorePrefix.h@ 38205

Last change on this file since 38205 was 34969, checked in by [email protected], 17 years ago

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.
  • Property svn:eol-style set to native
File size: 1000 bytes
Line 
1#ifdef __cplusplus
2#define NULL __null
3#else
4#define NULL ((void *)0)
5#endif
6
7#include <ctype.h>
8#include <float.h>
9#include <locale.h>
10#include <math.h>
11#include <stdio.h>
12#include <stdlib.h>
13#include <string.h>
14#include <strings.h>
15#include <time.h>
16#include <sys/param.h>
17#include <sys/time.h>
18#include <sys/timeb.h>
19#include <sys/types.h>
20
21#ifdef __cplusplus
22
23#include <list>
24#include <typeinfo>
25
26#endif
27
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
37#ifdef __cplusplus
38#define new ("if you use new/delete make sure to include config.h at the top of the file"())
39#define delete ("if you use new/delete make sure to include config.h at the top of the file"())
40#endif
41
42/* Work around bug with C++ library that screws up Objective-C++ when exception support is disabled. */
43#undef try
44#undef catch
Note: See TracBrowser for help on using the repository browser.