Browse Source

Start working on profiling.

tags/v0.99.beta17
Sam Hocevar sam 15 years ago
parent
commit
c90830fb29
5 changed files with 45 additions and 0 deletions
  1. +1
    -0
      caca/Makefile.am
  2. +1
    -0
      caca/caca_internals.h
  3. +33
    -0
      caca/caca_prof.h
  4. +4
    -0
      caca/libcaca.vcproj
  5. +6
    -0
      configure.ac

+ 1
- 0
caca/Makefile.am View File

@@ -20,6 +20,7 @@ libcaca_la_SOURCES = \
caca_types.h \
caca_internals.h \
caca_debug.h \
caca_prof.h \
caca_stubs.h \
caca_conio.c \
caca_conio.h \


+ 1
- 0
caca/caca_internals.h View File

@@ -17,6 +17,7 @@

#include "caca_stubs.h"
#include "caca_debug.h"
#include "caca_prof.h"

typedef struct caca_timer caca_timer_t;
typedef struct caca_privevent caca_privevent_t;


+ 33
- 0
caca/caca_prof.h View File

@@ -0,0 +1,33 @@
/*
* libcaca Colour ASCII-Art library
* Copyright (c) 2009 Sam Hocevar <sam@hocevar.net>
* All Rights Reserved
*
* $Id$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Do What The Fuck You Want To
* Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*/

/*
* This file contains profiling functions.
*/

#ifndef __CACA_PROF_H__
#define __CACA_PROF_H__

#if defined PROF && !defined __KERNEL__
# define PROFILING_VARS
# define START_PROF(obj, fn)
# define STOP_PROF(obj, fn)

#else
# define PROFILING_VARS
# define START_PROF(obj, fn) do { } while(0)
# define STOP_PROF(obj, fn) do { } while(0)
#endif

#endif /* __CACA_PROF_H__ */


+ 4
- 0
caca/libcaca.vcproj View File

@@ -412,6 +412,10 @@
RelativePath="caca_internals.h"
>
</File>
<File
RelativePath="caca_prof.h"
>
</File>
<File
RelativePath="caca_stubs.h"
>


+ 6
- 0
configure.ac View File

@@ -92,6 +92,8 @@ AC_ARG_ENABLE(imlib2,
dnl conditional builds
AC_ARG_ENABLE(debug,
[ --enable-debug build debug versions of the library (default no)])
AC_ARG_ENABLE(prof,
[ --enable-prof activate built-in profiling (default no)])
AC_ARG_ENABLE(plugins,
[ --enable-plugins make X11 and GL drivers plugins (default disabled)])
AC_ARG_ENABLE(doc,
@@ -321,6 +323,10 @@ if test "${enable_debug}" = "yes"; then
AC_DEFINE(DEBUG, 1, Define to 1 to activate debug)
fi

if test "${enable_prof}" = "yes"; then
AC_DEFINE(PROF, 1, Define to 1 to activate profiling)
fi

if test "${enable_plugins}" = "yes"; then
ac_cv_my_have_plugins="yes"
AC_DEFINE(USE_PLUGINS, 1, Define to 1 to activate plugins)


Loading…
Cancel
Save