Profiling memory usage

David Zeuthen david at fubar.dk
Wed Nov 29 10:35:42 PST 2006


On Wed, 2006-11-29 at 01:54 +0000, Richard Hughes wrote:
> I've been playing with massif and HAL to try and get the memory usage
> reduced for projects like the 770 which are limited in memory.
> 
> You can see some initial results are here:
> http://people.freedesktop.org/~hughsient/temp/massif.pdf - notice the
> massive 3Mb memory allocation of queue_events().

Yeah, that was a stopgap fix to avoid heavy memory fragmentation. The
right fix is probably seeing if we can use udevtrigger to generate the
events since that, essentially, is what we're doing with coldplug. But
as we discussed on IRC last night that includes lots of interesting
corner cases.

> I've been using massif, with local HAL patches to make it work - I've
> found you can't drop privs, else massif won't write it's output files.
> 
> I've attached the patch I've been using. The default of dropping privs
> is the same as before. Comments? Okay to commit?

Sure, let's add this. It's a nice test to see if something fails because
one is doing things in hald (that perhaps one should do in a helper
instead) that requires privileges.

For the record, I think it's nicer to have --retain-privileges without
any parameters and abbreviations. Good to commit with that change.
Thanks.

     David




More information about the hal mailing list