@ -63,22 +63,29 @@ void flush_eventfd(int fd);
# ifdef ENABLE_TRACING
# ifdef ENABLE_TRACING
void trace_init ( void ) ;
void trace_init ( void ) ;
char * trace_begin ( const char * format , . . . ) ;
char * trace_begin ( const char * scope ) ;
char * trace_begin_fmt ( const char * format , . . . ) ;
void trace_end ( char * * dummy ) ;
void trace_end ( char * * dummy ) ;
# define TRACE_INIT() trace_init()
# define TRACE_INIT() trace_init()
# define TRACE_FUNC() \
# define TRACE_FUNC() \
char * trace_dummy __attribute__ ( ( cleanup ( trace_end ) , unused ) ) = \
char * trace_dummy __attribute__ ( ( cleanup ( trace_end ) , unused ) ) = \
trace_begin ( " %s " , __func__ )
trace_begin ( __func__ )
# define TRACE_SCOPE(FORMAT, ... ) \
# define TRACE_SCOPE(SCOPE ) \
char * trace_dummy __attribute__ ( ( cleanup ( trace_end ) , unused ) ) = \
char * trace_dummy __attribute__ ( ( cleanup ( trace_end ) , unused ) ) = \
trace_begin ( FORMAT , __VA_ARGS__ )
trace_begin ( SCOPE )
# define TRACE_SCOPE_FMT(FORMAT, ...) \
char * trace_dummy __attribute__ ( ( cleanup ( trace_end ) , unused ) ) = \
trace_begin_fmt ( FORMAT , __VA_ARGS__ )
# else
# else
# define TRACE_INIT()
# define TRACE_INIT()
# define TRACE_FUNC()
# define TRACE_FUNC()
# define TRACE_SCOPE(FORMAT, ...)
# define TRACE_SCOPE(FORMAT, ...)
# define TRACE_SCOPE_FMT(FORMAT, ...)
# endif
# endif
# endif /* VIRGL_UTIL_H */
# endif /* VIRGL_UTIL_H */