UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2008-02-15 01:32 AM

jfriesne
Administrator
From: California
Registered: 2005-07-06
Posts: 348
Website

Re: Linux profiler recommendations?

Hi all,

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?

Thanks,
Jeremy

Offline

#2 2008-02-15 01:21 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,826
Website

Re: Linux profiler recommendations?

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...

Offline

#3 2008-02-16 12:19 PM

mlampkin
Administrator
From: Sol 3
Registered: 2002-06-12
Posts: 911
Website

Re: Linux profiler recommendations?

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 )...


Michael


"The only difference between me and a madman is that I'm not mad."

Salvador Dali (1904-1989)

Offline

#4 2008-04-02 01:00 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,826
Website

Re: Linux profiler recommendations?

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...

Offline

#5 2009-01-07 12:08 AM

RotateRight
Member
Registered: 2009-01-07
Posts: 2
Website

Re: Linux profiler recommendations?

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:
http://rotateright.com

It should be pretty familiar if you've used Shark on OSX.

Offline

#6 2009-02-26 06:36 PM

RotateRight
Member
Registered: 2009-01-07
Posts: 2
Website

Re: Linux profiler recommendations?

A Zoom profile lets you go below the function-level. It shows you source code, assembly, and offers tuning advice. Check out this screenshot:
http://www.rotateright.com/code-browser.html

Offline

#7 2009-02-26 09:53 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,826
Website

Re: Linux profiler recommendations?

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...)

Offline

#8 2010-11-05 08:17 AM

Søren Sandmann
Guest

Re: Linux profiler recommendations?

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:

    http://sysprof.com

Like kcachegrind, sysprof is GPL licensed. Federico Mena Quintera, who was a cofounder of GNOME describes how to use it here:

    http://people.gnome.org/~federico/news-2005-07.html#26

#9 2013-07-12 09:29 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,230

Re: Linux profiler recommendations?

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...)

Offline

Board footer

Powered by FluxBB