KCachegrind: Valgrind Unleashed
Wednesday, 4 September 2002 | Otter
Valgrind, a GPL'd tool to debug applications' memory allocation, is one of the most exciting profiling tools in the free software world. Think Purify, but free, easier and available for Linux. Now Josef Weidendorfer makes Valgrind even more attractive with the first unofficial release of KCachegrind, a KDE front-end for Valgrind's profiling tool. (Click for screenshots of basic use and a call tree graph.) Now all x86 Linux developers can benefit from a professional grade profiling tool!
Comments:
Compile errors - Erik Hensema - 2002-09-03
Seems very promising, but it gives compile errors: g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/kde3/include -I/usr/lib/qt3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -O2 -fno-exceptions -fno-check-new -c -o toplevel.o `test -f toplevel.cpp || echo './'`toplevel.cpp toplevel.cpp: In method `void TopLevel::createActions()': toplevel.cpp:229: parse error before `(' Also, the patch to valgrind 1.0.1 fails: patch: **** malformed patch at line 1802: @@ -729,9 +1696,7 @@ UCodeBlock* VG_(cachesim_instrument)(UCo I haven't looked into the problems yet, but I will. This is really an application I was looking for a long time.
Re: Compile errors - EK - 2002-09-04
Valgrind has already been packaged in Debian and Gentoo. Debian has even 1.0.1 in unstable. I don't know about other distros.
Packages - GF - 2002-09-05
Mandrake has it too.
Re: Compile errors - Nick Betcher - 2002-09-05
Hmm, what does this have to do with anything? That's great that those distros have Valgrind packaged, but I see an alterior motive in your post OTHER than just trying to be a friendly user :) The reason this isn't relavent is because Valgrind 1.0.1 in ANY distro needs some patches for some enhanced profiling. Oh, don't let me forget: /me hands you a cookie for using Gentoo and Debian. Nick Betcher ----------------- Quote of the day: "I'd like to get a refill for my meds." - patient "I'm sorry sir, you're out of refills, we'll have to call your doctor." - pharmacy technician "What are refills?" - SAME patient
Re: Compile errors - Jens Henrik - 2002-09-04
The class KWidgetAction(...) is needed. But this class is new in KDE 3.1CVS ...so: without KDE 3.1 (if you have 3.0) you can only compile it if you just comment the line out in which KWidgetAction appears. (does not matter that much .. "just" the filter will disappear than) Compiling with gcc 3.x gives a few errors, too. You have to remove the "=0" in the *.cpp files which the error-message tells you there should be probably a fix soon (as much as I was told)
cool - Chris Parker - 2002-09-04
cool cool cool. Damn, this is cool. Can't wait to run this app. Thanks.
Re: cool - Aaron J. Seigo - 2002-09-04
no doubt.. i've got the tarball sitting on my HD just waiting for me to have the time to play with it, but every time i look at the screenshots and read what it can do i get goose bumps. a Free software profiler that takes into consideration things like cache misses, doesn't include the overhead of profiling in the profiling, has a wonderfully rich UI ..... damn! *grind is one of the most exciting sets of open source projects going on this year IMO.
KCachegrind: Valgrind Unleashed - Nick - 2002-09-04
Great tool! This needs to be added to apps.kde.org so that more people will find and use it.
In KDevelop? - Chakie - 2002-09-04
This would be a pretty nice thing to integrate into KDevelop at some point in time. Would make it an even more fully featured application development center. Now, if I only could get Emacs as the editor in KDevelop. :)
Re: In KDevelop? - [Bad-Knees] - 2002-09-04
>Now, if I only could get Emacs as the editor in KDevelop. :) Yes, that would be nice! But a KEmacs would be even better i think.
Re: In KDevelop? - jadrian - 2002-09-04
Yes, it would be great :) Maybe some day, it's kind of fun (and maybe a little sad...) to read this now: "Gaël: Will there be a KEmacs? Matthias: XEmacs is the editor of choice for many of the KDE developers. In converse, some XEmacs-developers also mentioned interest in a tighter KDE integration. So the future regarding KEmacs looks pretty bright." in http://www.linux-center.org/articles/9809/interview.html September 1998 :) J.A.
Re: In KDevelop? - Richard Moore - 2002-09-04
I remember someone mentioned an XEmacs KPart for KDevelop on the kdevelop ML a while back, dunno how well it works. Rich.
Still Alpha Release... - Josef Weidendorfer - 2002-09-04
Hi people, I think I'm forced to upload a more stable/compilable version now :-) I never thought someone would mention it here... I keep you up to date, Josef
nice work ! - chris - 2002-09-04
great tool , gratulations ! i hope more coders will use it and make kde really fast. another thing i am looking forward to , is the caching of whole apps on invisible desktops, as mentioned on kde-core-devel
fix for the patch....... - George Staikos - 2002-09-04
to get the patch to apply, search for the ",53" above line 1802, and then replace it with ,52.
New version of KCachegrind available... - Josef Weidendorfer - 2002-09-05
Hi, I just uploaded new versions KCachegrind 0.1b and valgrind-1.0.1 patch 0.1b. Look at the News section of the webpage for changes. And please give it a try. I should have all known bugs fixed :-) Happy profiling, Josef
Re: New version of KCachegrind available... - Perra - 2002-09-06
Problem is that only Valgrind 1.0.2 is available now which your patch won't apply to :)
Re: New version of KCachegrind available... - dnm - 2002-09-06
Yeah, the patch for 1.0.1 fails on 1.0.2... But one would hope for a synch between valgrinds cachegrind and kcachegrind so that the patch will not be necessary.
Re: New version of KCachegrind available... - Melchior FRANZ - 2002-09-06
Wrong. Only the 1.0.2 =link= is available now. But the 1.0.1 archive is still there: http://developer.kde.org/~sewardj/valgrind-1.0.1.tar.bz2.
Re: New version of KCachegrind available... - dnm - 2002-09-06
Uhm, I downloaded the 1.0.2, it IS (or was) there, I tried to apply the patch for 1.0.1 in the 1.0.2 directory and it fails. The patch does apply to the 1.0.1 directory without complaining. cut from rpm-build ----------------------------------------------------- -rw-r--r-- 501/501 105 2002-06-05 22:28:33 valgrind-1.0.2/tests/nanoleak.c -rw-r--r-- 501/501 491 2002-06-19 12:17:40 valgrind-1.0.2/tests/pth_pause.c -rw-r--r-- 501/501 996 2002-06-20 10:17:07 valgrind-1.0.2/tests/pth_sigpending.c -rw-r--r-- 501/501 2311 2002-08-25 22:02:25 valgrind-1.0.2/tests/pth_atfork1.c + STATUS=0 + '[' 0 -ne 0 ']' + cd valgrind-1.0.2 ++ /usr/bin/id -u + '[' 505 = 0 ']' ++ /usr/bin/id -u + '[' 505 = 0 ']' + /bin/chmod -Rf a+rX,g-w,o-w . + echo 'Patch #0 (patch-0.1c-valgrind-1.0.1):' Patch #0 (patch-0.1c-valgrind-1.0.1): + patch -p1 -s 1 out of 1 hunk FAILED -- saving rejects to file configure.in.rej 14 out of 35 hunks FAILED -- saving rejects to file vg_cachesim.c.rej 3 out of 6 hunks FAILED -- saving rejects to file vg_include.h.rej 1 out of 5 hunks FAILED -- saving rejects to file vg_main.c.rej 2 out of 14 hunks FAILED -- saving rejects to file vg_symtab2.c.rej 2 out of 2 hunks FAILED -- saving rejects to file vg_syscall_mem.c.rej error: Bad exit status from /var/tmp/rpm-tmp.71239 (%prep)
Re: New version of KCachegrind available... - Melchior FRANZ - 2002-09-08
What are you trying to say?! That the 1.0.1-patch doesn't apply to the 1.0.2 binary? Surprise! As I mentioned above, you can still download the 1.0.1 binary, too which the 1.0.1 applies quite well (surprise again!).
Re: New version of KCachegrind available... - dnm - 2002-09-10
Well, the first thing I wanted to say is that 1.0.2 actually was there, which your post seemed to imply that it was not. I am not surprised... I am just stating facts, it's just that *cachegrind* 1.0.1 is not working too well (which is why Julian Seward released 1.0.2). Also just so you know; patches can apply to newer versions, it just depends on how the new version was changed... much like a cvs merge can work without manual intervention, a patch can work on a later version depending on what was modified in the new version. Yes, it is not as "safe" as a tested patch against a certain version but if you are not depending on it in a production environment, and what you got does not work, why not try it? And after I tried it I might tell others who are like of mind so that they would know it would not work right of the bat... Then you can decide if you want to do the patch manually in the new code or just wait for someone to release a new patch... For me cachegrind 1.0.1 gets an assert almost all of the time but not with 1.0.2 (yes, unpatched).
Re: New version of KCachegrind available... - Melchior FRANZ - 2002-09-10
> Well, the first thing I wanted to say is that 1.0.2 actually > was there, which your post seemed to imply that it was not. Oh well. My posting was the answer to Perra, who said "Problem is that only Valgrind 1.0.2 is available now which your patch won't apply to." I said that the link to 1.0.1 may have been removed, but the binary was still there and posted the link. So there would be no problem to get a working, patched cachegrind with a matching kcachegrind, even though it wasn't the very last version. Then you =repeated= that the 1.0.1 patch wouldn't apply to 1.0.2, which was already stated before and not really surprising. Yes, my answer was a bit harsh, sorry. But it was easily topped by two replies, presumably by the same child using different names and with really bad manners. He should wash his mouth with soap. ;-)
Re: New version of KCachegrind available... - Melchior FRANZ - 2002-09-10
... but meanwhile there's a 1.0.2 patch anyway. Thank you, Josef! :-)
Re: New version of KCachegrind available... - dnm - 2002-09-11
Ok, trying to clarify (never been that good doing that lol) When I read your statement "Only the 1.0.2 =link= is available now" I thought that you had tried to access the 1.0.2 version during a transition, ie the link to the 1.0.1 file was removed but the tar file was/is still there and a new link had been added to the 1.0.2 tar file but the tar file it pointed to was not uploaded yet (or temporarily removed). So when I posted again the information I thought I provided was that you can download it now + which files the patch failed for. Also 1.0.1 cachegrind has never really worked for me. I will go try the new patch now though!
Re: New version of KCachegrind available... - dnm - 2002-09-24
Aaaaand.... as an example of patching sometimes working for closely related versions: the patches V 0.2a and 0.1e both for valgrind 1.0.2, should be used for 1.0.3. quote from kcachegrind site: "Update: Both Valgrind patches work for 1.0.3, too (There is one reject because of the wrong version number, which can be safely ignored)." (Yes, I have tested this and it works)
Re: New version of KCachegrind available... - bloemist - 2002-09-08
you're not too bright aren't you?
Offtopic ... - lescrh - 2002-09-08
Whats going on with mosfet.org ?
Re: Offtopic ... - Stof - 2002-09-09
He got flamed down by Slashdot.
Re: Offtopic ... - dc - 2002-09-09
and flamed b mos of he kde communi 9sorr m shif, , and keboard kes are no working.