mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
Revert "tracers: Only build getrusage() tracer if RUSAGE_THREAD is available"
This reverts commit 8ddbf76626
.
This commit is contained in:
parent
03045d428b
commit
d626c5b996
4 changed files with 5 additions and 20 deletions
19
configure.ac
19
configure.ac
|
@ -605,25 +605,8 @@ AC_CHECK_FUNCS([gmtime_r])
|
|||
AC_CHECK_FUNCS([localtime_r])
|
||||
AC_CHECK_FUNCS([sigaction])
|
||||
AC_CHECK_FUNCS([getrusage])
|
||||
AM_CONDITIONAL(HAVE_GETRUSAGE, test "x$ac_cv_func_getrusage" = "xyes")
|
||||
AC_CHECK_HEADERS([sys/resource.h])
|
||||
AC_CACHE_CHECK(for RUSAGE_THREAD, gst_cv_rusage_thread,
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <unistd.h>
|
||||
#ifndef __USE_GNU
|
||||
# define __USE_GNU /* RUSAGE_THREAD */
|
||||
#endif
|
||||
#include <sys/resource.h>
|
||||
]], [[
|
||||
struct rusage ru;
|
||||
getrusage (RUSAGE_THREAD, &ru);
|
||||
]])],[
|
||||
gst_cv_rusage_thread=yes
|
||||
AC_DEFINE(HAVE_RUSAGE_THREAD, 1, [RUSAGE_THREAD is available])
|
||||
],[
|
||||
gst_cv_rusage_thread=no
|
||||
])
|
||||
)
|
||||
AM_CONDITIONAL(HAVE_RUSAGE_THREAD, test "x$gst_cv_rusage_thread" = "xyes")
|
||||
|
||||
dnl check for fseeko()
|
||||
AC_FUNC_FSEEKO
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
plugin_LTLIBRARIES = libgstcoretracers.la
|
||||
|
||||
if HAVE_RUSAGE_THREAD
|
||||
if HAVE_GETRUSAGE
|
||||
RUSAGE_SOURCES = gstrusage.c
|
||||
else
|
||||
RUSAGE_SOURCES =
|
||||
|
|
|
@ -32,10 +32,12 @@
|
|||
#include <unistd.h>
|
||||
#include "gstrusage.h"
|
||||
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
#ifndef __USE_GNU
|
||||
# define __USE_GNU /* RUSAGE_THREAD */
|
||||
#endif
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_rusage_debug);
|
||||
#define GST_CAT_DEFAULT gst_rusage_debug
|
||||
|
|
|
@ -38,7 +38,7 @@ plugin_init (GstPlugin * plugin)
|
|||
if (!gst_tracer_register (plugin, "log", gst_log_tracer_get_type ()))
|
||||
return FALSE;
|
||||
#endif
|
||||
#ifdef HAVE_RUSAGE_THREAD
|
||||
#ifdef HAVE_GETRUSAGE
|
||||
if (!gst_tracer_register (plugin, "rusage", gst_rusage_tracer_get_type ()))
|
||||
return FALSE;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue