зеркало из https://github.com/mozilla/pjs.git
Bug 56795. Adding support for corel/eazel profiler. Build changes approved
and reviewed by cls. r=cls a=cls.
This commit is contained in:
Родитель
571ab47477
Коммит
faf59c6da9
|
@ -49,17 +49,19 @@ MOZ_WIDGET_TOOLKIT_LDFLAGS = @MOZ_WIDGET_TOOLKIT_LDFLAGS@
|
||||||
MOZ_SECURITY = @MOZ_SECURITY@
|
MOZ_SECURITY = @MOZ_SECURITY@
|
||||||
MOZ_DEBUG = @MOZ_DEBUG@
|
MOZ_DEBUG = @MOZ_DEBUG@
|
||||||
MOZ_DEBUG_MODULES = @MOZ_DEBUG_MODULES@
|
MOZ_DEBUG_MODULES = @MOZ_DEBUG_MODULES@
|
||||||
|
MOZ_PROFILE_MODULES = @MOZ_PROFILE_MODULES@
|
||||||
MOZ_DEBUG_ENABLE_DEFS = @MOZ_DEBUG_ENABLE_DEFS@
|
MOZ_DEBUG_ENABLE_DEFS = @MOZ_DEBUG_ENABLE_DEFS@
|
||||||
MOZ_DEBUG_DISABLE_DEFS = @MOZ_DEBUG_DISABLE_DEFS@
|
MOZ_DEBUG_DISABLE_DEFS = @MOZ_DEBUG_DISABLE_DEFS@
|
||||||
MOZ_DEBUG_FLAGS = @MOZ_DEBUG_FLAGS@
|
MOZ_DEBUG_FLAGS = @MOZ_DEBUG_FLAGS@
|
||||||
MOZ_DBGRINFO_MODULES = @MOZ_DBGRINFO_MODULES@
|
MOZ_DBGRINFO_MODULES = @MOZ_DBGRINFO_MODULES@
|
||||||
MOZ_EXTENSIONS = @MOZ_EXTENSIONS@
|
MOZ_EXTENSIONS = @MOZ_EXTENSIONS@
|
||||||
MOZILLA_GPROF = @MOZILLA_GPROF@
|
|
||||||
MOZ_PERF_METRICS = @MOZ_PERF_METRICS@
|
MOZ_PERF_METRICS = @MOZ_PERF_METRICS@
|
||||||
MOZ_LEAKY = @MOZ_LEAKY@
|
MOZ_LEAKY = @MOZ_LEAKY@
|
||||||
MOZ_JPROF = @MOZ_JPROF@
|
MOZ_JPROF = @MOZ_JPROF@
|
||||||
|
ENABLE_EAZEL_PROFILER=@ENABLE_EAZEL_PROFILER@
|
||||||
|
EAZEL_PROFILER_CFLAGS=@EAZEL_PROFILER_CFLAGS@
|
||||||
|
EAZEL_PROFILER_LIBS=@EAZEL_PROFILER_LIBS@
|
||||||
DETECT_WEBSHELL_LEAKS = @DETECT_WEBSHELL_LEAKS@
|
DETECT_WEBSHELL_LEAKS = @DETECT_WEBSHELL_LEAKS@
|
||||||
BUILD_PROFILE = @MOZILLA_GPROF@
|
|
||||||
GC_LEAK_DETECTOR = @GC_LEAK_DETECTOR@
|
GC_LEAK_DETECTOR = @GC_LEAK_DETECTOR@
|
||||||
NS_TRACE_MALLOC = @NS_TRACE_MALLOC@
|
NS_TRACE_MALLOC = @NS_TRACE_MALLOC@
|
||||||
USE_ELF_DYNSTR_GC = @USE_ELF_DYNSTR_GC@
|
USE_ELF_DYNSTR_GC = @USE_ELF_DYNSTR_GC@
|
||||||
|
|
|
@ -329,8 +329,8 @@ endif
|
||||||
CFLAGS = $(OS_CFLAGS)
|
CFLAGS = $(OS_CFLAGS)
|
||||||
CXXFLAGS = $(OS_CXXFLAGS)
|
CXXFLAGS = $(OS_CXXFLAGS)
|
||||||
|
|
||||||
COMPILE_CFLAGS = $(DEFINES) $(INCLUDES) $(XCFLAGS) $(PROF_FLAGS) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(OS_COMPILE_CFLAGS)
|
COMPILE_CFLAGS = $(DEFINES) $(INCLUDES) $(XCFLAGS) $(PROFILER_CFLAGS) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(OS_COMPILE_CFLAGS)
|
||||||
COMPILE_CXXFLAGS = $(DEFINES) $(INCLUDES) $(XCFLAGS) $(PROF_FLAGS) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CXXFLAGS) $(OS_COMPILE_CXXFLAGS)
|
COMPILE_CXXFLAGS = $(DEFINES) $(INCLUDES) $(XCFLAGS) $(PROFILER_CFLAGS) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CXXFLAGS) $(OS_COMPILE_CXXFLAGS)
|
||||||
|
|
||||||
LDFLAGS = $(OS_LDFLAGS)
|
LDFLAGS = $(OS_LDFLAGS)
|
||||||
|
|
||||||
|
@ -444,10 +444,14 @@ DEFINES += -DFORTEZZA
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# For profiling
|
# For profiling
|
||||||
ifdef MOZILLA_GPROF
|
ifdef ENABLE_EAZEL_PROFILER
|
||||||
# Don't want profiling on build tools..
|
ifndef INTERNAL_TOOLS
|
||||||
ifneq ($(shell echo $(srcdir) | sed 's:\.\./::g'),config)
|
ifneq ($(LIBRARY_NAME), xpt)
|
||||||
PROF_FLAGS = $(OS_GPROF_FLAGS) -DMOZILLA_GPROF
|
ifneq (, $(findstring $(shell $(topsrcdir)/build/unix/print-depth-path.sh | awk -F/ '{ print $$2; }'), $(MOZ_PROFILE_MODULES)))
|
||||||
|
PROFILER_CFLAGS = $(EAZEL_PROFILER_CFLAGS) -DENABLE_EAZEL_PROFILER
|
||||||
|
PROFILER_LIBS = $(EAZEL_PROFILER_LIBS)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -551,3 +555,5 @@ else
|
||||||
JAVA_DEFINES += -DAWT_102
|
JAVA_DEFINES += -DAWT_102
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#caca:
|
||||||
|
# @echo $(PROFILER_CFLAGS)
|
||||||
|
|
|
@ -575,7 +575,7 @@ ifdef OS2_PROGRAM_RESOURCE
|
||||||
endif # os2_prog_rsrc
|
endif # os2_prog_rsrc
|
||||||
else
|
else
|
||||||
ifeq ($(CPP_PROG_LINK),1)
|
ifeq ($(CPP_PROG_LINK),1)
|
||||||
$(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
|
$(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS)
|
||||||
$(MOZ_POST_PROGRAM_COMMAND) $@
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
||||||
ifeq ($(OS_ARCH),BeOS)
|
ifeq ($(OS_ARCH),BeOS)
|
||||||
ifdef BEOS_PROGRAM_RESOURCE
|
ifdef BEOS_PROGRAM_RESOURCE
|
||||||
|
@ -608,16 +608,16 @@ $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_EXTRA_DEPS) Makefile Makefile.in
|
||||||
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.o $(EXTRA_DEPS) Makefile Makefile.in
|
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.o $(EXTRA_DEPS) Makefile Makefile.in
|
||||||
ifeq ($(CPP_PROG_LINK),1)
|
ifeq ($(CPP_PROG_LINK),1)
|
||||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||||
$(LD) /Out:$@ $< $(LDFLAGS) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(OS_LFLAGS)
|
$(LD) /Out:$@ $< $(LDFLAGS) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(OS_LFLAGS) $(PROFILER_LIBS)
|
||||||
else
|
else
|
||||||
$(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB)
|
$(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS)
|
||||||
endif
|
endif
|
||||||
$(MOZ_POST_PROGRAM_COMMAND) $@
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
||||||
else
|
else
|
||||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||||
$(LD) /Out:$@ $< $(LDFLAGS) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(OS_LFLAGS)
|
$(LD) /Out:$@ $< $(LDFLAGS) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(OS_LFLAGS)
|
||||||
else
|
else
|
||||||
$(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB)
|
$(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS)
|
||||||
endif
|
endif
|
||||||
$(MOZ_POST_PROGRAM_COMMAND) $@
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
||||||
endif
|
endif
|
||||||
|
|
28
configure.in
28
configure.in
|
@ -3272,9 +3272,20 @@ dnl =
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
MOZ_ARG_HEADER(Profiling and Instrumenting)
|
MOZ_ARG_HEADER(Profiling and Instrumenting)
|
||||||
|
|
||||||
MOZ_ARG_ENABLE_BOOL(gprof,
|
MOZ_ARG_ENABLE_BOOL(eazel-profiler,
|
||||||
[ --enable-gprof Enable gprof symbols],
|
[ --enable-eazel-profiler Enable Corel/Eazel profiler],
|
||||||
[ _GPROF_CFLAGS="-pg" ])
|
[ ENABLE_EAZEL_PROFILER=1
|
||||||
|
AC_DEFINE(ENABLE_EAZEL_PROFILER)
|
||||||
|
USE_ELF_DYNSTR_GC=
|
||||||
|
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
|
||||||
|
EAZEL_PROFILER_CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
|
||||||
|
EAZEL_PROFILER_LIBS="-lprofiler -lpthread"])
|
||||||
|
|
||||||
|
MOZ_ARG_WITH_STRING(profile-modules,
|
||||||
|
[ --with-profile-modules Enable/disable profile for specific modules only],
|
||||||
|
[ MOZ_PROFILE_MODULES=`echo $withval | sed 's/,/ /g'` ] )
|
||||||
|
dnl ========================================================
|
||||||
|
dnl ========================================================
|
||||||
|
|
||||||
dnl Enable performance metrics.
|
dnl Enable performance metrics.
|
||||||
MOZ_ARG_ENABLE_BOOL(perf-metrics,
|
MOZ_ARG_ENABLE_BOOL(perf-metrics,
|
||||||
|
@ -3296,10 +3307,6 @@ MOZ_ARG_WITH_STRING(insure-exclude-dirs,
|
||||||
Dirs to not instrument ],
|
Dirs to not instrument ],
|
||||||
MOZ_INSURE_EXCLUDE_DIRS="config $withval" )
|
MOZ_INSURE_EXCLUDE_DIRS="config $withval" )
|
||||||
|
|
||||||
MOZ_ARG_ENABLE_BOOL(profile,
|
|
||||||
[ --enable-profile Enable profiling (solaris only)],
|
|
||||||
MOZILLA_GPROF=1)
|
|
||||||
|
|
||||||
MOZ_ARG_ENABLE_BOOL(boehm,
|
MOZ_ARG_ENABLE_BOOL(boehm,
|
||||||
[ --enable-boehm Enable the Boehm Garbage Collector],
|
[ --enable-boehm Enable the Boehm Garbage Collector],
|
||||||
AC_DEFINE(GC_LEAK_DETECTOR)
|
AC_DEFINE(GC_LEAK_DETECTOR)
|
||||||
|
@ -3593,12 +3600,15 @@ dnl AC_SUBST(MOZ_NETCAST)
|
||||||
AC_SUBST(BUILD_MODULES)
|
AC_SUBST(BUILD_MODULES)
|
||||||
AC_SUBST(MOZ_DEBUG)
|
AC_SUBST(MOZ_DEBUG)
|
||||||
AC_SUBST(MOZ_DEBUG_MODULES)
|
AC_SUBST(MOZ_DEBUG_MODULES)
|
||||||
|
AC_SUBST(MOZ_PROFILE_MODULES)
|
||||||
AC_SUBST(MOZ_DEBUG_ENABLE_DEFS)
|
AC_SUBST(MOZ_DEBUG_ENABLE_DEFS)
|
||||||
AC_SUBST(MOZ_DEBUG_DISABLE_DEFS)
|
AC_SUBST(MOZ_DEBUG_DISABLE_DEFS)
|
||||||
AC_SUBST(MOZ_DEBUG_FLAGS)
|
AC_SUBST(MOZ_DEBUG_FLAGS)
|
||||||
AC_SUBST(MOZ_DBGRINFO_MODULES)
|
AC_SUBST(MOZ_DBGRINFO_MODULES)
|
||||||
AC_SUBST(MOZ_EXTENSIONS)
|
AC_SUBST(MOZ_EXTENSIONS)
|
||||||
AC_SUBST(MOZILLA_GPROF)
|
AC_SUBST(ENABLE_EAZEL_PROFILER)
|
||||||
|
AC_SUBST(EAZEL_PROFILER_CFLAGS)
|
||||||
|
AC_SUBST(EAZEL_PROFILER_LIBS)
|
||||||
AC_SUBST(MOZ_PERF_METRICS)
|
AC_SUBST(MOZ_PERF_METRICS)
|
||||||
AC_SUBST(GC_LEAK_DETECTOR)
|
AC_SUBST(GC_LEAK_DETECTOR)
|
||||||
AC_SUBST(MOZ_LOG_REFCNT)
|
AC_SUBST(MOZ_LOG_REFCNT)
|
||||||
|
@ -3812,14 +3822,12 @@ AC_SUBST(FULLCIRCLE_LIBS)
|
||||||
dnl Echo the CFLAGS to remove extra whitespace.
|
dnl Echo the CFLAGS to remove extra whitespace.
|
||||||
CFLAGS=`echo \
|
CFLAGS=`echo \
|
||||||
$_WARNINGS_CFLAGS \
|
$_WARNINGS_CFLAGS \
|
||||||
$_GPROF_CFLAGS \
|
|
||||||
$CFLAGS`
|
$CFLAGS`
|
||||||
|
|
||||||
CXXFLAGS=`echo \
|
CXXFLAGS=`echo \
|
||||||
$_MOZ_RTTI_FLAGS \
|
$_MOZ_RTTI_FLAGS \
|
||||||
$_MOZ_EXCEPTIONS_FLAGS \
|
$_MOZ_EXCEPTIONS_FLAGS \
|
||||||
$_WARNINGS_CXXFLAGS \
|
$_WARNINGS_CXXFLAGS \
|
||||||
$_GPROF_CFLAGS \
|
|
||||||
$CXXFLAGS`
|
$CXXFLAGS`
|
||||||
|
|
||||||
COMPILE_CFLAGS=`echo \
|
COMPILE_CFLAGS=`echo \
|
||||||
|
|
|
@ -35,6 +35,7 @@ LIBS= \
|
||||||
$(DIST)/lib/libxpfelocation_s.$(LIB_SUFFIX) \
|
$(DIST)/lib/libxpfelocation_s.$(LIB_SUFFIX) \
|
||||||
$(MOZ_COMPONENT_LIBS) \
|
$(MOZ_COMPONENT_LIBS) \
|
||||||
-lgtksuperwin \
|
-lgtksuperwin \
|
||||||
|
$(PROFILE_LIBS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
LIBS += $(TK_LIBS)
|
LIBS += $(TK_LIBS)
|
||||||
|
|
|
@ -138,6 +138,7 @@ LIBS = \
|
||||||
$(GTK_GLUE) \
|
$(GTK_GLUE) \
|
||||||
$(XP_LIBS) \
|
$(XP_LIBS) \
|
||||||
$(TK_LIBS) \
|
$(TK_LIBS) \
|
||||||
|
$(PROFILER_LIBS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
MOTIF_LIBS = -lviewer_motif_s $(XP_LIBS) $(MOZ_MOTIF_LDFLAGS)
|
MOTIF_LIBS = -lviewer_motif_s $(XP_LIBS) $(MOZ_MOTIF_LDFLAGS)
|
||||||
|
@ -201,19 +202,20 @@ unix/xlib/libviewer_xlib_s.a:
|
||||||
@$(MAKE) -C $(@D) $(@F)
|
@$(MAKE) -C $(@D) $(@F)
|
||||||
|
|
||||||
$(PROGRAM)_gtk: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in unix/gtk/libviewer_gtk_s.a
|
$(PROGRAM)_gtk: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in unix/gtk/libviewer_gtk_s.a
|
||||||
$(CCC) $(CXXFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(GTK_LIBS) $(OS_LIBS)
|
$(CCC) $(CXXFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(GTK_LIBS) $(OS_LIBS) $(PROFILER_LIBS)
|
||||||
|
|
||||||
$(MOZ_POST_PROGRAM_COMMAND) $@
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
||||||
|
|
||||||
$(PROGRAM)_motif: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in unix/motif/libviewer_motif_s.a
|
$(PROGRAM)_motif: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in unix/motif/libviewer_motif_s.a
|
||||||
$(CCC) $(CXXFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(MOTIF_LIBS) $(OS_LIBS)
|
$(CCC) $(CXXFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(MOTIF_LIBS) $(OS_LIBS) $(PROFILER_LIBS)
|
||||||
$(MOZ_POST_PROGRAM_COMMAND) $@
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
||||||
|
|
||||||
$(PROGRAM)_qt: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in unix/qt/libviewer_qt_s.a
|
$(PROGRAM)_qt: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in unix/qt/libviewer_qt_s.a
|
||||||
$(CCC) $(CXXFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(QT_LIBS) $(OS_LIBS)
|
$(CCC) $(CXXFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(QT_LIBS) $(OS_LIBS) $(PROFILER_LIBS)
|
||||||
$(MOZ_POST_PROGRAM_COMMAND) $@
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
||||||
|
|
||||||
$(PROGRAM)_xlib: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in unix/xlib/libviewer_xlib_s.a
|
$(PROGRAM)_xlib: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in unix/xlib/libviewer_xlib_s.a
|
||||||
$(CCC) $(CXXFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(XLIB_LIBS) $(OS_LIBS)
|
$(CCC) $(CXXFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(XLIB_LIBS) $(OS_LIBS) $(PROFILER_LIBS)
|
||||||
$(MOZ_POST_PROGRAM_COMMAND) $@
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
||||||
|
|
||||||
ifdef MOZ_ENABLE_GTK
|
ifdef MOZ_ENABLE_GTK
|
||||||
|
|
Загрузка…
Ссылка в новой задаче