Commit bd7443f2 authored by Sam Hocevar's avatar Sam Hocevar

  * Added support in ./configure for the cprof profiler.
  * Activated -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 on all platforms, fixes
    issues under Solaris and QNX.
  * Additional checks for SSE-specific (non-MMXEXT) instructions, as
    reported in <20010817114220.A23480@slartibartfast.angrypacket.com>.
parent ef84fdfe
......@@ -4,6 +4,11 @@
HEAD
* Added support in ./configure for the cprof profiler.
* Activated -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 on all platforms, fixes
issues under Solaris and QNX.
* Additional checks for SSE-specific (non-MMXEXT) instructions, as
reported in lucky.openbsd.misc.
* GNU/Hurd configuration and compilation fixes.
* Fixed a crash in subtitle rendering.
* Activated old crappy subtitle rendering in overlay mode (ugly but
......
......@@ -37,7 +37,8 @@ ARCH = @ARCH@
DEBUG = @DEBUG@
STATS = @STATS@
TRACE = @TRACE@
PROFILING = @PROFILING@
CPROF = @CPROF@
GPROF = @GPROF@
OPTIMS = @OPTIMS@
#
......@@ -122,9 +123,13 @@ ifeq ($(TRACE),1)
PROGRAM_OPTIONS += TRACE
DEFINE += -DTRACE
endif
ifeq ($(PROFILING),1)
PROGRAM_OPTIONS += PROFILING
DEFINE += -DPROFILING
ifeq ($(CPROF),1)
PROGRAM_OPTIONS += CPROF
DEFINE += -DCPROF
endif
ifeq ($(GPROF),1)
PROGRAM_OPTIONS += GPROF
DEFINE += -DGPROF
endif
ifeq ($(STATS),1)
PROGRAM_OPTIONS += STATS
......@@ -150,10 +155,8 @@ LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
DEFINE += $(DEFINE_CONSTANTS)
# On Linux activate 64-bit off_t (by default under BSD)
ifneq (,$(findstring linux,$(SYS)))
# On Linux and Solaris, activate 64-bit off_t (by default under BSD)
DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
endif
###############################################################################
# Tuning and other variables - do not change anything except if you know
......@@ -215,10 +218,12 @@ ifeq ($(OPTIMS),1)
CFLAGS += -O3
CFLAGS += -ffast-math -funroll-loops
ifneq ($(DEBUG),1)
ifneq ($(PROFILING),1)
ifneq ($(GPROF),1)
ifneq ($(CPROF),1)
CFLAGS += -fomit-frame-pointer
endif
endif
endif
# Optimizations for x86 familiy
ifneq (,$(findstring 86,$(ARCH)))
......@@ -285,7 +290,12 @@ ifeq ($(DEBUG),1)
CFLAGS += -g
endif
ifeq ($(PROFILING),1)
ifeq ($(CPROF),1)
CFLAGS += -finstrument-functions
endif
ifeq ($(GPROF),1)
CFLAGS += -pg
endif
This diff is collapsed.
......@@ -202,18 +202,30 @@ dnl
dnl Accelerated modules
dnl
MMX_MODULES="yuvmmx idctmmx motionmmx"
MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn imdctsse downmix3dn downmixsse"
MMXEXT_MODULES="idctmmxext motionmmxext"
THREEDNOW_MODULES="imdct3dn downmix3dn"
SSE_MODULES="imdctsse downmixsse"
AC_MSG_CHECKING([if \$CC groks MMX inline assembly])
AC_TRY_COMPILE([void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}],,
ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
AC_MSG_CHECKING([if \$CC groks MMX EXT or SSE inline assembly])
AC_MSG_CHECKING([if \$CC groks MMX EXT inline assembly])
AC_TRY_COMPILE([void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}],,
ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
AC_MSG_CHECKING([if \$CC groks 3D Now! inline assembly])
AC_TRY_COMPILE([void quux(){void *p;asm("pfadd %%mm1,%%mm2"::"r"(p));}],,
ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
AC_MSG_CHECKING([if \$CC groks SSE inline assembly])
AC_TRY_COMPILE([void quux(){void *p;asm("xorps %%xmm1,%%xmm2"::"r"(p));}],,
ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
dnl
dnl libdvdcss: check for DVD ioctls
dnl
......@@ -371,10 +383,20 @@ AC_ARG_ENABLE(trace,
dnl
dnl Trace mode
dnl
PROFILING=0
AC_ARG_ENABLE(profiling,
[ --enable-profiling Enable gprof profiling (default disabled)],
[ if test x$enableval = xyes; then PROFILING=1; fi ])
GPROF=0
AC_ARG_ENABLE(gprof,
[ --enable-gprof Enable gprof profiling (default disabled)],
[ if test x$enableval = xyes; then GPROF=1; fi ])
CPROF=0
AC_ARG_ENABLE(cprof,
[ --enable-cprof Enable cprof profiling (default disabled)],
[ if test x$enableval = xyes;
then
LIB="${LIB} -lcprof"
CPROF=1
fi
])
dnl
dnl Enable/disable optimizations
......@@ -864,7 +886,8 @@ AC_SUBST(DEBUG)
AC_SUBST(STATS)
AC_SUBST(ASM)
AC_SUBST(TRACE)
AC_SUBST(PROFILING)
AC_SUBST(CPROF)
AC_SUBST(GPROF)
AC_SUBST(OPTIMS)
AC_SUBST(NEED_GETOPT)
AC_SUBST(MOC)
......@@ -929,7 +952,7 @@ vlc version : ${VLC_VERSION}
debug mode : ${DEBUG}
statistics : ${STATS}
trace mode : ${TRACE}
profiling : ${PROFILING}
cprof/gprof support : ${CPROF}/${GPROF}
need builtin getopt : ${NEED_GETOPT}
built-in modules :${BUILTINS}
plugin modules :${PLUGINS}
......
......@@ -3,7 +3,7 @@
* This header provides a portable threads implementation.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: threads.h,v 1.23 2001/08/14 04:52:39 sam Exp $
* $Id: threads.h,v 1.24 2001/08/19 23:35:13 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -25,7 +25,7 @@
#include <stdio.h>
#ifdef PROFILING
#ifdef GPROF
# include <sys/time.h>
#endif
......@@ -176,7 +176,7 @@ static __inline__ int vlc_cond_timedwait( vlc_cond_t *, vlc_mutex_t *,
mtime_t );
#endif
#ifdef PROFILING
#ifdef GPROF
/* Wrapper function for profiling */
static void * vlc_thread_wrapper ( void *p_wrapper );
......@@ -210,7 +210,7 @@ int setitimer(int kind, const struct itimerval* itnew,
#endif /* WIN32 */
#endif /* PROFILING */
#endif /* GPROF */
/*****************************************************************************
* vlc_threads_init: initialize threads system
......@@ -707,7 +707,7 @@ static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
{
int i_ret;
#ifdef PROFILING
#ifdef GPROF
wrapper_t wrapper;
/* Initialize the wrapper structure */
......@@ -759,7 +759,7 @@ static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
#endif
#ifdef PROFILING
#ifdef GPROF
if( i_ret == 0 )
{
vlc_cond_wait( &wrapper.wait, &wrapper.lock );
......@@ -826,7 +826,7 @@ static __inline__ void vlc_thread_join( vlc_thread_t thread )
#endif
}
#ifdef PROFILING
#ifdef GPROF
static void *vlc_thread_wrapper( void *p_wrapper )
{
/* Put user data in thread-local variables */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment