[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Announcing heaptrack - a Heap Memory Profiler for Linux
From:       Milian Wolff <mail () milianw ! de>
Date:       2014-12-10 14:12:08
Message-ID: 5910027.bRBFLbfjxa () milian-kdab2
[Download RAW message or body]

On Tuesday 09 December 2014 23:51:04 Albert Astals Cid wrote:
> El Dimarts, 9 de desembre de 2014, a les 02:15:58, Milian Wolff va escriure:
> > On Wednesday 03 December 2014 01:51:57 Aleix Pol wrote:
> > > On Tue, Dec 2, 2014 at 6:59 PM, Milian Wolff <mail@milianw.de> wrote:
> > > > Hey all,
> > > > 
> > > > I have just finished writing a lengthy introduction to heaptrack, an
> > > > alternative to Massif, see:
> > > > 
> > > > http://milianw.de/blog/heaptrack-a-heap-memory-profiler-for-linux
> > > > 
> > > > I'd like to see more people starting to use it. Any feedback, or even
> > > > patches,
> > > > is welcome!
> > > > 
> > > > Especially, I'd love to see more people use it on their pet project in
> > > > KDE.
> > > > Quite often, you'll find useless temporary allocations, overly large
> > > > memory
> > > > consumption or even significant memory leaks. C++/Qt/KDE code can be
> > > > extremely
> > > > efficient, but you have to code accordingly. If you have any questions
> > > > to
> > > > the
> > > > results you obtain from heaptrack, or how to improve the situation,
> > > > don't
> > > > hesitate to ask me. Please ask on a public mailing list, such that
> > > > others
> > > > can
> > > > benefit from the discussion as well.
> > > > 
> > > > Furthermore, I hereby request an official code review. Heaptrack
> > > > currently
> > > > lives in a scratch repository:
> > > > 
> > > > http://quickgit.kde.org/?p=scratch%2Fmwolff%2Fheaptrack.git
> > > > 
> > > > I want to move this to extragear, skipping playground altogether, if
> > > > possible.
> > > 
> > > Cool stuff! I'll definitely give it a try!
> > > 
> > > Regarding the move to extragear, you can start requesting the repository
> > > to
> > > get it in playground and then request the move to kdereview, if you're
> > > confident it's pristine. ;)
> > 
> > Heaptrack is now in kdereview, I'd like to invite everyone to review my
> > code at the new location:
> > 
> > git clone kde:heaptrack
> 
> Doesn't link here.
> 
> Linking CXX executable heaptrack_print
> CMakeFiles/heaptrack_print.dir/heaptrack_print.cpp.o: In function `main':
> heaptrack_print.cpp:(.text+0x3f4f): undefined reference to
> `boost::program_options::options_description::m_default_line_length'

<snip>

Can you update and try again? I think I was missing the REQUIRED in the 
find_package statements, which should have triggered an early-return. You 
don't have Boost installed, do you?

Hm, but thinking about it - you seem to have the headers around, otherwise it 
wouldn't even get that far. So something is fishy with your system, compared 
to mine. Can you debug this a bit please?

make heaptrack_print VERBOSE=1 |& tee make_log.txt
-> esp. the linker invocation would be interesting, it should be something 
like

/usr/lib/icecream/libexec/icecc/bin/g++    -std=c++11 -O2 -g -DNDEBUG    
CMakeFiles/heaptrack_print.dir/heaptrack_print.cpp.o  -o heaptrack_print -
rdynamic -lboost_iostreams -lboost_program_options

If this does not include the -lboost_* stuff, can you try to add

message(FATAL_ERROR "Boost libs: ${Boost_LIBRARIES}")

below the find_package in the CMakeLists.txt? What CMake do you use, btw.? And 
maybe play with the following options, and toggle them on/off:

set(Boost_USE_STATIC_LIBS OFF) 
set(Boost_USE_MULTITHREADED ON)  
set(Boost_USE_STATIC_RUNTIME OFF) 

(see http://stackoverflow.com/questions/6646405/how-do-you-add-boost-libraries-in-cmakelists-txt)

Bye
-- 
Milian Wolff
mail@milianw.de
http://milianw.de

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic