Slashdot Mirror


Code Profiling on AMD Systems?

streak writes "After looking around at some profilers for AMD chips (I'm currently developing on Windows .NET so oprofile, dtrace, and other open source profilers are out) like AMD's CodeAnalyst and Microsoft's .NET Profiler, I've seen nothing that even comes close to being useful for function timing, call graphs, and the like. I'm not looking for micro-optimization (i.e. assembly tweaking - I am after all in .NET), but more for macro-optimization (identifying slow functions, reducing number of repeated calls to functions, etc). What I'm comparing all these tools to is VTune (which is Intel only). What do people use for profiling on AMD systems on Windows? Do you develop on an Intel box, do macro-optimization with VTune, and then just run that code on the AMD system?"

35 comments

  1. Use VTune by LLuthor · · Score: 3, Insightful

    If you prefer working with VTune, just use VTune. At a high level, it doesn't matter whether you are working on an AMD or Intel CPU since the .NET JIT code will be almost identical.

    The intel tools are absolutely fantastic and integrate perfectly with VS and most other .NET tools. Its not worth your time and effort to use inferior products just for the sake of using AMD hardware. Just profile your code on an intel box and depoly on any box (since .NET doesn't care).

    I have't worked much with .NET, but for C++ nothing beats intel's C++ compiler and profiling tools. Even though I strongly prefer AMD hardware (I don't use laptops much), I keep a few intel boxes around for developing high performance C++.

    --
    LL
    1. Re:Use VTune by Anonymous Coward · · Score: 1, Informative

      VTune Setup refuses to install on AMD computers.

    2. Re:Use VTune by RevAaron · · Score: 1

      The the follow-upper said, apparently VTune won't install on an AMD machine. But it still makes no sense to me- why would it matter what CPU is in use in a JIT/VM system like .NET? In the language I use (Squeak Smalltalk) which is similar enough to .NET, I use a built-in profiler that works on any CPU and any OS- it's written in Smalltalk itself, not some C app from the outside. Why wouldn't something like that exist for .NET?

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    3. Re:Use VTune by Spy+Hunter · · Score: 2, Interesting

      I'm sure it has very little to do with VTune not working on AMD and everything to do with Intel's business types telling the engineers "don't support AMD". Did you know that recently Intel and Skype "collaborated" to cripple Skype's conference call features when running on a non-Intel chip? They don't need a good technical reason; this is business.

      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
    4. Re:Use VTune by wik · · Score: 1

      There's a very good technical reason for this: Intel and AMD have completely different performance counters on their processors. Each counter has its own microrachitectural- and implementation-specific bugs and quirks. As an example, the P6 performance counters look nothing like the P4's (both in the architectural interface and the implementation). The counters certainly aren't gospel and Intel is lucky when they can correctly use their own implementations (see the copious errata and footnotes on Intel's performance counter docs for details).

      Asking Intel to put its name on a product that supports the AMD counters, with their own undocumented bugs and quirks, is asking a lot. They didn't build the Opteron, they don't know how it really works, and AMD certainly isn't going to tell their arch competitor their trade secrets. If this weren't the case, there would be far better performance analysis tools than there are today.

      --
      / \
      \ / ASCII ribbon campaign for peace
      x
      / \
  2. ask slasdot? by Anonymous Coward · · Score: 0

    Why not go ask Microsoft?

  3. What the hell are you talking about? by Cthefuture · · Score: 1

    Function optimization isn't processor specific, or am I missing something?

    Use VTune, BoundsChecker, valgrind (not Windows), Purify, gprof, or any other profiler.

    ???

    --
    The ratio of people to cake is too big
  4. Re:Seriously, have you heard of google? by allanw · · Score: 1

    Didn't you notice he mentioned CodeAnalyst in the summary and said it didn't come close to other tools?

  5. Re:Seriously, have you heard of google? by Anonymous Coward · · Score: 0

    Seriously did you even read the blurb?
    He said he looked at CodeAnalyst and it sucked.

  6. VTune is what you want by MerlynEmrys67 · · Score: 1

    especially at a macro level.
    At a micro level you will get into all kinds of problems with different memory timings (especially on dual+ socket systems), but macro level you can't beat the complier that comes with VTune.

    --
    I have mod points and I am not afraid to use them
  7. Seriously, are you illiterate? by Anonymous Coward · · Score: 0

    "After looking around at some profilers for AMD chips ... like AMD's CodeAnalyst and Microsoft's .NET Profiler, I've seen nothing ..."

    Learn to read, Quick Draw.

  8. Seriously, have you heard of RTFA? by Kawahee · · Score: 1

    Seriously, have you?

    He mentioned CodeAnalyst in the first sentence or too. I've used it before and it's not all that great.

    --
    I'll subscribe to Slashdot when I see a month without a dupe, a typo, or an article the "editors" didn't read.
  9. Re:Seriously, have you heard of google? by Anonymous Coward · · Score: 0

    Exactly, what part of "After looking around at some profilers for AMD chips [...] like AMD's CodeAnalyst and Microsoft's .NET Profiler, I've seen nothing that even comes close to being useful", you don't understand? :)

  10. DevPartner Suite from Compuware is quite passable by ArchMagus · · Score: 3, Informative

    I've had some fairly good experiences with the Profiling portion of DevPartner (used to be TrueTime from NuMega.) The call graphs are very easy to navigate, and the data is quite digestable (the coverage analysis is quite nice too.)

    I don't think it's cheap, but I've never seen a more elegant solution.

  11. Just out of curiosity... by Just+Some+Guy · · Score: 1
    reducing number of repeated calls to functions

    What gave you the idea that a program running on AMD will make a different number of function calls than the same program running on Intel?

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:Just out of curiosity... by dimfeld · · Score: 1

      He was talking about macro-optimization there, which is generally processor-independent. But he can't do it effectively with the AMD- and .NET-compatible tools that he has.

    2. Re:Just out of curiosity... by Naikrovek · · Score: 1

      What gave you the idea that a program running on AMD will make a different number of function calls than the same program running on Intel?

      What gave you the idea that this is what he asked? He asked to see if anyone knew of a good profiler for AMD processors, since obviously the Intel ones won't work (be it for marketing or technical reasons). He said that he wanted to profile his code, to find bottlenecks, not to find the different bottlenecks between AMD and Intel.

      R.I.F.

  12. .NET profiling? by Spy+Hunter · · Score: 2, Informative

    NProf is free and works, though it won't win any awards. Visual Studio 2005 Team System (not professional) includes a code profiler.

    --
    main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
  13. jetbrains dottrace profiler by ZxCv · · Score: 3, Informative

    The same company that makes the java IDE IntelliJ IDEA makes a profiler for .NET called dottrace profiler that is very good for .NET apps. It has helped me identify and fix a long list of problems in the .NET apps that I have to maintain. I would highly recommend it. You can find it yourself on the front of jetbrains.com.

    --

    Perl - $Just @when->$you ${thought} s/yn/tax/ &couldn\'t %get $worse;
    1. Re:jetbrains dottrace profiler by Anonymous Coward · · Score: 1, Informative

      Mercury Diagnostics Profiler. Which I believe you can download a free trial.

  14. Re:Dear slashdot by Anonymous Coward · · Score: 2, Funny

    > I'm a fucking moron, how do I tie my shoes?

    Since you havent provided any more details I'm asuming you want to run barefeet. There are no shoelaces involved.

    Please consult your local high voltage line.

  15. Look before you leap by DrSkwid · · Score: 1

    Your platform doesn't have the tools you want.

    U L

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    1. Re:Look before you leap by binford2k · · Score: 2, Funny

      GNU/Linux - a printer driver gone horribly wrong

      The idea of GNU started with a printer driver. Linux started entirely independently as a terminal emulator. Get your facts straight before you poke fun. ;)

    2. Re:Look before you leap by DrSkwid · · Score: 0, Troll

      I know the facts mate,.

      Did you notice the GNU/Linux part ?

      August 1991
      ``Hello everybody out there using minix - I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. I've currently ported bash(1.08) and gcc(1.40), and things seem to work. "

      If it wasn't for GCC and the GNU GPL, chances are there would be no Linux today, just a Minix clone.

      Linux set the industry back 20 years, but hey, we'll cope.

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  16. AutomatedQA's AQTime by mindsuck · · Score: 4, Informative

    Check out AQTime.

    I use it for profiling big multi-threaded client/server applications and it usually comes in handy at spotting memory leaks and the bottlenecks in the code.

    I use it with Delphi's native win32 compiler, but it supports a wide array of platforms. I believe it supports everything you need on .NET and the price tag is quite affordable.

    --
    --- I w00t, therefore I'm l33t.
  17. Re:Seriously, have you heard of google? by schngrg · · Score: 1

    Ouch! I shouldn't have missed that part.

  18. Thanks for the question, closed source developer by Anonymous Coward · · Score: 0, Informative

    You refuse to consider any open source solution because you love shoving Windows.NET up your ass, but you don't have a problem with asking slashdot to help you out (but don't suggest any of those open source bull shit solutions because I refuse to use them HURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRR).

  19. Ants by ncmusic · · Score: 2, Informative

    I've had really good luck with Ants. I found it alot more intuitive than AQTune.

  20. Re:DevPartner Suite from Compuware is quite passab by Aardvark99 · · Score: 1

    If a commercial tool is an option...

    I've used both DevPartner Profiler (aka TrueTime) and Rational/IBM's Quantify. Both were roughly the same in functionality. They were both somewhat flakey at times as well (crashing, wrong results, no results).

    DevPartner Suite was reasonably priced and, if I recall, contained a more tools in its suite (compared to Rational Purify Plus -- which Quantify is a part). It's always a struggle to get to work in my experience and I often have to spend lots of times messing with settings and excluding certain 3rd party DLLs from the profile run to get correct (or ANY) results. This was with Windows C++ development, I'm sure Java/.NET stuff don't suffer these problems.

    Quantify (part of Purity Plus) seemed a little less buggy (but still had issues), but pricing was expensive and complicated (like all Rational tools).

  21. VSTS has an OK profiler by memodude · · Score: 1

    Visual Studio Team System for Developers has a pretty good profiler that supports call timing and allocation charts. It doesn't have any graphs though.

  22. Re:Seriously, have you heard of google? by Raenex · · Score: 1

    Kudos for admitting your mistake.

  23. quantify? by Anonymous Coward · · Score: 0

    dunno if it works on AMD, but Rational Quantify has been going for donkeys years, and is supported on many popular chips.