Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Cache Optimization Now Made Easy, And Pretty 9

G3ckoG33k writes "Cache optimization has now been made easy, ok, perhaps easier... The guys working with memory management tool Valgrind (see previous story at /.) are now up to version 1.9.5, and it's stable! Even more, there is now also an excellent GUI tool for using Valgrind for serious cache optimization; check out KCachegrind!!! Besides, who would have thought cache optimization would be not only intellectually but also visually beautiful?"
This discussion has been archived. No new comments can be posted.

Cache Optimization Now Made Easy, And Pretty

Comments Filter:
  • On Mac OS X (Score:5, Informative)

    by norwoodites ( 226775 ) <pinskia@ g m a il.com> on Saturday April 26, 2003 @01:58PM (#5815403) Journal
    If some is developering on Mac OS X, they should be using the CHUD tools, they include a profiling tool called Shikari, it uses the PMC (performance monitor counters) on the CPU itself so you can see where cache misses are and also where most of the time is spent.
    • Re:On Mac OS X (Score:5, Interesting)

      by Textbook Error ( 590676 ) on Saturday April 26, 2003 @04:11PM (#5816074)
      Shikari is excellent - as well as letting you filter out time spent in the kernel, or monitoring a specific thread within a process, it will also give you an instruction-level breakdown of any routines that look suspicious. This is extremely useful when you're trying to understand why a particular routine is slow.

      Individual instructions are tinted from blue to yellow based on how expensive they were, you get a cycle count and %ge for each instruction within the routine, indications of where your stalls are, and awesome pop-up tips on suspicious behaviour (e.g., float->int conversions, redundant loads in a loop implying the compiler was being conservative with pointer aliasing, mixing double and float math, and a number of other PowerPC specific optimisation tricks).

      Like any profiler you have to bear in mind that it may not be telling the whole story, but when you have a routine that you've know you need to care what the compiler is emitting then Shikari is like having a PowerPC assembly guru give you a quick rundown over your code.
  • For GNOME heads (Score:4, Informative)

    by pepermil ( 146926 ) on Saturday April 26, 2003 @03:18PM (#5815781)
    For those developers who work on GNOME and would like a GUI tool similar to KCachegrind, you can check out Alleyoop [sourceforge.net], developed by Jeffrey Stedfast of Ximian. I've not actually used the tool, just seen it mentioned recently and didn't want GNOME developers left out in the cold. If anyone could provide a comparison between the two Valgrind GUIs, I'm sure there are many in the community that would appreciate it.
  • by eviltypeguy ( 521224 ) on Saturday April 26, 2003 @03:57PM (#5816005)
    You can now use Valgrind with the latest NVidia drivers (43.49+) (thanks NVidia):

    DISABLING CPU SPECIFIC FEATURES

    Setting the environment variable __GL_FORCE_GENERIC_CPU to a non-zero value will inhibit the use of CPU specific features such as MMX, SSE, or 3DNOW!. Use of this option may result in performance loss. This option may be useful in conjunction with software such as the Valgrind
    memory debugger.
  • That or, um, ugly as sin. Take your pick.
  • Truly beauty is in the eye of the beholder.

I have hardly ever known a mathematician who was capable of reasoning. -- Plato

Working...