You are not logged in.
On the Mac there is a very nice GUI profiler/sampler tool called "Shark"... you just run it, choose a process to profile from a list, and then click "start sampling", and a few seconds later, up comes a nice tree-graph showing what functions the targetted process is spending its CPU cycles in, sorted by usage.
My question is, is there anything similar to this for Linux? I tried gprof but IIRC it was a bit of a hassle (it would dump a big text file that you then had to parse using separate tools). Is there anything easy-to-use that you guys know of?
One I hear good things about, but never seem to get around to trying myself, is
oprofile... Which is probably already installed on whatever distro you're running...
The best sounding thing about it is no special recompilation is needed; it's able to
profile anything... But, if you're looking for a fancy GUI, you may need to find
another app that uses it as a back-end...
Ive' used Intel's VTune package and it did a good job... and was very configurable...
I only used their Windows version but there is a Linux package also... and both are available as eval downloads ( and as far as I know they don't cripple the eval versions )...
"The only difference between me and a madman is that I'm not mad."
Salvador Dali (1904-1989)
This is an old thread and you probably don't care much anymore, but the place is
really slow lately, so I figured I might as well post something... ;-)
I just recently had cause to use kcachegrind, which works in combination with
valgrind's "callgrind" tool... And, I must say, it's pretty damn spiffy... If you're
still looking for a Linux profiler, I'd recommend giving it a try...
I know this is a really old thread, but if anyone's still looking for a graphical/CLI performance profiler for Linux, please check out Zoom here:
It should be pretty familiar if you've used Shark on OSX.
Spiffy... The aforementioned kcachegrind can also get you source line-level profiling,
but I don't think it goes into the assembly code or gives any cool advice like that...
But, on the other hand, it's totally free (in cost as well as the FSF sense)... ;-)
(I love the link to hackersdelight.org, though... That book was one of my favorite
reads in a long time... Reminiscent of the old MIT HAKMEM tricks...)
I thought I had replied to this topic once, but apparently not.
If you are still looking for a good profiler for Linux, you should take a look at sysprof:
Like kcachegrind, sysprof is GPL licensed. Federico Mena Quintera, who was a cofounder of GNOME describes how to use it here:
I recently discovered perf. "perf top" is amazing, profiling the whole system in real-time without any hassle at all, and you can zoom all the way into disassembly view with code interspersed. I haven't discovered the more complex options yet, but the straightforward thing works great already. Gprof is useless because it only profiles at a function level, if it works at all. Oprofile was always a hassle to get working, if it did work at all.
(Had to delete some spam, so I thought I could as well post something new in this very old thread...)