|
From: maxime l. <m.l...@gm...> - 2010-03-09 09:41:56
|
Hi, I would like to monitor the heap utilisation of a multimedia player (the ffmpeg player, ffplay). I've done : valgrind --tool=massif --depth=5 --time-unit=ms --massif-out-file=myfile ffplay HP6_480.mov However when I execute this I got a lot of overhead and the stream isn't nicely played. The problem is that decoders have real-time constraints and thus monitoring an overwhelmed application may lead to false information. Is it possible to lower this overhead, I'm just interested in logging the heap usage : I do not need any memory check. cheers Maxime -- Maxime Louvel +33 6 85 91 05 30 3 rue charreton 38000 Grenoble France |
|
From: tom f. <tf...@al...> - 2010-03-09 21:03:47
|
maxime louvel <m.l...@gm...> writes:
> The problem is that decoders have real-time constraints and thus
> monitoring an overwhelmed application may lead to false information.
I don't think anything akin to valgrind is the right tool for the job.
Just try running your program through the "null" tool ("lackey"? or
maybe it really is "null"? check the docs). That gives the minimum
overhead *any* tool could produce.
That minimum overhead is going to be large. Valgrind has to go through
a lot of effort to work its magic.
> Is it possible to lower this overhead, I'm just interested in logging
> the heap usage : I do not need any memory check.
I don't think massif is doing verification anyway.
-tom
|
|
From: Tim P. <ec...@ec...> - 2010-03-10 03:29:38
|
On Tue, 2010-03-09 at 10:41 +0100, maxime louvel wrote: > Hi, > > I would like to monitor the heap utilisation of a multimedia player > (the ffmpeg player, ffplay). > I've done : > valgrind --tool=massif --depth=5 --time-unit=ms > --massif-out-file=myfile ffplay HP6_480.mov > > However when I execute this I got a lot of overhead and the stream > isn't nicely played. The problem is that decoders have real-time > constraints and thus monitoring an overwhelmed application may lead to > false information. > > Is it possible to lower this overhead, I'm just interested in logging > the heap usage : I do not need any memory check. I would probably try a replacement malloc() that offers logging via LD_PRELOAD before using something like valgrind for this. Even the garbage collecting variety would give you a good report of heap usage. Its the only way I can think of to accomplish it without seriously slowing down the decoding. Even the replacement malloc() might result in a noticeable slow down. HTH Cheers, --Tim |
|
From: maxime l. <m.l...@gm...> - 2010-03-10 08:30:34
|
thanks for the answers guys, I have already given some try to the LD_PRELOAD, I'm going to continue in this way cheers On Wed, Mar 10, 2010 at 4:28 AM, Tim Post <ec...@ec...> wrote: > On Tue, 2010-03-09 at 10:41 +0100, maxime louvel wrote: > > Hi, > > > > I would like to monitor the heap utilisation of a multimedia player > > (the ffmpeg player, ffplay). > > I've done : > > valgrind --tool=massif --depth=5 --time-unit=ms > > --massif-out-file=myfile ffplay HP6_480.mov > > > > However when I execute this I got a lot of overhead and the stream > > isn't nicely played. The problem is that decoders have real-time > > constraints and thus monitoring an overwhelmed application may lead to > > false information. > > > > Is it possible to lower this overhead, I'm just interested in logging > > the heap usage : I do not need any memory check. > > I would probably try a replacement malloc() that offers logging via > LD_PRELOAD before using something like valgrind for this. > > Even the garbage collecting variety would give you a good report of heap > usage. > > Its the only way I can think of to accomplish it without seriously > slowing down the decoding. Even the replacement malloc() might result in > a noticeable slow down. > > HTH > > Cheers, > --Tim > > > -- Maxime Louvel +33 6 85 91 05 30 3 rue charreton 38000 Grenoble France |