Changeset: 007c4ff77252 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=007c4ff77252
Modified Files:
clients/Tests/exports.stable.out
configure.ag
gdk/gdk_system.c
gdk/gdk_system.h
Branch: default
Log Message:
Remove configure options --enable-profile and --enable-instrument.
diffs (256 lines):
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -396,7 +396,6 @@ void geomversion_set(void);
bat getBBPsize(void);
char *get_bin_path(void);
int gettimeofday(struct timeval *tv, int *ignore_zone);
-int gprof_pthread_create(pthread_t *__restrict, __const pthread_attr_t
*__restrict, void *( *fcn)(void *), void *__restrict);
ssize_t hgeFromStr(const char *src, size_t *len, hge **dst);
ssize_t hgeToStr(str *dst, size_t *len, const hge *src);
const hge hge_nil;
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -357,21 +357,6 @@ AC_ARG_ENABLE([static-analysis],
[AS_HELP_STRING([--enable-static-analysis], [configure for static code
analysis (use only if you know what you are doing)])],
AC_DEFINE([STATIC_CODE_ANALYSIS], 1, [compiling for static code
analysis]))
-need_profile=no
-dft_profile=$need_profile
-AC_ARG_ENABLE([profile],
- [AS_HELP_STRING([--enable-profile], [enable profiling (default=no)])],
- [enable_profile=$enableval],
- [enable_profile=$dft_profile])
-
-need_instrument=no
-dft_instrument=$need_instrument
-AC_ARG_ENABLE([instrument],
- [AS_HELP_STRING([--enable-instrument],
- [enable instrument (default=no)])],
- [enable_instrument=$enableval],
- [enable_instrument=$dft_instrument])
-
# RIPEMD160 is patent free, academic and European, but unfortunately
# can't use it by default, as that would exclude JDBC usage (Java
# doesn't natively support RIPEMD160).
@@ -813,67 +798,35 @@ AC_SUBST([anttranslatepath])
# check whether no (explictly chosen) mutual exclusive combinations
# were made, compatability matrix:
-# deb ass opt pro ins
-# debug \ C X C C
-# assert C \ C C C
-# optimize X C \ X X
-# profile C C X \ C
-# instrument C C X C \
+# deb ass opt
+# debug \ C X
+# assert C \ C
+# optimize X C \
# find conflicts
-AS_CASE([x$enable_debug.$enable_optimize.$enable_profile.$enable_instrument],
- [xyes.yes.*.*],
+AS_CASE([x$enable_debug.$enable_optimize],
+ [xyes.yes],
[AC_MSG_ERROR([combining --enable-optimize and --enable-debug
is not possible])],
- [x*.yes.yes.*],
- [AC_MSG_ERROR([combining --enable-optimize and --enable-profile
is not possible])],
- [x*.yes.*.yes],
- [AC_MSG_ERROR([combining --enable-optimize and
--enable-instrument is not possible])],
# handle defaults after user requests
- [xyes.*.*.*], [
+ [xyes.*], [
enable_debug=yes
AS_VAR_IF([enable_optimize], [no], [],
[disable_optimize="(as debug is enabled)"])
enable_optimize=no
- enable_profile=`echo $enable_profile | sed 's:^def_::'`
- enable_instrument=`echo $enable_instrument | sed 's:^def_::'`
],
- [x*.*.yes.*], [
- enable_debug=`echo $enable_debug | sed 's:^def_::'`
- AS_VAR_IF([enable_optimize], [no], [],
- [disable_optimize="(as profile is enabled)"])
- enable_optimize=no
- enable_profile=yes
- enable_instrument=`echo $enable_instrument | sed 's:^def_::'`
- ],
- [x*.*.*.yes], [
- enable_debug=`echo $enable_debug | sed 's:^def_::'`
- AS_VAR_IF([enable_optimize], [no], [],
- [disable_optimize="(as instrument is enabled)"])
- enable_optimize=no
- enable_profile=`echo $enable_profile | sed 's:^def_::'`
- enable_instrument=yes
- ],
- [x*.*no.*.*], [
+ [x*.*no], [
enable_debug=`echo $enable_debug | sed 's:^def_::'`
enable_optimize=no
- enable_profile=`echo $enable_profile | sed 's:^def_::'`
- enable_instrument=`echo $enable_instrument | sed 's:^def_::'`
],
- [x*.*yes.*.*], [
+ [x*.*yes], [
# enable-optimize overrules other defaults
enable_optimize=yes
AS_VAR_IF([enable_debug], [no], [],
[disable_debug="(as optimize is enabled)"])
enable_debug=no
- AS_VAR_IF([enable_profile], [no], [],
- [disable_profile="(as optimize is enabled)"])
- enable_profile=no
- AS_VAR_IF([enable_instrument], [no], [],
- [disable_instrument="(as optimize is enabled)"])
- enable_instrument=no
],
[x*],
- [AC_MSG_WARN([unhandled configuration
$enable_debug.$enable_optimize.$enable_profile.$enable_instrument, please file
a bug on bugs.monetdb.org])])
+ [AC_MSG_WARN([unhandled configuration
$enable_debug.$enable_optimize, please file a bug on bugs.monetdb.org])])
# make defaults real for flags which don't conflict with anything
enable_assert=`echo $enable_assert | sed 's:^def_::'`
@@ -1067,27 +1020,6 @@ AS_VAR_IF([enable_optimize], [yes], [
MCHECK_ADD_FLAG([-D_FORTIFY_SOURCE=2])],
[AC_MSG_RESULT([no])])
-AC_MSG_CHECKING([for --enable-profile])
-AS_VAR_IF([enable_profile], [yes], [
- AC_DEFINE([PROFILE], 1, [Compiler flag])
- need_profile=yes
- AS_VAR_IF([GCC], [yes], [
- CFLAGS="$CFLAGS -pg"
- AC_MSG_RESULT([yes: -pg])],
- [AC_MSG_RESULT([no])])],
- [AC_MSG_RESULT([no])])
-AM_CONDITIONAL([PROFILING], [test "x$need_profile" = xyes])
-
-AC_MSG_CHECKING([for --enable-instrument])
-AS_VAR_IF([enable_instrument], [yes], [
- AC_DEFINE([PROFILE], 1, [Compiler flag])
- need_instrument=yes
- AS_VAR_IF([GCC], [yes], [
- CFLAGS="$CFLAGS -finstrument-functions -g"
- AC_MSG_RESULT([yes: -finstrument-functions -g])], [
- AC_MSG_RESULT([no])])],
- [AC_MSG_RESULT([no])])
-
AC_PATH_PROG([BASH], [bash], [/usr/bin/bash], [$PATH])
AC_CHECK_PROG([RM], [rm], [rm -f])
AC_CHECK_PROG([MV], [mv], [mv -f])
@@ -3171,8 +3103,6 @@ for comp in \
'optimize ' \
'developer ' \
'sanitizer ' \
- 'instrument' \
- 'profile ' \
; do
eval "dft=\$dft_$comp"
eval "enable=\$enable_$comp"
diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c
--- a/gdk/gdk_system.c
+++ b/gdk/gdk_system.c
@@ -695,80 +695,6 @@ pthread_sema_down(pthread_sema_t *s)
#endif
#endif
-#if !defined(WIN32) && defined(PROFILE) && defined(HAVE_PTHREAD_H)
-#undef pthread_create
-/* for profiling purposes (btw configure with --enable-profile *and*
- * --disable-shared --enable-static) without setting the ITIMER_PROF
- * per thread, all profiling info for everything except the main
- * thread is lost. */
-#include <stdlib.h>
-
-/* Our data structure passed to the wrapper */
-typedef struct wrapper_s {
- void *(*start_routine) (void *);
- void *arg;
-
- pthread_mutex_t lock;
- pthread_cond_t wait;
-
- struct itimerval itimer;
-
-} wrapper_t;
-
-/* The wrapper function in charge for setting the itimer value */
-static void *
-wrapper_routine(void *data)
-{
- /* Put user data in thread-local variables */
- void *(*start_routine) (void *) = ((wrapper_t *) data)->start_routine;
- void *arg = ((wrapper_t *) data)->arg;
-
- /* Set the profile timer value */
- setitimer(ITIMER_PROF, &((wrapper_t *) data)->itimer, NULL);
-
- /* Tell the calling thread that we don't need its data anymore */
- pthread_mutex_lock(&((wrapper_t *) data)->lock);
-
- pthread_cond_signal(&((wrapper_t *) data)->wait);
- pthread_mutex_unlock(&((wrapper_t *) data)->lock);
-
- /* Call the real function */
- return start_routine(arg);
-}
-
-/* Our wrapper function for the real pthread_create() */
-int
-gprof_pthread_create(pthread_t * __restrict thread, __const pthread_attr_t *
__restrict attr, void *(*start_routine) (void *), void *__restrict arg)
-{
- wrapper_t wrapper_data;
- int i_return;
-
- /* Initialize the wrapper structure */
- wrapper_data.start_routine = start_routine;
- wrapper_data.arg = arg;
- getitimer(ITIMER_PROF, &wrapper_data.itimer);
- pthread_cond_init(&wrapper_data.wait, NULL);
- pthread_mutex_init(&wrapper_data.lock, NULL);
- pthread_mutex_lock(&wrapper_data.lock);
-
- /* The real pthread_create call */
- i_return = pthread_create(thread, attr, &wrapper_routine,
&wrapper_data);
-
- /* If the thread was successfully spawned, wait for the data
- * to be released */
- if (i_return == 0) {
- pthread_cond_wait(&wrapper_data.wait, &wrapper_data.lock);
- }
-
- pthread_mutex_unlock(&wrapper_data.lock);
- pthread_mutex_destroy(&wrapper_data.lock);
-
- pthread_cond_destroy(&wrapper_data.wait);
-
- return i_return;
-}
-#endif
-
/* coverity[+kill] */
void
MT_global_exit(int s)
diff --git a/gdk/gdk_system.h b/gdk/gdk_system.h
--- a/gdk/gdk_system.h
+++ b/gdk/gdk_system.h
@@ -31,17 +31,6 @@
#endif
#include <sched.h>
#include <pthread.h>
-#ifndef WIN32
-/* Linux gprof messes up on multithreaded programs */
-#ifdef PROFILE
-/* Linux gprof messes up on multithreaded programs */
-gdk_export int gprof_pthread_create(pthread_t * __restrict,
- __const pthread_attr_t * __restrict,
- void *(*fcn) (void *),
- void *__restrict);
-#define pthread_create gprof_pthread_create
-#endif
-#endif
#endif
#ifdef HAVE_SEMAPHORE_H
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list