Bug 401806 - "support building with dtrace enabled on Mac OS X" [p=Ryan r=luser aM9=schrep]

This commit is contained in:
reed@reedloden.com 2007-11-01 23:36:49 -07:00
parent 6b60dad3b4
commit d106f66c85
3 changed files with 10 additions and 2 deletions

View File

@ -1049,6 +1049,7 @@ SUB_SHLOBJS = $(SUB_LOBJS)
endif
ifdef HAVE_DTRACE
ifndef XP_MACOSX
ifdef DTRACE_PROBE_OBJ
ifndef DTRACE_LIB_DEPENDENT
$(DTRACE_PROBE_OBJ): $(OBJS)
@ -1056,6 +1057,7 @@ $(DTRACE_PROBE_OBJ): $(OBJS)
endif
endif
endif
endif
# On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files,
# so instead of deleting .o files after repacking them into a dylib, we make
@ -1090,7 +1092,9 @@ endif # NO_LD_ARCHIVE_FLAGS
ifdef DTRACE_LIB_DEPENDENT
@rm -f $(PROBE_LOBJS)
@for lib in $(MOZILLA_PROBE_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done
ifndef XP_MACOSX
dtrace -G -C -32 -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(PROBE_LOBJS)
endif
@for lib in $(MOZILLA_PROBE_LIBS); do \
ofiles=`$(AR_LIST) $${lib}`; \
$(AR_DELETE) $${lib} $$ofiles; \

View File

@ -215,7 +215,9 @@ HOST_SIMPLE_PROGRAMS += host_jskwgen$(HOST_BIN_SUFFIX)
GARBAGE += jsautokw.h host_jskwgen$(HOST_BIN_SUFFIX)
ifdef HAVE_DTRACE
ifneq ($(OS_ARCH),Darwin)
DTRACE_PROBE_OBJ = $(LIBRARY_NAME)-dtrace.$(OBJ_SUFFIX)
endif
MOZILLA_DTRACE_SRC = $(srcdir)/javascript-trace.d
endif

View File

@ -55,8 +55,10 @@ provider javascript {
probe function__return(char *, char *, char *);
probe object__create__start(char *, char *);
probe object__create__done(char *, char *);
probe object__create(char *, char *, uintptr_t, int);
probe object__finalize(char *, char *, uintptr_t);
/* XXX must use unsigned longs here instead of uintptr_t for OS X
(Apple radar: 5194316 & 5565198) */
probe object__create(char *, char *, unsigned long, int);
probe object__finalize(char *, char *, unsigned long);
probe execute__start(char *, int);
probe execute__done(char *, int);
};