[vlc-devel] Re: vlc and gprof

Sungkwan Heo sgheo at naver.com
Fri May 16 14:35:22 CEST 2003

> On Tue, May 13, 2003, Sungkwan Heo wrote:
> > When vlc was finished normally, I expected a gprof result file,
> > gmon.out but there wasn't. Is there anything I missed? 
> There was a bug in the Makefile. The current CVS version is fixed.
> May I suggest using oprofile instead of gprof? It has far better
> granularity than gprof, and does not require to recompile the app.


Makefile.am in the current CVS version was changed,
BUT gmon.out file is not created yet.

And there is still a bug in __vlc_thread_create() of src/misc/threads.c

int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
                         char *psz_name, void * ( *func ) ( void * ),
                         int i_priority, vlc_bool_t b_wait )
    int i_ret;
    void *p_data;

    vlc_mutex_lock( &p_this->object_lock );

#ifdef GPROF
    wrapper_t wrapper;

    /* Initialize the wrapper structure */
    wrapper.func = func;
    wrapper.p_data = (void *)p_this;

If GRPOF is definded, a variable, wrapper is declared after a function call statement. So this makes errors in compile time. The variable declaration have to be moved before the call.

I moved it and the compilation was finished successfully but the gmon.out file wasn't generated yet. I tried both of vlc-0.6.0-cvs and vlc-0.5.3 with chaged Makefile.am.

Best Regards,

Sungkwan Heo

This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>

More information about the vlc-devel mailing list