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,847
Website

Re: Linux profiler recommendations?

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,847
Website

Re: Linux profiler recommendations?

Offline

#5 2009-01-07 12:08 AM

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

Re: Linux profiler recommendations?

Offline

#6 2009-02-26 06:36 PM

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

Re: Linux profiler recommendations?

Offline

#7 2009-02-26 09:53 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,847
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?

#9 2013-07-12 09:29 AM

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

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