Hi! Please find attached exmap-0.10.ebuild and include it in portage Exmap is a memory analysis tool which allows you to accurately determine how much physical memory and swap is used by individual processes and shared libraries on a running system. In particular, it accounts for the sharing of memory and swap between different processes. It is a very good tool and it helps find where all your memory is going, head on to http://www.berthels.co.uk/exmap/ for details. Note is has been used for stuff like profiling desktop memory usage here: http://ktown.kde.org/~seli/memory/ I suggest dev-util/exmap similar to related tools such as oprofile. This ebuild depend on linux kernel >=2.6.8, gtkmm and boost Paul
Created attachment 104217 [details] exmap-0.10.ebuild
The ebuild works great! And I should add that the program is also referenced in http://live.gnome.org/MemoryReduction/Tools
Created attachment 122435 [details] exmap-0.10.ebuild I've prepared an improved ebuild, with a few patches, but it doesn't seem to work on amd64 for me.
Created attachment 122437 [details] exmap-0.10-gmake.patch
Created attachment 122439 [details, diff] exmap-0.10-nodebug.patch
Created attachment 122440 [details, diff] exmap-0.10-no_libs_on_ldflags.patch
Created attachment 122442 [details, diff] exmap-0.10-nowerror.patch
This ebuilds fails nowadays due to the kernel headers: e.g. on my system: [...] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found kernel object directory: * /lib/modules/2.6.28-gentoo-r3/build * Found sources for kernel version: * 2.6.28-gentoo-r3 [...] make[2]: Entering directory `/usr/src/linux-2.6.28-gentoo-r3' CC [M] /var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel/exmap.o /var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel/exmap.c: In function 'setup_from_pid': /var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel/exmap.c:395: error: implicit declaration of function 'find_task_by_pid' /var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel/exmap.c:395: warning: assignment makes pointer from integer without a cast /var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel/exmap.c: In function 'init_module': /var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel/exmap.c:510: error: 'proc_root' undeclared (first use in this function) /var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel/exmap.c:510: error: (Each undeclared identifier is reported only once /var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel/exmap.c:510: error: for each function it appears in.) /var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel/exmap.c: In function 'cleanup_module': /var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel/exmap.c:535: error: 'proc_root' undeclared (first use in this function) make[3]: *** [/var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel/exmap.o] Error 1 make[2]: *** [_module_/var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel] Error 2 make[2]: Leaving directory `/usr/src/linux-2.6.28-gentoo-r3' make[1]: *** [kernel_modules] Error 2 make[1]: Leaving directory `/var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/kernel' [...] but also... [...] make[1]: Entering directory `/var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/jutil' make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe -Wall -I. -c -o Pcre.o Pcre.cpp x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe -Wall -I. -c -o jutil.o jutil.cpp In file included from jutil.cpp:1: jutil.hpp: In member function 'void jutil::ustream::check_enable()': jutil.hpp:38: error: 'getenv' was not declared in this scope jutil.cpp: In function 'bool jutil::read_directory(const std::string&, std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)': jutil.cpp:32: error: 'strncpy' was not declared in this scope make[1]: *** [jutil.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/jutil' [...] and... [...] make[1]: Entering directory `/var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/src' make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe -Wall -I../jutil -c -o exmtool.o exmtool.cpp exmtool.cpp:35: warning: deprecated conversion from string constant to 'char*' exmtool.cpp:35: warning: deprecated conversion from string constant to 'char*' exmtool.cpp:35: warning: deprecated conversion from string constant to 'char*' exmtool.cpp:35: warning: deprecated conversion from string constant to 'char*' exmtool.cpp:35: warning: deprecated conversion from string constant to 'char*' exmtool.cpp:35: warning: deprecated conversion from string constant to 'char*' exmtool.cpp: In function 'int main(int, char**)': exmtool.cpp:46: error: 'strcmp' was not declared in this scope make[1]: *** [exmtool.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/portage/dev-util/exmap-0.10/work/exmap-0.10/src' [...]
Hi, Max and I did some work on this today. First "gcc" patch resolve the "... was not declared in this scope" which was introduced by the new GCC import behavior. Second "kernel" patch fixes a no longer exported symbol find_task_by_pid ( http://xmw.de/a/6 ) and a removed proc_root ( http://www.digitalruin.net/node/43 ). Last but not least - a cleaned up ebuild (EAPI 2, X use flag, || die) leads to a clean compile w/o error or warnings on amd64 with gcc-4.3 and 4.4 and x86 gcc-4.3. We've successfully tested exmtool (command line utility) on a x86 gentoo-sources-2.6.32-gentoo-r5 (no cairo[X] on our firewall ;-) ) but encountered some problems with gexmap/exmtool on amd64 systems with gentoo-sources-2.6.32-gentoo-r5 and tuxonice-2.6.32. It might be a problem with the 64bit memory addresses unlike exmap claims to support it since release 0.9 ( http://www.berthels.co.uk/exmap/changes.html ). hang in there
(In reply to comment #9) > hang in there and watch our progress at http://svn.xmw.de/gentoo-overlay/dev-util/exmap/
We've done a lot of stuff today. -kernel.patch sensitive to Kernel versions, tested with latest portage tree revisions of gentoo-sources-2.6.16 and 2.6.25 to 2.6.32. -makefiles.patch now with sound CXXFLAGS from make.conf .ebuild has X and debug use flag. recognizes ARCH problem with linux-mod and 2.6.16, lots of comments. -hack.patch from http://pastie.org/827019 to avoid some gexmap crashed. We're looking forward to get some written test results from __YOU__! Michael
Just googled another independent approach to fix it: http://www.kdedevelopers.org/node/4166 There's a 64bit patch for the userland, which will be included over here.
in tree now *exmap-0.10 (24 Aug 2010) 24 Aug 2010; Michael Weber (xmw) <xmw@gentoo.org> +exmap-0.10.ebuild, +files/exmap-0.10-as-needed.patch, +files/exmap-0.10-fix64bit.patch, +files/exmap-0.10-gcc.patch, +files/exmap-0.10-gcc45.patch, +files/exmap-0.10-kernel.patch, +files/exmap-0.10-makefiles.patch, +metadata.xml: Initial commit for exmap. Fixes bug #158382, thanks to Paul Pacheco and all the other contributors there.